pub struct ImageDisplay { /* private fields */ }Expand description
A high-level interface for displaying images in the terminal
Implementations§
Source§impl ImageDisplay
impl ImageDisplay
Sourcepub fn quiet(self, mode: u8) -> Self
pub fn quiet(self, mode: u8) -> Self
Set quiet mode (0 = all responses, 1 = suppress OK, 2 = suppress all)
Sourcepub fn display_png_file<P: AsRef<Path>>(&self, path: P) -> Result<()>
pub fn display_png_file<P: AsRef<Path>>(&self, path: P) -> Result<()>
Display a PNG image from file
Sourcepub fn display_png(&self, data: &[u8]) -> Result<()>
pub fn display_png(&self, data: &[u8]) -> Result<()>
Display a PNG image from memory
Sourcepub fn display_rgba(&self, data: &[u8], width: u32, height: u32) -> Result<()>
pub fn display_rgba(&self, data: &[u8], width: u32, height: u32) -> Result<()>
Display raw RGBA data
Sourcepub fn display_rgb(&self, data: &[u8], width: u32, height: u32) -> Result<()>
pub fn display_rgb(&self, data: &[u8], width: u32, height: u32) -> Result<()>
Display raw RGB data
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ImageDisplay
impl RefUnwindSafe for ImageDisplay
impl Send for ImageDisplay
impl Sync for ImageDisplay
impl Unpin for ImageDisplay
impl UnsafeUnpin for ImageDisplay
impl UnwindSafe for ImageDisplay
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