pub trait SpaceViewState: Any + Sync + Send {
// Required methods
fn as_any(&self) -> &dyn Any;
fn as_any_mut(&mut self) -> &mut dyn Any;
}
Expand description
Unserialized frame to frame state of a space 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
fn as_any(&self) -> &dyn Any
Converts itself to a reference of std::any::Any
, which enables downcasting to concrete types.
sourcefn as_any_mut(&mut self) -> &mut dyn Any
fn as_any_mut(&mut self) -> &mut dyn Any
Converts itself to a reference of std::any::Any
, which enables downcasting to concrete types.
Trait Implementations§
source§impl SpaceViewStateExt for dyn SpaceViewState
impl SpaceViewStateExt for dyn SpaceViewState
source§fn downcast_ref<T: SpaceViewState>(
&self
) -> Result<&T, SpaceViewSystemExecutionError>
fn downcast_ref<T: SpaceViewState>( &self ) -> Result<&T, SpaceViewSystemExecutionError>
Downcasts this state to a reference of a concrete type.
source§fn downcast_mut<T: SpaceViewState>(
&mut self
) -> Result<&mut T, SpaceViewSystemExecutionError>
fn downcast_mut<T: SpaceViewState>( &mut self ) -> Result<&mut T, SpaceViewSystemExecutionError>
Downcasts this state to a mutable reference of a concrete type.
Implementations on Foreign Types§
source§impl SpaceViewState for ()
impl SpaceViewState for ()
Implementation of an empty space view state.