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§
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>>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".