pub struct Index { /* private fields */ }Implementations§
Source§impl Index
impl Index
pub const INVALID: Self
pub const fn new(id: u32, generation: u32) -> Option<Self>
Sourcepub const unsafe fn new_unchecked(id: u32, generation: u32) -> Self
pub const unsafe fn new_unchecked(id: u32, generation: u32) -> Self
§Safety
pub const fn is_valid(self) -> bool
pub const fn id(self) -> u32
pub const fn generation(self) -> u32
pub const fn to_u64(self) -> u64
pub const fn from_u64(value: u64) -> Self
pub const fn bump_generation(self) -> Self
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Index
impl<'de> Deserialize<'de> for Index
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Ord for Index
impl Ord for Index
Source§impl PartialOrd for Index
impl PartialOrd for Index
impl Copy for Index
impl Eq for Index
impl StructuralPartialEq for Index
Auto Trait Implementations§
impl Freeze for Index
impl RefUnwindSafe for Index
impl Send for Index
impl Sync for Index
impl Unpin for Index
impl UnwindSafe for Index
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