Skip to main content

CommandPhoto

Struct CommandPhoto 

Source
pub struct CommandPhoto(/* private fields */);
Expand description

photo command — sent when a photo is about to be taken.

Implementations§

Source§

impl CommandPhoto

Source

pub fn path(&self) -> &str

The path where the image will be saved if the photo is taken.

Source

pub fn format(&self) -> PhotoFormat

File format of the photo that will be taken.

Source

pub fn width(&self) -> u32

Width of the image file that will be saved, in pixels.

Source

pub fn height(&self) -> u32

Height of the image file that will be saved, in pixels.

Source

pub fn cancel(&mut self)

Cancel the photo from being taken.

Source

pub fn disable_flash(&mut self)

If called, no flash will be displayed.

Source

pub fn set_camera_shader(&mut self, shader: Shader)

Set camera shader that will be used for the photo and subsequent frames.

If you want to apply this just for the photo, be sure to set it back to its old value with CommandFrame::set_camera_shader.

Source

pub fn clear_camera_shader(&mut self)

Remove camera shader for the photo and subsequent frames.

If you want to go back to having a shader again after the photo, be sure to set it back to its old value with CommandFrame::set_camera_shader.

Trait Implementations§

Source§

impl Debug for CommandPhoto

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.