#[non_exhaustive]pub struct TypedLinkAttributeDefinition {
pub name: Option<String>,
pub type: Option<FacetAttributeType>,
pub default_value: Option<TypedAttributeValue>,
pub is_immutable: bool,
pub rules: Option<HashMap<String, Rule>>,
pub required_behavior: Option<RequiredAttributeBehavior>,
}
Expand description
A typed link attribute definition.
Fields (Non-exhaustive)
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.name: Option<String>
The unique name of the typed link attribute.
type: Option<FacetAttributeType>
The type of the attribute.
default_value: Option<TypedAttributeValue>
The default value of the attribute (if configured).
is_immutable: bool
Whether the attribute is mutable or not.
rules: Option<HashMap<String, Rule>>
Validation rules that are attached to the attribute definition.
required_behavior: Option<RequiredAttributeBehavior>
The required behavior of the TypedLinkAttributeDefinition
.
Implementations
sourceimpl TypedLinkAttributeDefinition
impl TypedLinkAttributeDefinition
sourcepub fn type(&self) -> Option<&FacetAttributeType>
pub fn type(&self) -> Option<&FacetAttributeType>
The type of the attribute.
sourcepub fn default_value(&self) -> Option<&TypedAttributeValue>
pub fn default_value(&self) -> Option<&TypedAttributeValue>
The default value of the attribute (if configured).
sourcepub fn is_immutable(&self) -> bool
pub fn is_immutable(&self) -> bool
Whether the attribute is mutable or not.
sourcepub fn rules(&self) -> Option<&HashMap<String, Rule>>
pub fn rules(&self) -> Option<&HashMap<String, Rule>>
Validation rules that are attached to the attribute definition.
sourcepub fn required_behavior(&self) -> Option<&RequiredAttributeBehavior>
pub fn required_behavior(&self) -> Option<&RequiredAttributeBehavior>
The required behavior of the TypedLinkAttributeDefinition
.
sourceimpl TypedLinkAttributeDefinition
impl TypedLinkAttributeDefinition
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture TypedLinkAttributeDefinition
Trait Implementations
sourceimpl Clone for TypedLinkAttributeDefinition
impl Clone for TypedLinkAttributeDefinition
sourcefn clone(&self) -> TypedLinkAttributeDefinition
fn clone(&self) -> TypedLinkAttributeDefinition
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for TypedLinkAttributeDefinition
impl Debug for TypedLinkAttributeDefinition
sourceimpl PartialEq<TypedLinkAttributeDefinition> for TypedLinkAttributeDefinition
impl PartialEq<TypedLinkAttributeDefinition> for TypedLinkAttributeDefinition
sourcefn eq(&self, other: &TypedLinkAttributeDefinition) -> bool
fn eq(&self, other: &TypedLinkAttributeDefinition) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &TypedLinkAttributeDefinition) -> bool
fn ne(&self, other: &TypedLinkAttributeDefinition) -> bool
This method tests for !=
.
impl StructuralPartialEq for TypedLinkAttributeDefinition
Auto Trait Implementations
impl RefUnwindSafe for TypedLinkAttributeDefinition
impl Send for TypedLinkAttributeDefinition
impl Sync for TypedLinkAttributeDefinition
impl Unpin for TypedLinkAttributeDefinition
impl UnwindSafe for TypedLinkAttributeDefinition
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more