Trait rerun::external::re_viewer_context::ViewState
source · pub trait ViewState: Any + Sync + Send {
// Required methods
fn as_any(&self) -> &(dyn Any + 'static);
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static);
}
Expand description
Unserialized frame to frame state of a view.
For any state that should be persisted, use the Blueprint! This state is used for transient state, such as animation or uncommitted ui state like dragging a camera. (on mouse release, the camera would be committed to the blueprint).
Required Methods§
sourcefn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts itself to a reference of std::any::Any
, which enables downcasting to concrete types.
sourcefn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts itself to a reference of std::any::Any
, which enables downcasting to concrete types.
Trait Implementations§
source§impl ViewStateExt for dyn ViewState
impl ViewStateExt for dyn ViewState
source§fn downcast_ref<T>(&self) -> Result<&T, ViewSystemExecutionError>where
T: ViewState,
fn downcast_ref<T>(&self) -> Result<&T, ViewSystemExecutionError>where
T: ViewState,
Downcasts this state to a reference of a concrete type.
source§fn downcast_mut<T>(&mut self) -> Result<&mut T, ViewSystemExecutionError>where
T: ViewState,
fn downcast_mut<T>(&mut self) -> Result<&mut T, ViewSystemExecutionError>where
T: ViewState,
Downcasts this state to a mutable reference of a concrete type.