pub trait ResizeBackend: Send + Sync + DynClone {
    // Required methods
    fn rect(&self) -> Rect;
    fn render(
        &mut self,
        source: &ImageSource,
        resize: &Resize,
        background_color: Option<Rgb<u8>>,
        area: Rect,
        buf: &mut Buffer
    );

    // Provided method
    fn reset(&mut self) { ... }
}
Expand description

A resizing image backend for the crate::ResizeImage widget.

Required Methods§

source

fn rect(&self) -> Rect

source

fn render( &mut self, source: &ImageSource, resize: &Resize, background_color: Option<Rgb<u8>>, area: Rect, buf: &mut Buffer )

Provided Methods§

source

fn reset(&mut self)

This method is optional.

Trait Implementations§

source§

impl<'clone> Clone for Box<dyn ResizeBackend + 'clone>

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'clone> Clone for Box<dyn ResizeBackend + Send + 'clone>

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'clone> Clone for Box<dyn ResizeBackend + Send + Sync + 'clone>

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'clone> Clone for Box<dyn ResizeBackend + Sync + 'clone>

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Implementors§