pub struct EntityId(/* private fields */);Expand description
A Datomic-style entity id: 22-bit partition plus 42-bit sequence.
Implementations§
Source§impl EntityId
impl EntityId
Sourcepub const fn new(partition: PartitionId, sequence: u64) -> Self
pub const fn new(partition: PartitionId, sequence: u64) -> Self
Constructs an entity id from a partition and sequence.
Sourcepub const fn partition(self) -> PartitionId
pub const fn partition(self) -> PartitionId
Returns the partition component.
Trait Implementations§
impl Copy for EntityId
Source§impl Encodable for EntityId
impl Encodable for EntityId
Source§fn encode_into(&self, out: &mut Vec<u8>)
fn encode_into(&self, out: &mut Vec<u8>)
Appends this value’s encoding to
out.impl Eq for EntityId
Source§impl Ord for EntityId
impl Ord for EntityId
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 PartialOrd for EntityId
impl PartialOrd for EntityId
impl StructuralPartialEq for EntityId
Auto Trait Implementations§
impl Freeze for EntityId
impl RefUnwindSafe for EntityId
impl Send for EntityId
impl Sync for EntityId
impl Unpin for EntityId
impl UnsafeUnpin for EntityId
impl UnwindSafe for EntityId
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