Skip to main content

Plugin

Trait Plugin 

Source
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§

Source

fn init(command: &mut CommandInit) -> Result<Self, Box<dyn Error>>
where Self: Sized,

Called to initialize the plug-in.

Provided Methods§

Source

fn setting(&mut self, command: &mut CommandSetting)

Called when a CommandSetting is sent to the plug-in.

Source

fn quit(&mut self, command: &mut CommandQuit)

Called when a CommandQuit is sent to the plug-in.

Source

fn key_down(&mut self, command: &mut CommandKeyDown)

Called when a CommandKeyDown is sent to the plug-in.

Source

fn key_up(&mut self, command: &mut CommandKeyUp)

Called when a CommandKeyUp is sent to the plug-in.

Source

fn camera_connected(&mut self, command: &mut CommandCameraConnected)

Called when a CommandCameraConnected is sent to the plug-in.

Source

fn camera_disconnected(&mut self, command: &mut CommandCameraDisconnected)

Called when a CommandCameraDisconnected is sent to the plug-in.

Source

fn frame(&mut self, command: &mut CommandFrame)

Called when a CommandFrame is sent to the plug-in.

Source

fn grabbed(&mut self, command: &mut CommandGrabbed)

Called when a CommandGrabbed is sent to the plug-in.

Source

fn mouse_down(&mut self, command: &mut CommandMouseDown)

Called when a CommandMouseDown is sent to the plug-in.

Source

fn mouse_up(&mut self, command: &mut CommandMouseUp)

Called when a CommandMouseUp is sent to the plug-in.

Source

fn mouse_scroll(&mut self, command: &mut CommandMouseScroll)

Called when a CommandMouseScroll is sent to the plug-in.

Source

fn photo(&mut self, command: &mut CommandPhoto)

Called when a CommandPhoto is sent to the plug-in.

Source

fn photo_ok(&mut self, command: &mut CommandPhotoOk)

Called when a CommandPhotoOk is sent to the plug-in.

Source

fn photo_error(&mut self, command: &mut CommandPhotoError)

Called when a CommandPhotoError is sent to the plug-in.

Source

fn video_start(&mut self, command: &mut CommandVideoStart)

Called when a CommandVideoStart is sent to the plug-in.

Source

fn video_started(&mut self, command: &mut CommandVideoStarted)

Called when a CommandVideoStarted is sent to the plug-in.

Source

fn video_stop(&mut self, command: &mut CommandVideoStop)

Called when a CommandVideoStop is sent to the plug-in.

Source

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".

Implementors§