pub trait AssetUploader {
// Required method
fn upload(&self, imported: &StreamedImport) -> Result<(), UploadHalt>;
}Expand description
The network seam the streaming window drives to hand one just-imported asset’s bundle
(original + derivatives + metadata) to the upload protocol.
Implemented by capsule-sdk/CLI over the real upload client; tests supply a deterministic
mock. Kept in capsule-core as a trait so the streaming loop — and its release gating — is
exercised without any network. Synchronous by construction: the offline data plane calls it;
async callers resolve their futures before returning.
Required Methods§
Sourcefn upload(&self, imported: &StreamedImport) -> Result<(), UploadHalt>
fn upload(&self, imported: &StreamedImport) -> Result<(), UploadHalt>
Upload the imported asset identified by imported.asset_id, whose declared blob
content-addresses are imported.blob_hashes. Returns Ok when the upload session(s)
completed (or the server already held the bytes), or an UploadHalt when the window
must pause rather than admit the next source file.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".