pub struct AddDatum;Expand description
Adds a datum to the part, named by the operation’s id: a point, an
axis, a plane or a coordinate system built from the selected entities by
one of the
Constructions. Like a sketch’s plane, it is built when the step runs
and stays where it was, whatever later steps do to what it was built
from.
Trait Implementations§
impl Copy for AddDatum
Source§impl<'de> Deserialize<'de> for AddDatum
impl<'de> Deserialize<'de> for AddDatum
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Operation for AddDatum
impl Operation for AddDatum
Source§fn new_args<S: Scalar>(&self, _before: &Part<S>) -> AddDatumArgs
fn new_args<S: Scalar>(&self, _before: &Part<S>) -> AddDatumArgs
Nothing selected yet, and the first construction.
Source§fn form<S: Scalar>(
&self,
before: &Part<S>,
args: &AddDatumArgs,
_: &(),
) -> Form<S>
fn form<S: Scalar>( &self, before: &Part<S>, args: &AddDatumArgs, _: &(), ) -> Form<S>
Picking the selection, choosing among the constructions that fit
it, and offsets as handles: see [crate::editor].
Source§type Args = AddDatumArgs
type Args = AddDatumArgs
Everything a step needs, as plain, serializable design data.
Source§type Session = ()
type Session = ()
The temporary state of editing a step beyond its arguments —
()
for every operation whose form says all there is to it. Starts
afresh whenever an editor opens a step.Source§fn apply<S: Scalar>(
&self,
part: Part<S>,
operation_id: &str,
args: &AddDatumArgs,
) -> GeopResult<Part<S>>
fn apply<S: Scalar>( &self, part: Part<S>, operation_id: &str, args: &AddDatumArgs, ) -> GeopResult<Part<S>>
Applies the operation as the program step
operation_id, consuming
part and returning the part it produces. Everything the operation
creates is named after operation_id (see the crate docs), so the id
has to be unique within a program. Read moreSource§fn set<S: Scalar>(
&self,
before: &Part<S>,
args: &mut AddDatumArgs,
_: &mut (),
key: &str,
value: Value,
)
fn set<S: Scalar>( &self, before: &Part<S>, args: &mut AddDatumArgs, _: &mut (), key: &str, value: Value, )
The field
key of the form set to value: typed or chosen in the
dialog, picked in the viewport, dragged as a handle.§fn event<S>(
&self,
before: &Part<S>,
args: &mut Self::Args,
session: &mut Self::Session,
event: &StepEditEvent<S>,
)where
S: Scalar,
fn event<S>(
&self,
before: &Part<S>,
args: &mut Self::Args,
session: &mut Self::Session,
event: &StepEditEvent<S>,
)where
S: Scalar,
A pointer or key event the editor did not take itself — a pick or a
handle’s drag it does. Only an operation that draws in a canvas of
its own, like a sketch, needs these.
impl StructuralPartialEq for AddDatum
Auto Trait Implementations§
impl Freeze for AddDatum
impl RefUnwindSafe for AddDatum
impl Send for AddDatum
impl Sync for AddDatum
impl Unpin for AddDatum
impl UnsafeUnpin for AddDatum
impl UnwindSafe for AddDatum
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more