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