pub struct ScopedConfigStore { /* private fields */ }Implementations§
Source§impl ScopedConfigStore
impl ScopedConfigStore
pub fn new(inner: Arc<dyn ConfigStore>, scope_id: ScopeId) -> ScopedConfigStore
pub fn scope_id(&self) -> &ScopeId
pub fn inner(&self) -> &dyn ConfigStore
Trait Implementations§
Source§impl Clone for ScopedConfigStore
impl Clone for ScopedConfigStore
Source§fn clone(&self) -> ScopedConfigStore
fn clone(&self) -> ScopedConfigStore
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl ConfigStore for ScopedConfigStore
impl ConfigStore for ScopedConfigStore
Source§fn get<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
namespace: &'life1 str,
id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Value>, StorageError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
ScopedConfigStore: 'async_trait,
fn get<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
namespace: &'life1 str,
id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Value>, StorageError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
ScopedConfigStore: 'async_trait,
Get a single entry by namespace and ID.
Source§fn list<'life0, 'life1, 'async_trait>(
&'life0 self,
namespace: &'life1 str,
offset: usize,
limit: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<(String, Value)>, StorageError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
ScopedConfigStore: 'async_trait,
fn list<'life0, 'life1, 'async_trait>(
&'life0 self,
namespace: &'life1 str,
offset: usize,
limit: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<(String, Value)>, StorageError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
ScopedConfigStore: 'async_trait,
List entries in a namespace ordered by ID.
Source§fn put<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
namespace: &'life1 str,
id: &'life2 str,
value: &'life3 Value,
) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
ScopedConfigStore: 'async_trait,
fn put<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
namespace: &'life1 str,
id: &'life2 str,
value: &'life3 Value,
) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
ScopedConfigStore: 'async_trait,
Create or overwrite an entry.
Source§fn delete<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
namespace: &'life1 str,
id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
ScopedConfigStore: 'async_trait,
fn delete<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
namespace: &'life1 str,
id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
ScopedConfigStore: 'async_trait,
Delete an entry. Missing entries are not an error.
Source§fn put_if_absent<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
namespace: &'life1 str,
id: &'life2 str,
value: &'life3 Value,
) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
ScopedConfigStore: 'async_trait,
fn put_if_absent<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
namespace: &'life1 str,
id: &'life2 str,
value: &'life3 Value,
) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
ScopedConfigStore: 'async_trait,
Create an entry only when it does not already exist. Read more
Source§fn exists<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
namespace: &'life1 str,
id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<bool, StorageError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
ScopedConfigStore: 'async_trait,
fn exists<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
namespace: &'life1 str,
id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<bool, StorageError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
ScopedConfigStore: 'async_trait,
Check whether an entry exists.
Source§fn put_if_revision<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
namespace: &'life1 str,
id: &'life2 str,
value: &'life3 Value,
expected_revision: u64,
) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
ScopedConfigStore: 'async_trait,
fn put_if_revision<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
namespace: &'life1 str,
id: &'life2 str,
value: &'life3 Value,
expected_revision: u64,
) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
ScopedConfigStore: 'async_trait,
Atomic compare-and-set on the record’s
meta.revision. Read moreSource§fn delete_if_revision<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
namespace: &'life1 str,
id: &'life2 str,
expected_revision: u64,
) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
ScopedConfigStore: 'async_trait,
fn delete_if_revision<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
namespace: &'life1 str,
id: &'life2 str,
expected_revision: u64,
) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
ScopedConfigStore: 'async_trait,
Auto Trait Implementations§
impl !RefUnwindSafe for ScopedConfigStore
impl !UnwindSafe for ScopedConfigStore
impl Freeze for ScopedConfigStore
impl Send for ScopedConfigStore
impl Sync for ScopedConfigStore
impl Unpin for ScopedConfigStore
impl UnsafeUnpin for ScopedConfigStore
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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