pub struct RawImage { /* private fields */ }Implementations§
Source§impl RawImage
impl RawImage
pub fn new( width: u32, height: u32, layout: PixelLayout, pixels: &[u8], ) -> Result<Self, RenderError>
pub fn width(&self) -> u32
pub fn height(&self) -> u32
pub fn with_raster(&self, raster: Raster) -> Result<Self, RenderError>
pub fn encode(&self, format: ImageFormat) -> Result<Vec<u8>, RenderError>
pub fn encode_base64(&self, format: ImageFormat) -> Result<String, RenderError>
Trait Implementations§
impl StructuralPartialEq for RawImage
Auto Trait Implementations§
impl Freeze for RawImage
impl RefUnwindSafe for RawImage
impl Send for RawImage
impl Sync for RawImage
impl Unpin for RawImage
impl UnsafeUnpin for RawImage
impl UnwindSafe for RawImage
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