pub struct ArtifactStore { /* private fields */ }Implementations§
Source§impl ArtifactStore
impl ArtifactStore
pub fn new(db: Database) -> ArtifactStore
pub async fn save(&self, artifact: &Artifact) -> Result<(), ServerError>
pub async fn get( &self, artifact_id: &str, ) -> Result<Option<Artifact>, ServerError>
pub async fn list_by_task( &self, task_id: &str, ) -> Result<Vec<Artifact>, ServerError>
pub async fn list_by_task_and_type( &self, task_id: &str, artifact_type: &ArtifactType, ) -> Result<Vec<Artifact>, ServerError>
Sourcepub async fn list_by_tasks(
&self,
task_ids: &[String],
) -> Result<HashMap<String, Vec<Artifact>>, ServerError>
pub async fn list_by_tasks( &self, task_ids: &[String], ) -> Result<HashMap<String, Vec<Artifact>>, ServerError>
Batch load artifacts for multiple tasks
Returns a HashMap<task_id, Vec
Trait Implementations§
Source§impl Clone for ArtifactStore
impl Clone for ArtifactStore
Source§fn clone(&self) -> ArtifactStore
fn clone(&self) -> ArtifactStore
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto 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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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