Skip to main content

ErasedPanel

Trait ErasedPanel 

Source
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§

Source

fn key(&self) -> &'static str

Source

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).

Source

fn command( &self, ctx: &mut EditorContext<'_>, payload: Value, ) -> GeopResult<Changed>

Source

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".

Implementors§

Source§

impl<P: Panel> ErasedPanel for P