Struct assembly_fdb::ro::BaseHandle
source · pub struct BaseHandle<P: Deref, T>{ /* private fields */ }
Expand description
Base type for a handle to an in-memory data structure
This is basic layout of a handle to an in-memory FDB database.
Internally, there is a pointer (&[u8]
/Box<[u8]>
/Rc<[u8]>
/Arc<Mmap>
/…)
the memory slice as well as a value that represents the
current target.
Implementations§
source§impl<P: Deref, T> BaseHandle<P, T>
impl<P: Deref, T> BaseHandle<P, T>
sourcepub fn map_into<M, O, E>(self, map: M) -> BaseResult<P, O>
pub fn map_into<M, O, E>(self, map: M) -> BaseResult<P, O>
Get the tables
source§impl<P: Deref> BaseHandle<P, ()>
impl<P: Deref> BaseHandle<P, ()>
sourcepub fn into_tables(self) -> BaseResult<P, FDBHeader>
pub fn into_tables(self) -> BaseResult<P, FDBHeader>
Get the tables
source§impl<P: Deref> BaseHandle<P, FDBHeader>
impl<P: Deref> BaseHandle<P, FDBHeader>
sourcepub fn into_table_at(
self,
index: usize,
) -> BaseResult<P, Option<FDBTableHeader>>
pub fn into_table_at( self, index: usize, ) -> BaseResult<P, Option<FDBTableHeader>>
Get the tables
sourcepub fn into_table_by_name(
self,
name: &Latin1Str,
) -> BaseResult<P, Option<FDBTableHeader>>
pub fn into_table_by_name( self, name: &Latin1Str, ) -> BaseResult<P, Option<FDBTableHeader>>
Get the tables
source§impl<P: Deref> BaseHandle<P, FDBTableHeader>
impl<P: Deref> BaseHandle<P, FDBTableHeader>
sourcepub fn into_definition(self) -> BaseResult<P, FDBTableDefHeader>
pub fn into_definition(self) -> BaseResult<P, FDBTableDefHeader>
Get the tables
sourcepub fn into_data(self) -> BaseResult<P, FDBTableDataHeader>
pub fn into_data(self) -> BaseResult<P, FDBTableDataHeader>
Get the tables
source§impl<P: Deref> BaseHandle<P, FDBTableDataHeader>
impl<P: Deref> BaseHandle<P, FDBTableDataHeader>
sourcepub fn get_bucket_for_hash(self, id: u32) -> BaseResult<P, FDBBucketHeader>
pub fn get_bucket_for_hash(self, id: u32) -> BaseResult<P, FDBBucketHeader>
Get the bucket for a particular id / hash
source§impl<'a> BaseHandle<&'a [u8], ()>
impl<'a> BaseHandle<&'a [u8], ()>
source§impl<'a> BaseHandle<&'a [u8], FDBHeader>
impl<'a> BaseHandle<&'a [u8], FDBHeader>
sourcepub fn table_count(&self) -> u32
pub fn table_count(&self) -> u32
Get the number of tables
sourcepub fn table_header_list(&self) -> Result<'a, FDBTableHeaderSlice<'a>>
pub fn table_header_list(&self) -> Result<'a, FDBTableHeaderSlice<'a>>
Get the table header slice
source§impl<'a> BaseHandle<&'a [u8], FDBTableHeader>
impl<'a> BaseHandle<&'a [u8], FDBTableHeader>
sourcepub fn table_def_header(&self) -> Result<'a, FDBTableDefHeader>
pub fn table_def_header(&self) -> Result<'a, FDBTableDefHeader>
Get the table definition header
sourcepub fn table_data_header(&self) -> Result<'a, FDBTableDataHeader>
pub fn table_data_header(&self) -> Result<'a, FDBTableDataHeader>
Get the table data header
source§impl<'a> BaseHandle<&'a [u8], FDBTableDefHeader>
impl<'a> BaseHandle<&'a [u8], FDBTableDefHeader>
sourcepub fn column_count(&self) -> u32
pub fn column_count(&self) -> u32
Get the number of columns
sourcepub fn table_name(&self) -> Result<'a, &'a Latin1Str>
pub fn table_name(&self) -> Result<'a, &'a Latin1Str>
Get the name of the table
sourcepub fn column_header_list(&self) -> Result<'a, FDBColumnHeaderSlice<'a>>
pub fn column_header_list(&self) -> Result<'a, FDBColumnHeaderSlice<'a>>
Get the column header list
source§impl<'a> BaseHandle<&'a [u8], FDBColumnHeader>
impl<'a> BaseHandle<&'a [u8], FDBColumnHeader>
sourcepub fn column_name(&self) -> Result<'a, &'a Latin1Str>
pub fn column_name(&self) -> Result<'a, &'a Latin1Str>
Get the name of the column
sourcepub fn column_data_type(&self) -> StdResult<ValueType, UnknownValueType>
pub fn column_data_type(&self) -> StdResult<ValueType, UnknownValueType>
Get the type of the column
source§impl<'a> BaseHandle<&'a [u8], FDBTableDataHeader>
impl<'a> BaseHandle<&'a [u8], FDBTableDataHeader>
sourcepub fn bucket_count(&self) -> u32
pub fn bucket_count(&self) -> u32
Get the number of buckets
sourcepub fn bucket_header_list(&self) -> Result<'a, FDBBucketHeaderSlice<'a>>
pub fn bucket_header_list(&self) -> Result<'a, FDBBucketHeaderSlice<'a>>
Get the slice of buckets
source§impl<'a> BaseHandle<&'a [u8], FDBBucketHeader>
impl<'a> BaseHandle<&'a [u8], FDBBucketHeader>
sourcepub fn first(&self) -> Option<Result<'a, FDBRowHeaderListEntry>>
pub fn first(&self) -> Option<Result<'a, FDBRowHeaderListEntry>>
Get the first row header entry or None
sourcepub fn row_header_iter(&self) -> Handle<'a, FDBRowHeaderRef> ⓘ
pub fn row_header_iter(&self) -> Handle<'a, FDBRowHeaderRef> ⓘ
Get an iterator over all buckets
source§impl<'a> BaseHandle<&'a [u8], FDBRowHeaderListEntry>
impl<'a> BaseHandle<&'a [u8], FDBRowHeaderListEntry>
sourcepub fn next(&self) -> Option<Result<'a, FDBRowHeaderListEntry>>
pub fn next(&self) -> Option<Result<'a, FDBRowHeaderListEntry>>
Get the next row header list entry instance
sourcepub fn row_header(&self) -> Result<'a, FDBRowHeader>
pub fn row_header(&self) -> Result<'a, FDBRowHeader>
Get the associated row header.
source§impl<'a> BaseHandle<&'a [u8], FDBRowHeader>
impl<'a> BaseHandle<&'a [u8], FDBRowHeader>
sourcepub fn field_count(&self) -> u32
pub fn field_count(&self) -> u32
Get the number of fields
sourcepub fn field_data_list(&self) -> Result<'a, FDBFieldDataSlice<'a>>
pub fn field_data_list(&self) -> Result<'a, FDBFieldDataSlice<'a>>
Get the slice of fields
source§impl<'a> BaseHandle<&'a [u8], FDBFieldData>
impl<'a> BaseHandle<&'a [u8], FDBFieldData>
sourcepub fn try_get_value(&self) -> Result<'a, FDBFieldValue>
pub fn try_get_value(&self) -> Result<'a, FDBFieldValue>
Get the value from this handle
source§impl<B: AsRef<[u8]>, T: Copy> BaseHandle<Arc<B>, T>
impl<B: AsRef<[u8]>, T: Copy> BaseHandle<Arc<B>, T>
sourcepub fn as_bytes_handle(&self) -> Handle<'_, T> ⓘ
pub fn as_bytes_handle(&self) -> Handle<'_, T> ⓘ
Borrow the atomically-reference counted handle as a byte handle
You can use this function to make cloning cheaper
source§impl<P: Deref> BaseHandle<P, ()>
impl<P: Deref> BaseHandle<P, ()>
source§impl<T, P: Deref> BaseHandle<P, Option<T>>
impl<T, P: Deref> BaseHandle<P, Option<T>>
sourcepub fn transpose(self) -> Option<BaseHandle<P, T>>
pub fn transpose(self) -> Option<BaseHandle<P, T>>
Turns a handle of an option into an option of a handle
source§impl<P: Deref, T> BaseHandle<P, T>
impl<P: Deref, T> BaseHandle<P, T>
sourcepub fn replace<O>(self, raw: O) -> BaseHandle<P, O>
pub fn replace<O>(self, raw: O) -> BaseHandle<P, O>
Replace the value that is stored with the memory pointer
source§impl<'a, T> BaseHandle<&'a [u8], T>
impl<'a, T> BaseHandle<&'a [u8], T>
source§impl<'a, T> BaseHandle<&'a [u8], &'a [T]>
impl<'a, T> BaseHandle<&'a [u8], &'a [T]>
Trait Implementations§
source§impl<P: Clone + Deref, T: Clone> Clone for BaseHandle<P, T>
impl<P: Clone + Deref, T: Clone> Clone for BaseHandle<P, T>
source§fn clone(&self) -> BaseHandle<P, T>
fn clone(&self) -> BaseHandle<P, T>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreimpl<P, T> Copy for BaseHandle<P, T>
Auto Trait Implementations§
impl<P, T> Freeze for BaseHandle<P, T>
impl<P, T> RefUnwindSafe for BaseHandle<P, T>where
P: RefUnwindSafe,
T: RefUnwindSafe,
impl<P, T> Send for BaseHandle<P, T>
impl<P, T> Sync for BaseHandle<P, T>
impl<P, T> Unpin for BaseHandle<P, T>
impl<P, T> UnwindSafe for BaseHandle<P, T>where
P: UnwindSafe,
T: UnwindSafe,
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)