pub struct MemoryBundleStore { /* private fields */ }Expand description
In-memory BundleStore for tests and single-node bootstrapping before
the persistent store lands.
Implementations§
Source§impl MemoryBundleStore
impl MemoryBundleStore
pub fn new() -> Self
Sourcepub fn with_defaults() -> Self
pub fn with_defaults() -> Self
Pre-seed with the doc-named bundles camp-operator and deploy-admin.
The exact scope contents are illustrative defaults — an operator-side decision in production, not a wire contract. They are here so the in-memory rig and tests have a meaningful starting point.
Trait Implementations§
Source§impl BundleStore for MemoryBundleStore
impl BundleStore for MemoryBundleStore
Source§fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 BundleName,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<Scope>>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 BundleName,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<Scope>>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
The literal scope list for
name, or None if no such bundle.Source§fn put<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
name: &'life1 BundleName,
scopes: &'life2 [Scope],
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn put<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
name: &'life1 BundleName,
scopes: &'life2 [Scope],
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Create or overwrite the bundle named
name with the supplied scopes.Source§fn delete<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 BundleName,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 BundleName,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Remove the bundle named
name. Grants still referencing it will fail
expand_scopes with BundleExpansionError::Unknown until the
stale grants are cleaned up.Source§impl Clone for MemoryBundleStore
impl Clone for MemoryBundleStore
Auto Trait Implementations§
impl Freeze for MemoryBundleStore
impl RefUnwindSafe for MemoryBundleStore
impl Send for MemoryBundleStore
impl Sync for MemoryBundleStore
impl Unpin for MemoryBundleStore
impl UnsafeUnpin for MemoryBundleStore
impl UnwindSafe for MemoryBundleStore
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