pub struct HiveBox<T: HiveBoxable> {
pub sled: Db,
pub path: Option<Arc<PathBuf>>,
/* private fields */
}
Fields§
§sled: Db
§path: Option<Arc<PathBuf>>
Implementations§
Source§impl<T: HiveBoxable> HiveBox<T>
impl<T: HiveBoxable> HiveBox<T>
pub fn new(path: impl AsRef<Path>) -> Result<Self, Error>
pub fn memory() -> Result<Self, Error>
pub fn insert(&self, key: &str, value: T) -> Result<(), HiveError>
pub fn insert_bytes( &self, key: impl AsRef<[u8]>, bytes: impl Into<IVec>, ) -> Result<(), HiveError>
pub fn get(&self, key: &str) -> Result<T, HiveError>
pub fn iter(&self) -> impl Iterator<Item = T>
pub fn vec(&self) -> Vec<T>
pub fn remove(&self, key: &str) -> Result<(), Error>
Trait Implementations§
Source§impl<I: HiveBoxable> PartialEq for HiveBox<I>
impl<I: HiveBoxable> PartialEq for HiveBox<I>
Auto Trait Implementations§
impl<T> Freeze for HiveBox<T>
impl<T> !RefUnwindSafe for HiveBox<T>
impl<T> Send for HiveBox<T>where
T: Send,
impl<T> Sync for HiveBox<T>where
T: Sync,
impl<T> Unpin for HiveBox<T>where
T: Unpin,
impl<T> !UnwindSafe for HiveBox<T>
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