pub struct InMemoryConfig<KeyType, ValueType> { /* private fields */ }Trait Implementations§
Source§impl<KeyType, ValueType> Config for InMemoryConfig<KeyType, ValueType>
impl<KeyType, ValueType> Config for InMemoryConfig<KeyType, ValueType>
type Error = InMemoryConfigError
type KeyType = KeyType
Source§type StaticConfigHandle = ()
type StaticConfigHandle = ()
A handle to the static configuration. Could be
a database connection, a file path, or any other
resource that provides static configuration values.
type ValueType = ValueType
Source§fn new<'async_trait>(
_handle: Self::StaticConfigHandle,
) -> Pin<Box<dyn Future<Output = Result<Self, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
fn new<'async_trait>(
_handle: Self::StaticConfigHandle,
) -> Pin<Box<dyn Future<Output = Result<Self, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
Creates a new instance of the static config.
Source§fn set<'life0, 'async_trait>(
&'life0 mut self,
key: Self::KeyType,
value: Self::ValueType,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn set<'life0, 'async_trait>(
&'life0 mut self,
key: Self::KeyType,
value: Self::ValueType,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sets a static value in the configuration.
Auto Trait Implementations§
impl<KeyType, ValueType> Freeze for InMemoryConfig<KeyType, ValueType>
impl<KeyType, ValueType> RefUnwindSafe for InMemoryConfig<KeyType, ValueType>where
HashMap<KeyType, ValueType>: RefUnwindSafe,
impl<KeyType, ValueType> Send for InMemoryConfig<KeyType, ValueType>
impl<KeyType, ValueType> Sync for InMemoryConfig<KeyType, ValueType>
impl<KeyType, ValueType> Unpin for InMemoryConfig<KeyType, ValueType>
impl<KeyType, ValueType> UnsafeUnpin for InMemoryConfig<KeyType, ValueType>where
HashMap<KeyType, ValueType>: UnsafeUnpin,
impl<KeyType, ValueType> UnwindSafe for InMemoryConfig<KeyType, ValueType>where
HashMap<KeyType, ValueType>: UnwindSafe,
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
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more