pub enum PropertySubject {
Element(ElementId),
Relation(RelationId),
Incidence(IncidenceId),
}Expand description
Subject that can own properties.
§Invariant
The variant declaration order (Element, Relation, Incidence) is
load-bearing: the derived Ord ranks them in that order, and that ranking
MUST match the wire kind tags 0/1/2 produced by the wire
encode_subject codec. The frozen base writes property records in
BTreeMap<PropertySubject, …> order — sorted by (subject_kind, subject_id, key) — and the read path materializes them back into that same keyed order;
reordering these variants would silently desynchronize the two. See the wire
encode_subject docs for the full contract and the open-time assertion in
backing that guards it.
§Performance
Copying, comparing, ordering, and hashing are O(1).
Variants§
Element(ElementId)
Element property subject.
Relation(RelationId)
Relation property subject.
Incidence(IncidenceId)
Incidence property subject.
Implementations§
Source§impl PropertySubject
impl PropertySubject
Sourcepub const fn family(self) -> PropertyFamily
pub const fn family(self) -> PropertyFamily
Trait Implementations§
Source§impl Clone for PropertySubject
impl Clone for PropertySubject
Source§fn clone(&self) -> PropertySubject
fn clone(&self) -> PropertySubject
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 PropertySubject
Source§impl Debug for PropertySubject
impl Debug for PropertySubject
Source§impl<'de> Deserialize<'de> for PropertySubject
impl<'de> Deserialize<'de> for PropertySubject
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 Eq for PropertySubject
Source§impl Hash for PropertySubject
impl Hash for PropertySubject
Source§impl Ord for PropertySubject
impl Ord for PropertySubject
Source§fn cmp(&self, other: &PropertySubject) -> Ordering
fn cmp(&self, other: &PropertySubject) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for PropertySubject
impl PartialEq for PropertySubject
Source§fn eq(&self, other: &PropertySubject) -> bool
fn eq(&self, other: &PropertySubject) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for PropertySubject
impl PartialOrd for PropertySubject
Source§impl Serialize for PropertySubject
impl Serialize for PropertySubject
impl StructuralPartialEq for PropertySubject
Auto Trait Implementations§
impl Freeze for PropertySubject
impl RefUnwindSafe for PropertySubject
impl Send for PropertySubject
impl Sync for PropertySubject
impl Unpin for PropertySubject
impl UnsafeUnpin for PropertySubject
impl UnwindSafe for PropertySubject
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