Skip to main content

DrawCallback

Trait DrawCallback 

Source
pub trait DrawCallback: Sync + Send {
    // Required methods
    fn init(
        &mut self,
        width: usize,
        height: usize,
        option: Option<InitOptions>,
    ) -> Result<Option<CallbackResponse>, Box<dyn Error>>;
    fn draw(
        &mut self,
        start_x: usize,
        start_y: usize,
        width: usize,
        height: usize,
        data: &[u8],
        option: Option<DrawOptions>,
    ) -> Result<Option<CallbackResponse>, Box<dyn Error>>;
    fn terminate(
        &mut self,
        term: Option<TerminateOptions>,
    ) -> Result<Option<CallbackResponse>, Box<dyn Error>>;
    fn next(
        &mut self,
        next: Option<NextOptions>,
    ) -> Result<Option<CallbackResponse>, Box<dyn Error>>;
    fn verbose(
        &mut self,
        verbose: &str,
        option: Option<VerboseOptions>,
    ) -> Result<Option<CallbackResponse>, Box<dyn Error>>;
    fn set_metadata(
        &mut self,
        key: &str,
        value: DataMap,
    ) -> Result<Option<CallbackResponse>, Box<dyn Error>>;
}
Expand description

Receives decoded image data from compatibility decode entry points.

Required Methods§

Source

fn init( &mut self, width: usize, height: usize, option: Option<InitOptions>, ) -> Result<Option<CallbackResponse>, Box<dyn Error>>

Source

fn draw( &mut self, start_x: usize, start_y: usize, width: usize, height: usize, data: &[u8], option: Option<DrawOptions>, ) -> Result<Option<CallbackResponse>, Box<dyn Error>>

Source

fn terminate( &mut self, term: Option<TerminateOptions>, ) -> Result<Option<CallbackResponse>, Box<dyn Error>>

Source

fn next( &mut self, next: Option<NextOptions>, ) -> Result<Option<CallbackResponse>, Box<dyn Error>>

Source

fn verbose( &mut self, verbose: &str, option: Option<VerboseOptions>, ) -> Result<Option<CallbackResponse>, Box<dyn Error>>

Source

fn set_metadata( &mut self, key: &str, value: DataMap, ) -> Result<Option<CallbackResponse>, Box<dyn Error>>

Implementors§