pub struct AppVolumes<'session> { /* private fields */ }Expand description
App volume operations of a session (session.app_volumes()).
Implementations§
Source§impl<'session> AppVolumes<'session>
impl<'session> AppVolumes<'session>
Sourcepub fn get_or_create(&self, config: &AppVolumeConfig) -> Result<AppVolumeId>
pub fn get_or_create(&self, config: &AppVolumeConfig) -> Result<AppVolumeId>
Returns the volume named by config.common_name, creating it if
needed. Idempotent.
Sourcepub fn set_pose(&self, volume: AppVolumeId, pose: Pose) -> Result<()>
pub fn set_pose(&self, volume: AppVolumeId, pose: Pose) -> Result<()>
Moves the box (pose of its center, room space).
Sourcepub fn set_size(&self, volume: AppVolumeId, size: AppVolumeSize) -> Result<()>
pub fn set_size(&self, volume: AppVolumeId, size: AppVolumeSize) -> Result<()>
Resizes the box.
Sourcepub fn set_app_pose(&self, volume: AppVolumeId, app_pose: Pose) -> Result<()>
pub fn set_app_pose(&self, volume: AppVolumeId, app_pose: Pose) -> Result<()>
Moves the content inside the box (volume meters).
Sourcepub fn set_app_scale(&self, volume: AppVolumeId, app_scale: f32) -> Result<()>
pub fn set_app_scale(&self, volume: AppVolumeId, app_scale: f32) -> Result<()>
Room meters per app meter.
Sourcepub fn set_display_name(
&self,
volume: AppVolumeId,
display_name: &str,
) -> Result<()>
pub fn set_display_name( &self, volume: AppVolumeId, display_name: &str, ) -> Result<()>
Renames the volume (UTF-8).
Sourcepub fn close(&self, volume: AppVolumeId) -> Result<()>
pub fn close(&self, volume: AppVolumeId) -> Result<()>
Closes the volume (qar_app_volumes_close_volume).
Sourcepub fn latest_pose(&self, volume: AppVolumeId) -> Result<Pose>
pub fn latest_pose(&self, volume: AppVolumeId) -> Result<Pose>
Latest locally known pose, including changes by other peers and gestures.
Sourcepub fn latest_size(&self, volume: AppVolumeId) -> Result<AppVolumeSize>
pub fn latest_size(&self, volume: AppVolumeId) -> Result<AppVolumeSize>
Latest locally known size.
Sourcepub fn latest_app_pose(&self, volume: AppVolumeId) -> Result<Pose>
pub fn latest_app_pose(&self, volume: AppVolumeId) -> Result<Pose>
Latest locally known pose of the content inside the box.
Sourcepub fn latest_app_scale(&self, volume: AppVolumeId) -> Result<f32>
pub fn latest_app_scale(&self, volume: AppVolumeId) -> Result<f32>
Latest locally known scale, room meters per app meter.
Sourcepub fn list(&self) -> Result<Vec<AppVolumeInfo>>
pub fn list(&self) -> Result<Vec<AppVolumeInfo>>
Snapshot of every volume known to the session.
Sourcepub fn subscribe(
&self,
callback: impl Fn(AppVolumeInfo) + Send + Sync + 'static,
) -> Result<Subscription>
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§
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more