pub struct LocalExportSink { /* private fields */ }Expand description
Writes under root/<cell_id>/ using sanitized artifact name as filename.
Implementations§
Source§impl LocalExportSink
impl LocalExportSink
pub fn new( root: impl Into<PathBuf>, cell_id: impl Into<String>, ) -> Result<Self, CellosError>
Sourcepub async fn push_with_len(
&self,
name: &str,
src: &Path,
) -> Result<u64, CellosError>
pub async fn push_with_len( &self, name: &str, src: &Path, ) -> Result<u64, CellosError>
Bytes written (for observability).
Trait Implementations§
Source§impl ExportSink for LocalExportSink
impl ExportSink for LocalExportSink
Source§fn target_kind(&self) -> Option<ExportReceiptTargetKind>
fn target_kind(&self) -> Option<ExportReceiptTargetKind>
Best-effort hint for the target kind this sink writes to. Used for
target-aware failure events when a push fails before a full receipt exists.
Source§fn destination_hint(&self, name: &str) -> Option<String>
fn destination_hint(&self, name: &str) -> Option<String>
Best-effort destination hint for observability. Successful pushes should
return the concrete destination in
ExportReceipt.Source§fn push<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
name: &'life1 str,
path: &'life2 str,
_metadata: &'life3 ExportArtifactMetadata,
) -> Pin<Box<dyn Future<Output = Result<ExportReceipt, CellosError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn push<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
name: &'life1 str,
path: &'life2 str,
_metadata: &'life3 ExportArtifactMetadata,
) -> Pin<Box<dyn Future<Output = Result<ExportReceipt, CellosError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Push an artifact and return the resulting receipt for observability.
Auto Trait Implementations§
impl Freeze for LocalExportSink
impl RefUnwindSafe for LocalExportSink
impl Send for LocalExportSink
impl Sync for LocalExportSink
impl Unpin for LocalExportSink
impl UnsafeUnpin for LocalExportSink
impl UnwindSafe for LocalExportSink
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