#[repr(transparent)]pub struct VID(pub usize);Tuple Fields§
§0: usizeImplementations§
Source§impl VID
impl VID
pub fn index(&self) -> usize
pub fn as_u64(&self) -> u64
Sourcepub fn is_initialised(&self) -> bool
pub fn is_initialised(&self) -> bool
check if the VID points to a node
Sourcepub fn or_init(self, init: impl FnOnce() -> VID) -> Self
pub fn or_init(self, init: impl FnOnce() -> VID) -> Self
either return self if it is initialised, otherwise run the init closure
Sourcepub fn or_maybe_init(self, init: impl FnOnce() -> Option<VID>) -> Option<Self>
pub fn or_maybe_init(self, init: impl FnOnce() -> Option<VID>) -> Option<Self>
either return Some(self) if it is initialised, otherwise, run the init closure
Sourcepub fn into_option(self) -> Option<Self>
pub fn into_option(self) -> Option<Self>
return Some(self) if initialised, otherwise, None
Trait Implementations§
impl Copy for VID
Source§impl<'de> Deserialize<'de> for VID
impl<'de> Deserialize<'de> for VID
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
impl Eq for VID
Source§impl Ord for VID
impl Ord for VID
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 VID
impl PartialOrd for VID
impl Pod for VID
impl StructuralPartialEq for VID
Auto Trait Implementations§
impl Freeze for VID
impl RefUnwindSafe for VID
impl Send for VID
impl Sync for VID
impl Unpin for VID
impl UnsafeUnpin for VID
impl UnwindSafe for VID
Blanket Implementations§
impl<T> Allocation for T
impl<T> AnyBitPattern for Twhere
T: Pod,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
Source§type Bits = T
type Bits = T
Self must have the same layout as the specified Bits except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern.Source§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
If this function returns true, then it must be valid to reinterpret
bits
as &Self.Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more