pub struct AttributeDefinition {
pub description: Option<String>,
pub slot_uri: Option<String>,
pub identifier: Option<bool>,
pub required: Option<bool>,
pub range: Option<String>,
pub readonly: Option<bool>,
pub multivalued: Option<bool>,
pub minimum_value: Option<i64>,
pub maximum_value: Option<i64>,
pub recommended: Option<bool>,
pub examples: Vec<Example>,
pub annotations: Option<IndexMap<String, Annotation>>,
}Expand description
Defines a slot (property/field) in the schema
Fields§
§description: Option<String>Optional description of the slot
slot_uri: Option<String>Semantic type of the slot
identifier: Option<bool>Whether this slot serves as an identifier
required: Option<bool>Whether this slot is required
range: Option<String>Optional type range for the slot
readonly: Option<bool>Whether this slot is read-only
multivalued: Option<bool>Whether this slot can have multiple values
minimum_value: Option<i64>Optional minimum value for numeric slots
maximum_value: Option<i64>Optional maximum value for numeric slots
recommended: Option<bool>Whether this slot is recommended
examples: Vec<Example>Optional map of example values
annotations: Option<IndexMap<String, Annotation>>Optional map of annotations
Trait Implementations§
Source§impl Clone for AttributeDefinition
impl Clone for AttributeDefinition
Source§fn clone(&self) -> AttributeDefinition
fn clone(&self) -> AttributeDefinition
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 moreSource§impl Debug for AttributeDefinition
impl Debug for AttributeDefinition
Source§impl<'de> Deserialize<'de> for AttributeDefinition
impl<'de> Deserialize<'de> for AttributeDefinition
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<Attribute> for AttributeDefinition
Implements conversion from Attribute to LinkML AttributeDefinition.
impl From<Attribute> for AttributeDefinition
Implements conversion from Attribute to LinkML AttributeDefinition.
Source§impl From<AttributeDefinition> for Attribute
Implements conversion from LinkML AttributeDefinition to Attribute.
impl From<AttributeDefinition> for Attribute
Implements conversion from LinkML AttributeDefinition to Attribute.
Source§fn from(attr: AttributeDefinition) -> Self
fn from(attr: AttributeDefinition) -> Self
Converts a LinkML AttributeDefinition into an internal Attribute representation.
This conversion preserves:
- Documentation
- Data type/range
- Cardinality (multivalued status)
- Identifier status
- Required status
- URI/term mapping
§Arguments
attr- The LinkML AttributeDefinition to convert
§Returns
An Attribute representing the slot in the internal model format
Source§impl PartialEq for AttributeDefinition
impl PartialEq for AttributeDefinition
Source§impl Serialize for AttributeDefinition
impl Serialize for AttributeDefinition
impl Eq for AttributeDefinition
impl StructuralPartialEq for AttributeDefinition
Auto Trait Implementations§
impl Freeze for AttributeDefinition
impl RefUnwindSafe for AttributeDefinition
impl Send for AttributeDefinition
impl Sync for AttributeDefinition
impl Unpin for AttributeDefinition
impl UnsafeUnpin for AttributeDefinition
impl UnwindSafe for AttributeDefinition
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.