pub struct MetadataPropertyDefinition { /* private fields */ }Expand description
Advisory type, cardinality, and mapping information for one property.
Implementations§
Source§impl MetadataPropertyDefinition
impl MetadataPropertyDefinition
Sourcepub const fn property(self) -> &'static str
pub const fn property(self) -> &'static str
Returns the exact vocabulary-local property identifier.
Sourcepub const fn description(self) -> &'static str
pub const fn description(self) -> &'static str
Returns a concise description of the property’s intended meaning.
Sourcepub const fn accepted_kinds(self) -> &'static [MetadataValueKind]
pub const fn accepted_kinds(self) -> &'static [MetadataValueKind]
Returns the accepted value kinds for opt-in validation.
Sourcepub const fn cardinality(self) -> MetadataCardinality
pub const fn cardinality(self) -> MetadataCardinality
Returns the suggested assertion cardinality.
Sourcepub const fn aliases(self) -> &'static [MetadataPropertyAlias]
pub const fn aliases(self) -> &'static [MetadataPropertyAlias]
Returns known spellings in external mapping profiles.
Sourcepub fn validate_values(self, values: &[MetadataValue]) -> Result<()>
pub fn validate_values(self, values: &[MetadataValue]) -> Result<()>
Applies the advisory type and cardinality rules to a complete value set.
§Errors
Returns ErrorKind::InvalidArgument for an unexpected value kind or
more than one value for a single-valued property.
Trait Implementations§
Source§impl Clone for MetadataPropertyDefinition
impl Clone for MetadataPropertyDefinition
Source§fn clone(&self) -> MetadataPropertyDefinition
fn clone(&self) -> MetadataPropertyDefinition
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for MetadataPropertyDefinition
Auto Trait Implementations§
impl Freeze for MetadataPropertyDefinition
impl RefUnwindSafe for MetadataPropertyDefinition
impl Send for MetadataPropertyDefinition
impl Sync for MetadataPropertyDefinition
impl Unpin for MetadataPropertyDefinition
impl UnsafeUnpin for MetadataPropertyDefinition
impl UnwindSafe for MetadataPropertyDefinition
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