Struct semilattice_database::BinarySet
source · pub struct BinarySet { /* private fields */ }Implementations§
source§impl BinarySet
impl BinarySet
sourcepub fn new<P>(path: P, allocation_lot: u32) -> BinarySet
pub fn new<P>(path: P, allocation_lot: u32) -> BinarySet
Opens the file and creates the BinarySet. /// # 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.
sourcepub fn bytes(&self, row: NonZeroU32) -> Option<&'static [u8]>
pub fn bytes(&self, row: NonZeroU32) -> Option<&'static [u8]>
Returns the value of the specified row. Returns None if the row does not exist.
sourcepub fn row(&self, content: &[u8]) -> Option<NonZeroU32>
pub fn row(&self, content: &[u8]) -> Option<NonZeroU32>
Search for a sequence of bytes.
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.
Auto Trait Implementations§
impl !RefUnwindSafe for BinarySet
impl !Send for BinarySet
impl !Sync for BinarySet
impl Unpin for BinarySet
impl !UnwindSafe for BinarySet
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