pub trait AssetHandle:
Send
+ Sync
+ Debug {
// Required methods
fn content_type(&self) -> Option<Cow<'_, str>>;
fn stream_to(&self, writer: &mut dyn Write) -> Result<u64>;
fn asset_id(&self) -> &str;
}Expand description
A self-contained handle to a single embedded asset.
Returned by readers inside ImageSource::Asset(Arc<dyn AssetHandle>).
The handle carries everything needed to resolve content type and stream
bytes — no external provider lookup is required.
Required Methods§
Sourcefn content_type(&self) -> Option<Cow<'_, str>>
fn content_type(&self) -> Option<Cow<'_, str>>
MIME content type (e.g. "image/png"). None means unknown.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".