Struct versatile_data::IdxBinary
source · pub struct IdxBinary { /* private fields */ }
Implementations§
source§impl IdxBinary
impl IdxBinary
sourcepub fn new<P>(directory: P, allocation_lot: u32) -> IdxBinary
pub fn new<P>(directory: P, allocation_lot: u32) -> IdxBinary
Opens the file and creates the IdxBinary.
§Arguments
path
- Path of directory to save data.allocation_lot
- Extends the specified size when the file size becomes insufficient due to data addition. If you expect to add a lot of data, specifying a larger size will improve performance.
sourcepub fn new_ext<P>(path: P, allocation_lot: u32) -> IdxBinary
pub fn new_ext<P>(path: P, allocation_lot: u32) -> IdxBinary
Opens the file and creates the IdxBinary. /// # Arguments
path
- Path of part of filename without extension to save data.allocation_lot
- Extends the specified size when the file size becomes insufficient due to data addition. If you expect to add a lot of data, specifying a larger size will improve performance.
sourcepub fn row_or_insert(&mut self, content: &[u8]) -> NonZero<u32>
pub fn row_or_insert(&mut self, content: &[u8]) -> NonZero<u32>
Finds a sequence of bytes, inserts it if it doesn’t exist, and returns a row.
Trait Implementations§
source§impl AvltrieeSearch<DataAddress, [u8], IdxFileAllocator<DataAddress>> for IdxBinary
impl AvltrieeSearch<DataAddress, [u8], IdxFileAllocator<DataAddress>> for IdxBinary
fn cmp(left: &[u8], right: &[u8]) -> Ordering
fn invert<'a>(&'a self, value: &'a DataAddress) -> &'a [u8] ⓘ
§fn edge(&self, value: &I) -> (Option<NonZero<u32>>, Ordering)
fn edge(&self, value: &I) -> (Option<NonZero<u32>>, Ordering)
Finds the edge of a node from the specified value.
§fn value<'a>(&'a self, row: NonZero<u32>) -> Option<&'a I>where
A: 'a,
T: 'a,
fn value<'a>(&'a self, row: NonZero<u32>) -> Option<&'a I>where
A: 'a,
T: 'a,
Returns the value of the specified row. Returns None if the row does not exist.
§unsafe fn value_unchecked<'a>(&'a self, row: NonZero<u32>) -> &'a Iwhere
A: 'a,
T: 'a,
unsafe fn value_unchecked<'a>(&'a self, row: NonZero<u32>) -> &'a Iwhere
A: 'a,
T: 'a,
Returns the value of the specified row.
Auto Trait Implementations§
impl RefUnwindSafe for IdxBinary
impl Send for IdxBinary
impl Sync for IdxBinary
impl Unpin for IdxBinary
impl UnwindSafe for IdxBinary
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