IdxBinary

Struct IdxBinary 

Source
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 value(&self, row: NonZero<u32>) -> Option<&[u8]>

Returns the value of the specified row. Returns None if the row does not exist.

Source§

unsafe fn value_unchecked(&self, row: NonZero<u32>) -> &[u8]

Returns the value of the specified row.

Source§

unsafe fn node_value_unchecked( &self, row: NonZero<u32>, ) -> (&AvltrieeNode<DataAddress>, &[u8])

Returns node and value of the specified row.

Source§

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

Source§

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

Search row of a value.
Source§

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

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

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

Search >= value.
Source§

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

Search <= value.
Source§

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

Search > value.
Source§

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

Search < value.
Source§

fn range(&self, start_value: &I, end_value: &I) -> Option<Range<NonZero<u32>>>

Search with range value with custom ord.
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>)

Source§

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

Creates a new row and assigns a value to it.
Source§

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

Updates the value in the specified row.
Source§

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>,

Source§

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>,

Source§

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.
Source§

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

Source§

fn vzip(self) -> V