Skip to main content

FileArtifactService

Struct FileArtifactService 

Source
pub struct FileArtifactService { /* private fields */ }
Expand description

Persist artifacts on the local filesystem.

Implementations§

Source§

impl FileArtifactService

Source

pub fn new(base_dir: impl Into<PathBuf>) -> Self

Create a new filesystem-backed artifact service rooted at base_dir.

Trait Implementations§

Source§

impl ArtifactService for FileArtifactService

Source§

fn save<'life0, 'async_trait>( &'life0 self, req: SaveRequest, ) -> Pin<Box<dyn Future<Output = Result<SaveResponse>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Store a binary artifact, returning the version that was written.
Source§

fn load<'life0, 'async_trait>( &'life0 self, req: LoadRequest, ) -> Pin<Box<dyn Future<Output = Result<LoadResponse>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Retrieve a stored artifact by filename and optional version.
Source§

fn delete<'life0, 'async_trait>( &'life0 self, req: DeleteRequest, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Delete an artifact (specific version or all versions).
Source§

fn list<'life0, 'async_trait>( &'life0 self, req: ListRequest, ) -> Pin<Box<dyn Future<Output = Result<ListResponse>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

List all artifact filenames in a session.
Source§

fn versions<'life0, 'async_trait>( &'life0 self, req: VersionsRequest, ) -> Pin<Box<dyn Future<Output = Result<VersionsResponse>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

List all available versions of a specific artifact.
Source§

fn health_check<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Verify backend connectivity. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.