pub struct ViewSnapshot { /* private fields */ }Expand description
Read-only, cheaply-cloneable snapshot of ViewState.
Created once per frame by the view system and shared with all stages
via StageContext. Clone is an Arc bump.
Stages and output consumers receive ViewSnapshot, not ViewState.
Implementations§
Source§impl ViewSnapshot
impl ViewSnapshot
Sourcepub fn version(&self) -> ViewVersion
pub fn version(&self) -> ViewVersion
Current version.
Sourcepub fn motion(&self) -> &CameraMotionState
pub fn motion(&self) -> &CameraMotionState
Camera motion state.
Sourcepub fn motion_source(&self) -> &MotionSource
pub fn motion_source(&self) -> &MotionSource
How the motion state was determined.
Sourcepub fn transition(&self) -> TransitionPhase
pub fn transition(&self) -> TransitionPhase
Transition phase.
Sourcepub fn ptz(&self) -> Option<&PtzTelemetry>
pub fn ptz(&self) -> Option<&PtzTelemetry>
PTZ telemetry, if available.
Sourcepub fn global_transform(&self) -> Option<&GlobalTransformEstimate>
pub fn global_transform(&self) -> Option<&GlobalTransformEstimate>
Global transform estimate, if available.
Sourcepub fn validity(&self) -> &ContextValidity
pub fn validity(&self) -> &ContextValidity
Context validity under the current view.
Sourcepub fn stability_score(&self) -> f32
pub fn stability_score(&self) -> f32
Stability score in [0.0, 1.0].
Sourcepub fn as_view_state(&self) -> &ViewState
pub fn as_view_state(&self) -> &ViewState
Borrow the underlying ViewState.
Trait Implementations§
Source§impl Clone for ViewSnapshot
impl Clone for ViewSnapshot
Source§fn clone(&self) -> ViewSnapshot
fn clone(&self) -> ViewSnapshot
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ViewSnapshot
impl RefUnwindSafe for ViewSnapshot
impl Send for ViewSnapshot
impl Sync for ViewSnapshot
impl Unpin for ViewSnapshot
impl UnsafeUnpin for ViewSnapshot
impl UnwindSafe for ViewSnapshot
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