pub struct Node2Type<B> { /* private fields */ }Expand description
Struct to create and load a .node2type.bin file and convert node ids to types.
Implementations§
Source§impl<B: AsRef<[usize]>> Node2Type<B>
impl<B: AsRef<[usize]>> Node2Type<B>
Sourcepub unsafe fn get_unchecked(&self, node_id: usize) -> NodeType
pub unsafe fn get_unchecked(&self, node_id: usize) -> NodeType
Get the type of a node with id node_id without bounds checking
§Safety
This function is unsafe because it does not check that node_id is
within bounds of the array if debug asserts are disabled
Source§impl<B: AsRef<[usize]> + AsMut<[usize]>> Node2Type<B>
impl<B: AsRef<[usize]> + AsMut<[usize]>> Node2Type<B>
Sourcepub unsafe fn set_unchecked(&mut self, node_id: usize, node_type: NodeType)
pub unsafe fn set_unchecked(&mut self, node_id: usize, node_type: NodeType)
Get the type of a node with id node_id without bounds checking
§Safety
This function is unsafe because it does not check that node_id is
within bounds of the array if debug asserts are disabled
Source§impl Node2Type<Vec<usize>>
impl Node2Type<Vec<usize>>
pub fn new_from_iter(types: impl ExactSizeIterator<Item = NodeType>) -> Self
Auto Trait Implementations§
impl<B> Freeze for Node2Type<B>where
B: Freeze,
impl<B> RefUnwindSafe for Node2Type<B>where
B: RefUnwindSafe,
impl<B> Send for Node2Type<B>where
B: Send,
impl<B> Sync for Node2Type<B>where
B: Sync,
impl<B> Unpin for Node2Type<B>where
B: Unpin,
impl<B> UnwindSafe for Node2Type<B>where
B: UnwindSafe,
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
Source§impl<T, U> CastableInto<U> for Twhere
U: CastableFrom<T>,
impl<T, U> CastableInto<U> for Twhere
U: CastableFrom<T>,
Source§impl<T, U> CastableInto<U> for Twhere
U: CastableFrom<T>,
impl<T, U> CastableInto<U> for Twhere
U: CastableFrom<T>,
Source§impl<T> DowncastableFrom<T> for T
impl<T> DowncastableFrom<T> for T
Source§fn downcast_from(value: T) -> T
fn downcast_from(value: T) -> T
Truncate the current UnsignedInt to a possibly smaller size
Source§impl<T> DowncastableFrom<T> for T
impl<T> DowncastableFrom<T> for T
Source§fn downcast_from(value: T) -> T
fn downcast_from(value: T) -> T
Truncate the current UnsignedInt to a possibly smaller size
Source§impl<T, U> DowncastableInto<U> for Twhere
U: DowncastableFrom<T>,
impl<T, U> DowncastableInto<U> for Twhere
U: DowncastableFrom<T>,
Source§impl<T, U> DowncastableInto<U> for Twhere
U: DowncastableFrom<T>,
impl<T, U> DowncastableInto<U> for Twhere
U: DowncastableFrom<T>,
Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> UpcastableFrom<T> for T
impl<T> UpcastableFrom<T> for T
Source§fn upcast_from(value: T) -> T
fn upcast_from(value: T) -> T
Extend the current UnsignedInt to a possibly bigger size.
Source§impl<T> UpcastableFrom<T> for T
impl<T> UpcastableFrom<T> for T
Source§fn upcast_from(value: T) -> T
fn upcast_from(value: T) -> T
Extend the current UnsignedInt to a possibly bigger size.