Skip to main content
QAROS Rust API Dev (main) · versions: Dev (main) · Developer Guide

AppVolumes

Struct AppVolumes 

Source
pub struct AppVolumes<'session> { /* private fields */ }
Expand description

App volume operations of a session (session.app_volumes()).

Implementations§

Source§

impl<'session> AppVolumes<'session>

Source

pub fn get_or_create(&self, config: &AppVolumeConfig) -> Result<AppVolumeId>

Returns the volume named by config.common_name, creating it if needed. Idempotent.

Source

pub fn set_pose(&self, volume: AppVolumeId, pose: Pose) -> Result<()>

Moves the box (pose of its center, room space).

Source

pub fn set_size(&self, volume: AppVolumeId, size: AppVolumeSize) -> Result<()>

Resizes the box.

Source

pub fn set_app_pose(&self, volume: AppVolumeId, app_pose: Pose) -> Result<()>

Moves the content inside the box (volume meters).

Source

pub fn set_app_scale(&self, volume: AppVolumeId, app_scale: f32) -> Result<()>

Room meters per app meter.

Source

pub fn set_display_name( &self, volume: AppVolumeId, display_name: &str, ) -> Result<()>

Renames the volume (UTF-8).

Source

pub fn close(&self, volume: AppVolumeId) -> Result<()>

Closes the volume (qar_app_volumes_close_volume).

Source

pub fn latest_pose(&self, volume: AppVolumeId) -> Result<Pose>

Latest locally known pose, including changes by other peers and gestures.

Source

pub fn latest_size(&self, volume: AppVolumeId) -> Result<AppVolumeSize>

Latest locally known size.

Source

pub fn latest_app_pose(&self, volume: AppVolumeId) -> Result<Pose>

Latest locally known pose of the content inside the box.

Source

pub fn latest_app_scale(&self, volume: AppVolumeId) -> Result<f32>

Latest locally known scale, room meters per app meter.

Source

pub fn list(&self) -> Result<Vec<AppVolumeInfo>>

Snapshot of every volume known to the session.

Source

pub fn subscribe( &self, callback: impl Fn(AppVolumeInfo) + Send + Sync + 'static, ) -> Result<Subscription>

Calls callback with a snapshot whenever a volume changes. Runs on library threads.

Trait Implementations§

Source§

impl<'session> Debug for AppVolumes<'session>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'session> !RefUnwindSafe for AppVolumes<'session>

§

impl<'session> !Send for AppVolumes<'session>

§

impl<'session> !Sync for AppVolumes<'session>

§

impl<'session> !UnwindSafe for AppVolumes<'session>

§

impl<'session> Freeze for AppVolumes<'session>

§

impl<'session> Unpin for AppVolumes<'session>

§

impl<'session> UnsafeUnpin for AppVolumes<'session>

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.