pub struct GraphEntity { /* private fields */ }Expand description
One typed graph entity at a complete index generation.
Implementations§
Source§impl GraphEntity
impl GraphEntity
Sourcepub fn new(
project: ProjectInstanceId,
selector: EntitySelector,
generation: IndexGeneration,
) -> Result<Self, GraphContractError>
pub fn new( project: ProjectInstanceId, selector: EntitySelector, generation: IndexGeneration, ) -> Result<Self, GraphContractError>
Construct an entity and derive its stable key.
§Errors
Returns an error for the pre-publication zero generation.
Sourcepub const fn key(&self) -> &GraphEntityKey
pub const fn key(&self) -> &GraphEntityKey
Borrow the stable project-qualified key.
Sourcepub const fn selector(&self) -> &EntitySelector
pub const fn selector(&self) -> &EntitySelector
Borrow the typed identity selector.
Sourcepub const fn generation(&self) -> IndexGeneration
pub const fn generation(&self) -> IndexGeneration
Return the complete generation containing this entity.
Trait Implementations§
Source§impl Clone for GraphEntity
impl Clone for GraphEntity
Source§fn clone(&self) -> GraphEntity
fn clone(&self) -> GraphEntity
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 GraphEntity
impl Debug for GraphEntity
Source§impl PartialEq for GraphEntity
impl PartialEq for GraphEntity
Source§impl Serialize for GraphEntity
impl Serialize for GraphEntity
impl Eq for GraphEntity
impl StructuralPartialEq for GraphEntity
Auto Trait Implementations§
impl Freeze for GraphEntity
impl RefUnwindSafe for GraphEntity
impl Send for GraphEntity
impl Sync for GraphEntity
impl Unpin for GraphEntity
impl UnwindSafe for GraphEntity
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.