Be aware: Foundation will NEVER ask for your seed words, device PIN, or call you unexpectedly. If anyone does, it's a scam.

Struct

CameraApi

pub struct CameraApi<P: CheckedPermissions>(/* private fields */);

Implementations

impl<P: CheckedPermissions> CameraApi<P>

pub fn try_new_with_timeout(timeout: Duration) -> Option<Self>

Permission: not needed

pub fn subscribe<S>( &self, context: &mut ServerContext<S>, ) -> Result<(), SubscriptionError>
where S: Server + ScalarEventHandler<Frame>, P: MessageAllowed<Subscribe>,

Permission: os/camera / Subscribe

Permission group: peripherals.camera-use

Required signature: thirdParty

Approval: grantOnFirstUse

Start requesting camera frames. Cheap because the frames are not actually sent, but mirrored on the client side. The event is sent when a new frame is available.

pub fn is_enabled(&self) -> bool
where P: MessageAllowed<IsEnabled>,

Permission: os/camera / IsEnabled

Permission group: peripherals.camera-status

Required signature: thirdParty

Approval: autoAllow

pub fn is_in_use(&self) -> bool
where P: MessageAllowed<IsInUse>,

Permission: os/camera / IsInUse

Permission group: peripherals.camera-status

Required signature: thirdParty

Approval: autoAllow

Trait Implementations

impl<P: Default + CheckedPermissions> Default for CameraApi<P>

fn default() -> CameraApi<P>

Returns the “default value” for a type. Read more

Auto Trait Implementations

impl<P> Freeze for CameraApi<P>

impl<P> RefUnwindSafe for CameraApi<P>

impl<P> Send for CameraApi<P>

impl<P> Sync for CameraApi<P>

impl<P> Unpin for CameraApi<P>

impl<P> UnsafeUnpin for CameraApi<P>

impl<P> UnwindSafe for CameraApi<P>