pub struct ArtifactStore { /* private fields */ }Expand description
In-memory versioned artifact store.
Implementations§
Source§impl ArtifactStore
impl ArtifactStore
pub fn new(max_history: usize) -> Self
pub fn get(&self, id: &str) -> Option<&Artifact>
pub fn current_version(&self, id: &str) -> Option<u64>
Sourcepub fn apply(&mut self, envelope: &Envelope) -> Result<(Artifact, Envelope)>
pub fn apply(&mut self, envelope: &Envelope) -> Result<(Artifact, Envelope)>
Apply an envelope. Returns (Artifact, Handle).
pub fn checksum(&self, id: &str) -> Result<String>
pub fn rollback(&mut self, id: &str, target_version: u64) -> Result<Artifact>
Trait Implementations§
Source§impl Debug for ArtifactStore
impl Debug for ArtifactStore
Source§impl Default for ArtifactStore
impl Default for ArtifactStore
Source§fn default() -> ArtifactStore
fn default() -> ArtifactStore
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ArtifactStore
impl RefUnwindSafe for ArtifactStore
impl Send for ArtifactStore
impl Sync for ArtifactStore
impl Unpin for ArtifactStore
impl UnsafeUnpin for ArtifactStore
impl UnwindSafe for ArtifactStore
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