Struct swh_graph::map::MappedPermutation
source · pub struct MappedPermutation(/* private fields */);
Expand description
A Permutation
backed by a big-endian mmapped file
Implementations§
source§impl MappedPermutation
impl MappedPermutation
sourcepub unsafe fn new_unchecked(perm: Mmap) -> Self
pub unsafe fn new_unchecked(perm: Mmap) -> Self
Creates a permutation
Safety
This function is not unsafe per-se, but it does not check node ids in the permutation’s image are correct or unique, which will violate assumptions of other unsafe functions down the line.
sourcepub fn new(perm: Mmap) -> Result<Self>
pub fn new(perm: Mmap) -> Result<Self>
Creates a permutation, or returns an error in case the permutation is incorrect
sourcepub unsafe fn load_unchecked(path: &Path) -> Result<Self>
pub unsafe fn load_unchecked(path: &Path) -> Result<Self>
Loads a permutation from disk and returns IO errors if any.
Safety
This function is not unsafe per-se, but it does not check node ids in the permutation’s image are correct or unique, which will violate assumptions of other unsafe functions down the line.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for MappedPermutation
impl Send for MappedPermutation
impl Sync for MappedPermutation
impl Unpin for MappedPermutation
impl UnwindSafe for MappedPermutation
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.