pub struct EntityID(pub u16);Tuple Fields§
§0: u16Implementations§
Source§impl EntityID
impl EntityID
Sourcepub fn increment(&mut self)
pub fn increment(&mut self)
Increment the internal counter of the ID. This is useful for sequence numbers.
Sourcepub fn get_and_increment(&mut self) -> Self
pub fn get_and_increment(&mut self) -> Self
Return the current counter value and then increment.
Sourcepub fn to_be_bytes(self) -> Vec<u8> ⓘ
pub fn to_be_bytes(self) -> Vec<u8> ⓘ
Convert the internal counter to Big endian bytes.
Trait Implementations§
impl Copy for EntityID
impl Eq 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 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