pub struct ArtifactStore { /* private fields */ }Expand description
Server-owned filesystem artifact store.
Implementations§
Source§impl ArtifactStore
impl ArtifactStore
pub fn new( directory: impl AsRef<Path>, inline_limit_bytes: usize, chunk_size: usize, retention: Duration, max_total_bytes: u64, ) -> Result<Self, ArtifactStoreError>
pub fn inline_limit_bytes(&self) -> usize
pub fn chunk_size(&self) -> usize
pub fn persist_json( &self, bytes: &[u8], ) -> Result<ResultArtifactRefMsg, ArtifactStoreError>
pub fn read_chunk( &self, artifact_id: &str, offset: u64, ) -> Result<ArtifactChunk, ArtifactStoreError>
pub fn delete(&self, artifact_id: &str) -> Result<bool, ArtifactStoreError>
pub fn cleanup_expired(&self) -> Result<usize, ArtifactStoreError>
Trait Implementations§
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more