Struct MetadataSchema
pub struct MetadataSchema { /* private fields */ }Expand description
Metadata schema for core keys and plugin extension keys.
Implementations§
§impl MetadataSchema
impl MetadataSchema
pub fn core() -> MetadataSchema
pub fn core() -> MetadataSchema
Creates schema containing all core:* keys.
pub fn register_plugin_key(
&mut self,
key: &str,
kind: MetadataKind,
) -> Result<(), PixelFlowError>
pub fn register_plugin_key( &mut self, key: &str, kind: MetadataKind, ) -> Result<(), PixelFlowError>
Registers a plugin metadata key in publisher/plugin:key format.
pub fn contains_key(&self, key: &str) -> bool
pub fn contains_key(&self, key: &str) -> bool
Returns true when key is registered in schema.
pub fn kind(&self, key: &str) -> Option<MetadataKind>
pub fn kind(&self, key: &str) -> Option<MetadataKind>
Returns declared metadata kind for registered key.
pub fn is_core_key(&self, key: &str) -> bool
pub fn is_core_key(&self, key: &str) -> bool
Returns true when key is one of built-in core:* keys.
pub fn validate_value(
&self,
key: &str,
value: &MetadataValue,
) -> Result<(), PixelFlowError>
pub fn validate_value( &self, key: &str, value: &MetadataValue, ) -> Result<(), PixelFlowError>
Validates that key is registered and value matches declared kind.
Trait Implementations§
§impl Clone for MetadataSchema
impl Clone for MetadataSchema
§fn clone(&self) -> MetadataSchema
fn clone(&self) -> MetadataSchema
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for MetadataSchema
impl Debug for MetadataSchema
§impl PartialEq for MetadataSchema
impl PartialEq for MetadataSchema
impl Eq for MetadataSchema
impl StructuralPartialEq for MetadataSchema
Auto Trait Implementations§
impl Freeze for MetadataSchema
impl RefUnwindSafe for MetadataSchema
impl Send for MetadataSchema
impl Sync for MetadataSchema
impl Unpin for MetadataSchema
impl UnsafeUnpin for MetadataSchema
impl UnwindSafe for MetadataSchema
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more