pub struct Attribute {
pub id: AttributeId,
pub name: String,
pub data_type: DataType,
pub is_primary: bool,
pub is_partial_key: bool,
pub is_optional: bool,
pub kind: AttributeKind,
pub children: Vec<AttributeId>,
}Expand description
An attribute belonging to either an Entity or a Relationship.
Fields§
§id: AttributeIdUnique handle within the owning model.
name: StringDisplay name (e.g. "first_name").
data_type: DataTypeLogical data type (mapped to a column type during conversion).
is_primary: boolWhether this attribute participates in the entity’s primary identifier.
is_partial_key: boolWhether this attribute is a partial key — combined with the owning entity’s identifying relationship to form a key (typical for weak entities).
is_optional: boolWhether the attribute admits a null value.
kind: AttributeKindStructural kind of the attribute.
children: Vec<AttributeId>For composite attributes, the IDs of the sub-attributes that compose this one. Empty for non-composite attributes.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Attribute
impl<'de> Deserialize<'de> for Attribute
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
impl StructuralPartialEq for Attribute
Auto Trait Implementations§
impl Freeze for Attribute
impl RefUnwindSafe for Attribute
impl Send for Attribute
impl Sync for Attribute
impl Unpin for Attribute
impl UnsafeUnpin for Attribute
impl UnwindSafe for Attribute
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