pub struct SledConfig {
pub path: String,
pub cache_capacity: Bytesize,
pub cleanup_f: fn(&SledStorageDB),
}
Expand description
Configuration for Sled storage backend
Fields§
§path: String
Path to database directory
cache_capacity: Bytesize
Cache capacity in bytes
cleanup_f: fn(&SledStorageDB)
Cleanup function for expired keys
Implementations§
Source§impl SledConfig
impl SledConfig
Sourcepub fn to_sled_config(&self) -> Result<Config>
pub fn to_sled_config(&self) -> Result<Config>
Converts to Sled’s native configuration
Trait Implementations§
Source§impl Clone for SledConfig
impl Clone for SledConfig
Source§fn clone(&self) -> SledConfig
fn clone(&self) -> SledConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for SledConfig
impl Debug for SledConfig
Source§impl Default for SledConfig
impl Default for SledConfig
Source§impl<'de> Deserialize<'de> for SledConfig
impl<'de> Deserialize<'de> for SledConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for SledConfig
impl RefUnwindSafe for SledConfig
impl Send for SledConfig
impl Sync for SledConfig
impl Unpin for SledConfig
impl UnwindSafe for SledConfig
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