pub struct IdxBinary { /* private fields */ }

Implementations§

source§

impl IdxBinary

source

pub fn new<P>(directory: P, allocation_lot: u32) -> IdxBinary
where P: AsRef<Path>,

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.
source

pub fn new_ext<P>(path: P, allocation_lot: u32) -> IdxBinary
where P: AsRef<Path>,

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.
source

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 AsMut<Avltriee<DataAddress, [u8], IdxFileAllocator<DataAddress>>> for IdxBinary

source§

fn as_mut( &mut self ) -> &mut Avltriee<DataAddress, [u8], IdxFileAllocator<DataAddress>>

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl AsRef<Avltriee<DataAddress, [u8], IdxFileAllocator<DataAddress>>> for IdxBinary

source§

fn as_ref(&self) -> &Avltriee<DataAddress, [u8], IdxFileAllocator<DataAddress>>

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AvltrieeSearch<DataAddress, [u8], IdxFileAllocator<DataAddress>> for IdxBinary

source§

fn cmp(left: &[u8], right: &[u8]) -> Ordering

source§

fn invert<'a>(&'a self, value: &'a DataAddress) -> &'a [u8]

§

fn edge(&self, value: &I) -> (Option<NonZero<u32>>, Ordering)

Finds the edge of a node from the specified value.
§

fn row(&self, value: &I) -> Option<NonZero<u32>>

Search row of a value.
§

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 I
where A: 'a, T: 'a,

Returns the value of the specified row.
source§

impl AvltrieeUpdate<DataAddress, [u8], IdxFileAllocator<DataAddress>> for IdxBinary

source§

fn convert_on_insert_unique(&mut self, input: &[u8]) -> DataAddress

source§

fn on_delete(&mut self, row: NonZero<u32>)

§

fn update(&mut self, row: NonZero<u32>, value: &I)
where T: Clone,

Updates the value in the specified row.
§

fn delete(&mut self, row: NonZero<u32>)

Delete the specified row.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V