pub trait Plugin {
Show 19 methods
// Required method
fn init(command: &mut CommandInit) -> Result<Self, Box<dyn Error>>
where Self: Sized;
// Provided methods
fn setting(&mut self, command: &mut CommandSetting) { ... }
fn quit(&mut self, command: &mut CommandQuit) { ... }
fn key_down(&mut self, command: &mut CommandKeyDown) { ... }
fn key_up(&mut self, command: &mut CommandKeyUp) { ... }
fn camera_connected(&mut self, command: &mut CommandCameraConnected) { ... }
fn camera_disconnected(&mut self, command: &mut CommandCameraDisconnected) { ... }
fn frame(&mut self, command: &mut CommandFrame) { ... }
fn grabbed(&mut self, command: &mut CommandGrabbed) { ... }
fn mouse_down(&mut self, command: &mut CommandMouseDown) { ... }
fn mouse_up(&mut self, command: &mut CommandMouseUp) { ... }
fn mouse_scroll(&mut self, command: &mut CommandMouseScroll) { ... }
fn photo(&mut self, command: &mut CommandPhoto) { ... }
fn photo_ok(&mut self, command: &mut CommandPhotoOk) { ... }
fn photo_error(&mut self, command: &mut CommandPhotoError) { ... }
fn video_start(&mut self, command: &mut CommandVideoStart) { ... }
fn video_started(&mut self, command: &mut CommandVideoStarted) { ... }
fn video_stop(&mut self, command: &mut CommandVideoStop) { ... }
fn command(&mut self, command: &mut Command) { ... }
}Expand description
A camlet plug-in
Required Methods§
Provided Methods§
Sourcefn setting(&mut self, command: &mut CommandSetting)
fn setting(&mut self, command: &mut CommandSetting)
Called when a CommandSetting is sent to the plug-in.
Sourcefn quit(&mut self, command: &mut CommandQuit)
fn quit(&mut self, command: &mut CommandQuit)
Called when a CommandQuit is sent to the plug-in.
Sourcefn key_down(&mut self, command: &mut CommandKeyDown)
fn key_down(&mut self, command: &mut CommandKeyDown)
Called when a CommandKeyDown is sent to the plug-in.
Sourcefn key_up(&mut self, command: &mut CommandKeyUp)
fn key_up(&mut self, command: &mut CommandKeyUp)
Called when a CommandKeyUp is sent to the plug-in.
Sourcefn camera_connected(&mut self, command: &mut CommandCameraConnected)
fn camera_connected(&mut self, command: &mut CommandCameraConnected)
Called when a CommandCameraConnected is sent to the plug-in.
Sourcefn camera_disconnected(&mut self, command: &mut CommandCameraDisconnected)
fn camera_disconnected(&mut self, command: &mut CommandCameraDisconnected)
Called when a CommandCameraDisconnected is sent to the plug-in.
Sourcefn frame(&mut self, command: &mut CommandFrame)
fn frame(&mut self, command: &mut CommandFrame)
Called when a CommandFrame is sent to the plug-in.
Sourcefn grabbed(&mut self, command: &mut CommandGrabbed)
fn grabbed(&mut self, command: &mut CommandGrabbed)
Called when a CommandGrabbed is sent to the plug-in.
Sourcefn mouse_down(&mut self, command: &mut CommandMouseDown)
fn mouse_down(&mut self, command: &mut CommandMouseDown)
Called when a CommandMouseDown is sent to the plug-in.
Sourcefn mouse_up(&mut self, command: &mut CommandMouseUp)
fn mouse_up(&mut self, command: &mut CommandMouseUp)
Called when a CommandMouseUp is sent to the plug-in.
Sourcefn mouse_scroll(&mut self, command: &mut CommandMouseScroll)
fn mouse_scroll(&mut self, command: &mut CommandMouseScroll)
Called when a CommandMouseScroll is sent to the plug-in.
Sourcefn photo(&mut self, command: &mut CommandPhoto)
fn photo(&mut self, command: &mut CommandPhoto)
Called when a CommandPhoto is sent to the plug-in.
Sourcefn photo_ok(&mut self, command: &mut CommandPhotoOk)
fn photo_ok(&mut self, command: &mut CommandPhotoOk)
Called when a CommandPhotoOk is sent to the plug-in.
Sourcefn photo_error(&mut self, command: &mut CommandPhotoError)
fn photo_error(&mut self, command: &mut CommandPhotoError)
Called when a CommandPhotoError is sent to the plug-in.
Sourcefn video_start(&mut self, command: &mut CommandVideoStart)
fn video_start(&mut self, command: &mut CommandVideoStart)
Called when a CommandVideoStart is sent to the plug-in.
Sourcefn video_started(&mut self, command: &mut CommandVideoStarted)
fn video_started(&mut self, command: &mut CommandVideoStarted)
Called when a CommandVideoStarted is sent to the plug-in.
Sourcefn video_stop(&mut self, command: &mut CommandVideoStop)
fn video_stop(&mut self, command: &mut CommandVideoStop)
Called when a CommandVideoStop is sent to the plug-in.
Sourcefn command(&mut self, command: &mut Command)
fn command(&mut self, command: &mut Command)
Called whenever any command is sent to camlet.
Use at your own risk - prefer the more specific methods. If you use this you must check the result of CommandInit::version_major and CommandInit::version_minor yourself, since this library might be updated without a major version change to handle new major camlet versions. Note that if there is a specific method for a command, this will still be called after it.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".