Struct idx_binary::IdxFile
source · pub struct IdxFile<T, I = T>where
I: ?Sized,{ /* private fields */ }
Implementations§
source§impl<T, I> IdxFile<T, I>where
I: ?Sized,
impl<T, I> IdxFile<T, I>where
I: ?Sized,
sourcepub fn new<P>(path: P, allocation_lot: u32) -> IdxFile<T, I>
pub fn new<P>(path: P, allocation_lot: u32) -> IdxFile<T, I>
Opens the file and creates the IdxFile
§Arguments
path
- Path of file to save dataallocation_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.
Methods from Deref<Target = Avltriee<T, I, IdxFileAllocator<T>>>§
pub fn rows_count(&self) -> u32
pub fn rows_count(&self) -> u32
Return count of rows.
pub fn iter(&self) -> AvltrieeIter<'_, T, I, A> ⓘ
pub fn iter(&self) -> AvltrieeIter<'_, T, I, A> ⓘ
Generate an iterator.
pub fn desc_iter(&self) -> AvltrieeIter<'_, T, I, A> ⓘ
pub fn desc_iter(&self) -> AvltrieeIter<'_, T, I, A> ⓘ
Generate an iterator. Iterates in descending order.
pub fn iter_by<'a>(&'a self, value: &I) -> AvltrieeIter<'a, T, I, A> ⓘwhere
Avltriee<T, I, A>: AvltrieeSearch<T, I, A>,
pub fn iter_by<'a>(&'a self, value: &I) -> AvltrieeIter<'a, T, I, A> ⓘwhere
Avltriee<T, I, A>: AvltrieeSearch<T, I, A>,
Generates an iterator of nodes with the same value as the specified value.
pub fn iter_from<'a>(&'a self, value: &I) -> AvltrieeIter<'a, T, I, A> ⓘwhere
Avltriee<T, I, A>: AvltrieeSearch<T, I, A>,
pub fn iter_from<'a>(&'a self, value: &I) -> AvltrieeIter<'a, T, I, A> ⓘwhere
Avltriee<T, I, A>: AvltrieeSearch<T, I, A>,
Generates an iterator with values starting from the specified value.
pub fn desc_iter_from<'a>(&'a self, value: &I) -> AvltrieeIter<'a, T, I, A> ⓘwhere
Avltriee<T, I, A>: AvltrieeSearch<T, I, A>,
pub fn desc_iter_from<'a>(&'a self, value: &I) -> AvltrieeIter<'a, T, I, A> ⓘwhere
Avltriee<T, I, A>: AvltrieeSearch<T, I, A>,
Generates an iterator with values starting from the specified value. Iterates in descending order.
pub fn iter_to<'a>(&'a self, value: &I) -> AvltrieeIter<'a, T, I, A> ⓘwhere
Avltriee<T, I, A>: AvltrieeSearch<T, I, A>,
pub fn iter_to<'a>(&'a self, value: &I) -> AvltrieeIter<'a, T, I, A> ⓘwhere
Avltriee<T, I, A>: AvltrieeSearch<T, I, A>,
Generates an iterator of nodes with values less than or equal to the specified value.
pub fn desc_iter_to<'a>(&'a self, value: &I) -> AvltrieeIter<'a, T, I, A> ⓘwhere
Avltriee<T, I, A>: AvltrieeSearch<T, I, A>,
pub fn desc_iter_to<'a>(&'a self, value: &I) -> AvltrieeIter<'a, T, I, A> ⓘwhere
Avltriee<T, I, A>: AvltrieeSearch<T, I, A>,
Generates an iterator of nodes with values less than or equal to the specified value. Iterates in descending order.
pub fn iter_over<'a>(&'a self, value: &I) -> AvltrieeIter<'a, T, I, A> ⓘwhere
Avltriee<T, I, A>: AvltrieeSearch<T, I, A>,
pub fn iter_over<'a>(&'a self, value: &I) -> AvltrieeIter<'a, T, I, A> ⓘwhere
Avltriee<T, I, A>: AvltrieeSearch<T, I, A>,
Generates an iterator of nodes with values greater than the specified value.
pub fn desc_iter_over<'a>(&'a self, value: &I) -> AvltrieeIter<'a, T, I, A> ⓘwhere
Avltriee<T, I, A>: AvltrieeSearch<T, I, A>,
pub fn desc_iter_over<'a>(&'a self, value: &I) -> AvltrieeIter<'a, T, I, A> ⓘwhere
Avltriee<T, I, A>: AvltrieeSearch<T, I, A>,
Generates an iterator of nodes with values greater than the specified value. Iterates in descending order.
pub fn iter_under<'a>(&'a self, value: &I) -> AvltrieeIter<'a, T, I, A> ⓘwhere
Avltriee<T, I, A>: AvltrieeSearch<T, I, A>,
pub fn iter_under<'a>(&'a self, value: &I) -> AvltrieeIter<'a, T, I, A> ⓘwhere
Avltriee<T, I, A>: AvltrieeSearch<T, I, A>,
Generates an iterator of nodes with values less than the specified value.
pub fn desc_iter_under<'a>(&'a self, value: &I) -> AvltrieeIter<'a, T, I, A> ⓘwhere
Avltriee<T, I, A>: AvltrieeSearch<T, I, A>,
pub fn desc_iter_under<'a>(&'a self, value: &I) -> AvltrieeIter<'a, T, I, A> ⓘwhere
Avltriee<T, I, A>: AvltrieeSearch<T, I, A>,
Generates an iterator of nodes with values less than the specified value. Iterates in descending order.
pub fn iter_range<'a>(&'a self, start: &I, end: &I) -> AvltrieeIter<'a, T, I, A> ⓘwhere
Avltriee<T, I, A>: AvltrieeSearch<T, I, A>,
pub fn iter_range<'a>(&'a self, start: &I, end: &I) -> AvltrieeIter<'a, T, I, A> ⓘwhere
Avltriee<T, I, A>: AvltrieeSearch<T, I, A>,
Generates an iterator of nodes with the specified range of values.
pub fn desc_iter_range<'a>(
&'a self,
start: &I,
end: &I
) -> AvltrieeIter<'a, T, I, A> ⓘwhere
Avltriee<T, I, A>: AvltrieeSearch<T, I, A>,
pub fn desc_iter_range<'a>(
&'a self,
start: &I,
end: &I
) -> AvltrieeIter<'a, T, I, A> ⓘwhere
Avltriee<T, I, A>: AvltrieeSearch<T, I, A>,
Generates an iterator of nodes with the specified range of values. Iterates in descending order.
pub unsafe fn insert_unique_unchecked(
&mut self,
row: NonZero<u32>,
value: T,
edge: (Option<NonZero<u32>>, Ordering)
)
pub unsafe fn insert_unique_unchecked( &mut self, row: NonZero<u32>, value: T, edge: (Option<NonZero<u32>>, Ordering) )
Insert a unique value. If you specify a row that does not exist, space will be automatically allocated. If you specify a row that is too large, memory may be allocated unnecessarily.
§Safety
value must be unique.
pub fn node(&self, row: NonZero<u32>) -> Option<&AvltrieeNode<T>>
pub fn node(&self, row: NonZero<u32>) -> Option<&AvltrieeNode<T>>
Returns the node of the specified row.