Struct ratatui_image::Image
source · pub struct Image<'a> { /* private fields */ }
Expand description
Fixed size image widget that uses Protocol.
The widget does not react to area resizes, and is not even guaranteed to not overdraw. Its advantage lies in that the Protocol needs only one initial resize.
struct App {
image_static: Box<dyn Protocol>,
}
fn ui(f: &mut Frame<'_>, app: &mut App) {
let image = Image::new(app.image_static.as_ref());
f.render_widget(image, f.size());
}
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Image<'a>
impl<'a> !RefUnwindSafe for Image<'a>
impl<'a> Send for Image<'a>
impl<'a> Sync for Image<'a>
impl<'a> Unpin for Image<'a>
impl<'a> !UnwindSafe for Image<'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