pub struct StateId(pub u64);Expand description
State atom identity - unique within a session
Tuple Fields§
§0: u64Implementations§
Source§impl StateId
impl StateId
pub const ZERO: StateId
pub fn new(id: u64) -> Self
Sourcepub fn from_type_instance(state_type: u16, instance: u64) -> Self
pub fn from_type_instance(state_type: u16, instance: u64) -> Self
Create a state ID from type prefix and instance ID Format: [type:16][instance:48]
pub fn state_type(self) -> u16
pub fn instance(self) -> u64
pub fn to_bytes(self) -> [u8; 8]
pub fn from_bytes(bytes: [u8; 8]) -> Self
Trait Implementations§
impl Copy for StateId
impl Eq for StateId
impl StructuralPartialEq for StateId
Auto Trait Implementations§
impl Freeze for StateId
impl RefUnwindSafe for StateId
impl Send for StateId
impl Sync for StateId
impl Unpin for StateId
impl UnwindSafe for StateId
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