Struct idx_binary::IdxBinary
source · pub struct IdxBinary { /* private fields */ }
Implementations§
source§impl IdxBinary
impl IdxBinary
sourcepub fn new<P: AsRef<Path>>(directory: P, allocation_lot: u32) -> Self
pub fn new<P: AsRef<Path>>(directory: P, allocation_lot: u32) -> Self
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: AsRef<Path>>(path: P, allocation_lot: u32) -> Self
pub fn new_ext<P: AsRef<Path>>(path: P, allocation_lot: u32) -> Self
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]) -> NonZeroU32
pub fn row_or_insert(&mut self, content: &[u8]) -> NonZeroU32
Finds a sequence of bytes, inserts it if it doesn’t exist, and returns a row.
Trait Implementations§
source§impl AsMut<Avltriee<DataAddress, [u8], IdxFileAllocator<DataAddress>>> for IdxBinary
impl AsMut<Avltriee<DataAddress, [u8], IdxFileAllocator<DataAddress>>> for IdxBinary
source§fn as_mut(&mut self) -> &mut IdxFileAvlTriee<DataAddress, [u8]>
fn as_mut(&mut self) -> &mut IdxFileAvlTriee<DataAddress, [u8]>
Converts this type into a mutable reference of the (usually inferred) input type.
source§impl AsRef<Avltriee<DataAddress, [u8], IdxFileAllocator<DataAddress>>> for IdxBinary
impl AsRef<Avltriee<DataAddress, [u8], IdxFileAllocator<DataAddress>>> for IdxBinary
source§fn as_ref(&self) -> &IdxFileAvlTriee<DataAddress, [u8]>
fn as_ref(&self) -> &IdxFileAvlTriee<DataAddress, [u8]>
Converts this type into a shared reference of the (usually inferred) input type.
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) -> &[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.
source§impl AvltrieeUpdate<DataAddress, [u8], IdxFileAllocator<DataAddress>> for IdxBinary
impl AvltrieeUpdate<DataAddress, [u8], IdxFileAllocator<DataAddress>> for IdxBinary
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