Skip to main content

JointsPanel

Struct JointsPanel 

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

The joints panel: see the module docs.

Trait Implementations§

Source§

impl Panel for JointsPanel

Source§

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

How free each placed part is: fixed, or how many ways it moves.

Source§

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

How free the placed parts of what is shown are, kept for the panel to show.

Source§

const KEY: &'static str = "joints"

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

type State = JointsState

What it shows.
Source§

type Command = JointsCommand

What it is sent.
Source§

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

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: JointsCommand, ) -> GeopResult<Changed>

Does command, saying what it changed.

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.