pub trait ErasedPanel {
// Required methods
fn key(&self) -> &'static str;
fn state(
&self,
program: &Program,
part: &Reader<'_>,
) -> GeopResult<(Value, BTreeMap<String, String>)>;
fn command(
&self,
ctx: &mut EditorContext<'_>,
payload: Value,
) -> GeopResult<Changed>;
fn after_edit(&self, ctx: &mut EditorContext<'_>);
}Expand description
A Panel with its types erased, to keep panels of every kind in one
registry.
Required Methods§
fn key(&self) -> &'static str
Sourcefn state(
&self,
program: &Program,
part: &Reader<'_>,
) -> GeopResult<(Value, BTreeMap<String, String>)>
fn state( &self, program: &Program, part: &Reader<'_>, ) -> GeopResult<(Value, BTreeMap<String, String>)>
What it shows of program (see Panel::state), and what the
structure says beside its items from it (see Panel::details).
fn command( &self, ctx: &mut EditorContext<'_>, payload: Value, ) -> GeopResult<Changed>
fn after_edit(&self, ctx: &mut EditorContext<'_>)
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".