pub struct ImageAsset { /* private fields */ }Expand description
Decoded static image asset carrying format, alt text, metadata, and RGBA8 pixel buffer.
Implementations§
Source§impl ImageAsset
Built-in sample constructors and helpers for ImageAsset.
impl ImageAsset
Built-in sample constructors and helpers for ImageAsset.
Sourcepub fn sample_photo(alt_text: &str) -> Self
pub fn sample_photo(alt_text: &str) -> Self
Source§impl ImageAsset
impl ImageAsset
pub fn get_format(&self) -> ImageFormat
pub fn get_mut_format(&mut self) -> &mut ImageFormat
pub fn set_format(&mut self, val: ImageFormat) -> &mut Self
pub fn get_buffer(&self) -> &ImageBuffer
pub fn get_mut_buffer(&mut self) -> &mut ImageBuffer
pub fn set_buffer(&mut self, val: ImageBuffer) -> &mut Self
pub fn get_alt_text(&self) -> &String
pub fn get_mut_alt_text(&mut self) -> &mut String
pub fn set_alt_text(&mut self, val: String) -> &mut Self
pub fn get_metadata(&self) -> &MediaMetadata
pub fn get_mut_metadata(&mut self) -> &mut MediaMetadata
pub fn set_metadata(&mut self, val: MediaMetadata) -> &mut Self
Trait Implementations§
Source§impl Clone for ImageAsset
impl Clone for ImageAsset
Source§impl Debug for ImageAsset
impl Debug for ImageAsset
Source§impl Default for ImageAsset
impl Default for ImageAsset
Source§impl PartialEq for ImageAsset
impl PartialEq for ImageAsset
impl StructuralPartialEq for ImageAsset
Auto Trait Implementations§
impl Forget for ImageAsset
impl Freeze for ImageAsset
impl Move for ImageAsset
impl RefUnwindSafe for ImageAsset
impl Send for ImageAsset
impl Sync for ImageAsset
impl Unpin for ImageAsset
impl UnsafeUnpin for ImageAssetwhere
*const ArcInner<[u8]> is !null: UnsafeUnpin,
PhantomData<ArcInner<[u8]>>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
impl UnwindSafe for ImageAsset
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