pub struct RelatesFact { /* private fields */ }Expand description
A direct related-role fact, optionally specializing a parent role.
Implementations§
Source§impl RelatesFact
impl RelatesFact
Sourcepub fn new(
id: RelatesFactId,
specializes: Option<RoleId>,
) -> Result<Self, Diagnostic>
pub fn new( id: RelatesFactId, specializes: Option<RoleId>, ) -> Result<Self, Diagnostic>
Construct an unordered related-role fact.
Sourcepub fn new_with_collection_mode(
id: RelatesFactId,
specializes: Option<RoleId>,
collection_mode: CollectionMode,
) -> Result<Self, Diagnostic>
pub fn new_with_collection_mode( id: RelatesFactId, specializes: Option<RoleId>, collection_mode: CollectionMode, ) -> Result<Self, Diagnostic>
Construct a related-role fact with explicit collection semantics.
Sourcepub const fn with_collection_mode(self, collection_mode: CollectionMode) -> Self
pub const fn with_collection_mode(self, collection_mode: CollectionMode) -> Self
Replace this fact’s collection semantics without changing its identity.
Sourcepub const fn id(&self) -> &RelatesFactId
pub const fn id(&self) -> &RelatesFactId
Return the fact identity.
Sourcepub const fn specializes(&self) -> Option<&RoleId>
pub const fn specializes(&self) -> Option<&RoleId>
Return the specialized parent role, if any.
Sourcepub const fn collection_mode(&self) -> CollectionMode
pub const fn collection_mode(&self) -> CollectionMode
Return the canonical collection semantics.
Trait Implementations§
Source§impl Clone for RelatesFact
impl Clone for RelatesFact
Source§fn clone(&self) -> RelatesFact
fn clone(&self) -> RelatesFact
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 moreSource§impl Debug for RelatesFact
impl Debug for RelatesFact
impl Eq for RelatesFact
Source§impl PartialEq for RelatesFact
impl PartialEq for RelatesFact
Source§impl Serialize for RelatesFact
impl Serialize for RelatesFact
impl StructuralPartialEq for RelatesFact
Auto Trait Implementations§
impl Freeze for RelatesFact
impl RefUnwindSafe for RelatesFact
impl Send for RelatesFact
impl Sync for RelatesFact
impl Unpin for RelatesFact
impl UnsafeUnpin for RelatesFact
impl UnwindSafe for RelatesFact
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