Struct jammdb::BucketData [−][src]
Nested bucket placeholder
This data type signifies that a given key is associated with a nested bucket.alloc
You can access the key using the name
function.
The bucket's name can be used to retreive the bucket using the get_bucket
function.
Examples
use jammdb::{DB, Data}; let db = DB::open("my.db")?; let mut tx = db.tx(true)?; let bucket = tx.create_bucket("my-bucket")?; bucket.create_bucket("my-nested-bucket")?; if let Some(data) = bucket.get("my-nested-bucket") { if let Data::Bucket(b) = &*data { let name: &[u8] = b.name(); assert_eq!(name, b"my-nested-bucket"); let nested_bucket = bucket.get_bucket(b.name()).unwrap(); } }
Implementations
impl BucketData
[src]
Trait Implementations
impl Clone for BucketData
[src]
fn clone(&self) -> BucketData
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for BucketData
[src]
impl PartialEq<BucketData> for BucketData
[src]
fn eq(&self, other: &BucketData) -> bool
[src]
fn ne(&self, other: &BucketData) -> bool
[src]
impl StructuralPartialEq for BucketData
[src]
Auto Trait Implementations
impl RefUnwindSafe for BucketData
[src]
impl !Send for BucketData
[src]
impl !Sync for BucketData
[src]
impl Unpin for BucketData
[src]
impl UnwindSafe for BucketData
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,