pub struct MemoryStore { /* private fields */ }Expand description
In-memory stage store for testing and development.
Implementations§
Trait Implementations§
Source§impl Debug for MemoryStore
impl Debug for MemoryStore
Source§impl Default for MemoryStore
impl Default for MemoryStore
Source§fn default() -> MemoryStore
fn default() -> MemoryStore
Returns the “default value” for a type. Read more
Source§impl StageStore for MemoryStore
impl StageStore for MemoryStore
fn put(&mut self, stage: Stage) -> Result<StageId, StoreError>
Source§fn upsert(&mut self, stage: Stage) -> Result<StageId, StoreError>
fn upsert(&mut self, stage: Stage) -> Result<StageId, StoreError>
Insert a stage, replacing any existing stage with the same ID.
Used to upgrade unsigned stdlib stages after signing is added.
Source§fn remove(&mut self, id: &StageId) -> Result<(), StoreError>
fn remove(&mut self, id: &StageId) -> Result<(), StoreError>
Remove a stage entirely. Returns
Ok(()) whether or not the stage existed.fn get(&self, id: &StageId) -> Result<Option<&Stage>, StoreError>
fn contains(&self, id: &StageId) -> bool
fn list(&self, lifecycle: Option<&StageLifecycle>) -> Vec<&Stage>
fn update_lifecycle( &mut self, id: &StageId, lifecycle: StageLifecycle, ) -> Result<(), StoreError>
fn stats(&self) -> StoreStats
Source§fn get_owned(&self, id: &StageId) -> Result<Option<Stage>, StoreError>
fn get_owned(&self, id: &StageId) -> Result<Option<Stage>, StoreError>
Return an owned clone of the stage. Useful for async contexts where
holding a borrow across lock boundaries is not permitted.
Source§fn list_owned(&self, lifecycle: Option<&StageLifecycle>) -> Vec<Stage>
fn list_owned(&self, lifecycle: Option<&StageLifecycle>) -> Vec<Stage>
Return owned clones of all matching stages.
Source§fn find_by_name(&self, name: &str) -> Vec<&Stage>
fn find_by_name(&self, name: &str) -> Vec<&Stage>
Find all stages whose metadata
name field matches exactly.
Used by graph loaders so composition files can reference stages
by their human-authored name instead of their 8-char content-hash
prefix. Returns every match across all lifecycles; callers
typically filter for Active.Auto Trait Implementations§
impl Freeze for MemoryStore
impl RefUnwindSafe for MemoryStore
impl Send for MemoryStore
impl Sync for MemoryStore
impl Unpin for MemoryStore
impl UnsafeUnpin for MemoryStore
impl UnwindSafe for MemoryStore
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