pub struct ScopedDatabaseOptions<'env> { /* private fields */ }Expand description
Builder for creating scoped databases with flexible type configurations
Implementations§
Source§impl<'env> ScopedDatabaseOptions<'env>
impl<'env> ScopedDatabaseOptions<'env>
Sourcepub fn new(env: &'env Env, global_registry: Arc<GlobalScopeRegistry>) -> Self
pub fn new(env: &'env Env, global_registry: Arc<GlobalScopeRegistry>) -> Self
Create a new options builder
Sourcepub fn with_registry(self, _registry: Arc<GlobalScopeRegistry>) -> Self
pub fn with_registry(self, _registry: Arc<GlobalScopeRegistry>) -> Self
Alias for backward compatibility
Sourcepub fn types<K, V>(self) -> TypedOptions<'env, K, V>where
K: Serialize + for<'de> Deserialize<'de> + Clone + 'static,
V: Serialize + for<'de> Deserialize<'de> + 'static,
pub fn types<K, V>(self) -> TypedOptions<'env, K, V>where
K: Serialize + for<'de> Deserialize<'de> + Clone + 'static,
V: Serialize + for<'de> Deserialize<'de> + 'static,
Configure database with generic key and value types using SerdeBincode Keys and values are serialized using bincode
Sourcepub fn bytes_keys<V>(self) -> BytesKeysOptions<'env, V>where
V: Serialize + for<'de> Deserialize<'de> + 'static,
pub fn bytes_keys<V>(self) -> BytesKeysOptions<'env, V>where
V: Serialize + for<'de> Deserialize<'de> + 'static,
Configure database with raw byte slice keys (&u8) and serialized values Keys are stored as-is without serialization, values use bincode
Sourcepub fn raw_bytes(self) -> RawBytesOptions<'env>
pub fn raw_bytes(self) -> RawBytesOptions<'env>
Configure database with raw byte slice keys and values (no serialization) Both keys and values are stored as raw bytes without any encoding
Auto Trait Implementations§
impl<'env> Freeze for ScopedDatabaseOptions<'env>
impl<'env> RefUnwindSafe for ScopedDatabaseOptions<'env>
impl<'env> Send for ScopedDatabaseOptions<'env>
impl<'env> Sync for ScopedDatabaseOptions<'env>
impl<'env> Unpin for ScopedDatabaseOptions<'env>
impl<'env> UnsafeUnpin for ScopedDatabaseOptions<'env>
impl<'env> UnwindSafe for ScopedDatabaseOptions<'env>
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