pub trait DisciplineState: Any + Debug {
// Required methods
fn coarse_mode(&self) -> CoarseMode;
fn as_any(&self) -> &dyn Any;
fn as_any_mut(&mut self) -> &mut dyn Any;
}Expand description
Discipline-private FSM state, stored type-erased on the Editor.
Required Methods§
Sourcefn coarse_mode(&self) -> CoarseMode
fn coarse_mode(&self) -> CoarseMode
Discipline-agnostic coarse mode for app chrome (status badge, cursor shape). Every discipline projects its internal mode onto this.
Sourcefn as_any(&self) -> &dyn Any
fn as_any(&self) -> &dyn Any
Upcast to &dyn Any so the owning crate can downcast_ref to its
concrete state type.
Sourcefn as_any_mut(&mut self) -> &mut dyn Any
fn as_any_mut(&mut self) -> &mut dyn Any
Mutable upcast — see DisciplineState::as_any.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".