pub struct StoreRequest<'a> {
pub context: AssetContext,
pub asset_id: Option<&'a str>,
pub filename: &'a str,
pub mime_type: Option<String>,
pub remote_url: Option<String>,
pub data: &'a [u8],
}Expand description
Parameters for AssetManager::store.
Fields§
§context: AssetContextContext the asset is attached to.
asset_id: Option<&'a str>Stable identifier for the asset.
Dual-mode:
Some("att-42")— caller-provided ID, typically the provider’s native attachment identifier (ClickUp attachment id, Jira attachment id, GitLab upload URL, etc.). This enables cache-hit lookups when the same attachment is requested again.None— auto-generate a content-addressed ID from the SHA-256 ofdata. The generated ID has the formsha256:{16 hex chars}and provides natural deduplication: storing the same bytes twice hits the same cache entry.
Callers can also pre-compute a content ID via
AssetManager::content_id if they want to check for existence
before downloading.
filename: &'a str§mime_type: Option<String>MIME type if known.
remote_url: Option<String>Remote URL at the provider if known.
data: &'a [u8]Raw bytes to cache.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for StoreRequest<'a>
impl<'a> RefUnwindSafe for StoreRequest<'a>
impl<'a> Send for StoreRequest<'a>
impl<'a> Sync for StoreRequest<'a>
impl<'a> Unpin for StoreRequest<'a>
impl<'a> UnsafeUnpin for StoreRequest<'a>
impl<'a> UnwindSafe for StoreRequest<'a>
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