pub struct StorageManager { /* private fields */ }Expand description
Owns the set of declared storage items for a single workflow run and
routes operations to the appropriate backend. Built once in
[crate::run::execute] and threaded through to every step.
Implementations§
Source§impl StorageManager
impl StorageManager
Sourcepub fn build(
storage: &HashMap<String, StorageSpec>,
backend: FilesystemBackend,
) -> Result<Self, ZigError>
pub fn build( storage: &HashMap<String, StorageSpec>, backend: FilesystemBackend, ) -> Result<Self, ZigError>
Build a manager from the workflow’s storage table, wiring every
entry to a shared FilesystemBackend. Calls ensure on each
item so downstream steps can trust that the path is live.
Sourcepub fn iter(&self) -> impl Iterator<Item = &StorageItem>
pub fn iter(&self) -> impl Iterator<Item = &StorageItem>
Iterate over every declared item, regardless of scoping.
Sourcepub fn items_for_step(&self, scope: Option<&[String]>) -> Vec<&StorageItem>
pub fn items_for_step(&self, scope: Option<&[String]>) -> Vec<&StorageItem>
Return the items a step is allowed to see, applying the step’s
storage scoping field.
scope = None(field omitted) → every declared item.scope = Some(&[])→ no items.scope = Some(names)→ only items whose name appears innames.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for StorageManager
impl !RefUnwindSafe for StorageManager
impl Send for StorageManager
impl Sync for StorageManager
impl Unpin for StorageManager
impl UnsafeUnpin for StorageManager
impl !UnwindSafe for StorageManager
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