fractal::components::camera::viewfinder

Trait CameraViewfinderExt

Source
pub(super) trait CameraViewfinderExt: 'static {
    // Required methods
    fn state(&self) -> CameraViewfinderState;
    fn set_state(&self, state: CameraViewfinderState);
    fn connect_qrcode_detected<F: Fn(&Self, QrVerificationData) + 'static>(
        &self,
        f: F,
    ) -> SignalHandlerId;
    fn emit_qrcode_detected(&self, data: QrVerificationData);
}
Expand description

Trait implemented by types that subclass CameraViewfinder.

Required Methods§

Source

fn state(&self) -> CameraViewfinderState

The state of this viewfinder.

Source

fn set_state(&self, state: CameraViewfinderState)

Set the state of this viewfinder.

Source

fn connect_qrcode_detected<F: Fn(&Self, QrVerificationData) + 'static>( &self, f: F, ) -> SignalHandlerId

Connect to the signal emitted when a QR code is detected.

Source

fn emit_qrcode_detected(&self, data: QrVerificationData)

Emit the signal that a QR code was detected.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§