Skip to main content

MotionPanel

Struct MotionPanel 

Source
pub struct MotionPanel { /* private fields */ }
Expand description

The motion panel: see the module docs.

Trait Implementations§

Source§

impl Default for MotionPanel

Source§

fn default() -> MotionPanel

Returns the “default value” for a type. Read more
Source§

impl Panel for MotionPanel

Source§

const KEY: &'static str = "motion"

The panel’s key: what its state is under in crate::editor::ProgramState::panels, and what its commands name.
Source§

type State = MotionState

What it shows.
Source§

type Command = MotionCommand

What it is sent.
Source§

fn state(&self, _: &Program, part: &Reader<'_>) -> MotionState

What it shows of program, the part part reads being what the program built as far as it runs.
Source§

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

Does command, saying what it changed.
Source§

fn details(&self, state: &Self::State) -> BTreeMap<String, String>

What the part’s structure says beside its items, by their names, from what the panel shows (state): how free a placed part is. Nothing, unless it says otherwise.
Source§

fn after_edit(&self, _ctx: &mut EditorContext<'_>)

Told once an edit — after a command changed the program or the step being edited, once it has run again and settled — never for every move of the pointer: where a question about the whole of what was built is asked. Nothing, unless it says otherwise.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<P> ErasedPanel for P
where P: Panel,

Source§

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

Source§

fn state( &self, program: &Program, part: &Reader<'_>, ) -> Result<(Value, BTreeMap<String, String>), GeopError>

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, ) -> Result<Changed, GeopError>

Source§

fn after_edit(&self, ctx: &mut EditorContext<'_>)

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.