Skip to main content

ScopedDatabaseOptions

Struct ScopedDatabaseOptions 

Source
pub struct ScopedDatabaseOptions<'env> { /* private fields */ }
Expand description

Builder for creating scoped databases with flexible type configurations

Implementations§

Source§

impl<'env> ScopedDatabaseOptions<'env>

Source

pub fn new(env: &'env Env, global_registry: Arc<GlobalScopeRegistry>) -> Self

Create a new options builder

Source

pub fn with_registry(self, _registry: Arc<GlobalScopeRegistry>) -> Self

Alias for backward compatibility

Source

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

Source

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

Source

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V