pub struct VecxRaw { /* private fields */ }
Expand description
A disk-based, Vec
-like data structure for raw byte values.
Implementations§
Source§impl VecxRaw
impl VecxRaw
Sourcepub unsafe fn shadow(&self) -> Self
pub unsafe fn shadow(&self) -> Self
Creates a “shadow” copy of the VecxRaw
instance.
§Safety
This API breaks Rust’s semantic safety guarantees. Use only in a race-free environment.
Sourcepub unsafe fn from_bytes(s: impl AsRef<[u8]>) -> Self
pub unsafe fn from_bytes(s: impl AsRef<[u8]>) -> Self
Creates a VecxRaw
from a byte slice.
§Safety
This function is unsafe and assumes the byte slice is a valid representation.
Sourcepub fn get_mut(&mut self, idx: usize) -> Option<ValueMut<'_, u64>>
pub fn get_mut(&mut self, idx: usize) -> Option<ValueMut<'_, u64>>
Retrieves a mutable reference to a value at a specific index.
Sourcepub fn swap_remove(&mut self, idx: usize) -> RawValue
pub fn swap_remove(&mut self, idx: usize) -> RawValue
Removes a value at a specific index and returns it, replacing it with the last value.
§Panics
Panics if idx
is out of bounds.
Sourcepub fn iter(&self) -> VecxRawIter<'_> ⓘ
pub fn iter(&self) -> VecxRawIter<'_> ⓘ
Returns an iterator over the vector’s values.
Sourcepub fn iter_mut(&mut self) -> MapxOrdRawValueIterMut<'_, usize> ⓘ
pub fn iter_mut(&mut self) -> MapxOrdRawValueIterMut<'_, usize> ⓘ
Returns a mutable iterator over the vector’s values.
Sourcepub fn is_the_same_instance(&self, other_hdr: &Self) -> bool
pub fn is_the_same_instance(&self, other_hdr: &Self) -> bool
Checks if this VecxRaw
instance is the same as another.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for VecxRaw
impl<'de> Deserialize<'de> for VecxRaw
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 VecxRaw
impl StructuralPartialEq for VecxRaw
Auto Trait Implementations§
impl !Freeze for VecxRaw
impl RefUnwindSafe for VecxRaw
impl Send for VecxRaw
impl Sync for VecxRaw
impl Unpin for VecxRaw
impl UnwindSafe for VecxRaw
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