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) -> SWHType
pub unsafe fn get_unchecked(&self, node_id: usize) -> SWHType
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: SWHType)
pub unsafe fn set_unchecked(&mut self, node_id: usize, node_type: SWHType)
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<UsizeMmap<Vec<u8>>>
impl Node2Type<UsizeMmap<Vec<u8>>>
pub fn new_from_iter(types: impl ExactSizeIterator<Item = SWHType>) -> Self
Auto Trait Implementations§
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
§impl<T, U> CastableInto<U> for Twhere
U: CastableFrom<T>,
impl<T, U> CastableInto<U> for Twhere U: CastableFrom<T>,
§impl<T> DowncastableFrom<T> for T
impl<T> DowncastableFrom<T> for T
§fn downcast_from(value: T) -> T
fn downcast_from(value: T) -> T
Truncate the current UnsignedInt to a possibly smaller size
§impl<T, U> DowncastableInto<U> for Twhere
U: DowncastableFrom<T>,
impl<T, U> DowncastableInto<U> for Twhere U: DowncastableFrom<T>,
§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere T: ?Sized,
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> UpcastableFrom<T> for T
impl<T> UpcastableFrom<T> for T
§fn upcast_from(value: T) -> T
fn upcast_from(value: T) -> T
Extend the current UnsignedInt to a possibly bigger size.