Skip to main content

LineSource

Enum LineSource 

Source
pub enum LineSource {
    Edge(ElementReference<NamedModel, Line>),
    Datum(ElementReference<Datums, Line>),
    Sketch(ElementReference<PlacedSketch, Line>),
}
Expand description

A line of the part a 3-D sketch’s direction runs along: a straight edge, a datum axis or a frame’s, a sketch’s line.

Variants§

Implementations§

Source§

impl LineSource

Source

pub fn instance(&self) -> &str

The path of the instance it is of: empty for the part itself.

Source

pub fn local(&self) -> Self

The same, as its instance’s own part names it.

Source

pub fn behind(&self, instance: &str) -> Self

The same, of the instance instance of the part.

Source§

impl LineSource

Source

pub fn resolve(&self, reader: &Reader<'_>) -> __GeopResult<Axis>

What it refers to, read through reader, of the part itself (see geop_core_program::reader::Reader::retrieve_element).

Source

pub fn resolve_placed( &self, reader: &Reader<'_>, ) -> __GeopResult<InInstance<Axis>>

What it refers to, of the part itself or of an instance placed in it, as it is in its own part (see geop_core_program::reader::Reader::retrieve_placed).

Trait Implementations§

Source§

impl Clone for LineSource

Source§

fn clone(&self) -> LineSource

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for LineSource

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for LineSource

Source§

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 PartialEq for LineSource

Source§

fn eq(&self, other: &LineSource) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Selectable for LineSource

Source§

fn picked_from() -> Vec<&'static str>

The kinds of what an editor draws that a click picks one from.
Source§

fn from_picked(picked: &PickedElement) -> Option<Self>

The value picked names as Selectable::picked does: what a field sent back held already.
Source§

fn picked(&self) -> PickedElement

The value as a pick names it: what the front end shows held.
Source§

fn select(reader: &Reader<'_>, hit: &PickedElement) -> Option<Self>

The value a click on hit selects, read through reader: none, for a hit that selects none.
Source§

fn drawn(&self, reader: &Reader<'_>) -> Vec<PickedElement>

What an editor draws of it, to light while it is held.
Source§

fn visuals(&self, reader: &Reader<'_>) -> Vec<Visual>

What an editor draws of it besides lighting what it is picked from (Selectable::drawn), while it is held or a click would pick it: nothing, for an element drawn as itself; a frame, as a triad along its axes. In the world, as the part is drawn; styled by the editor as held or as hovered.
Source§

impl Serialize for LineSource

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for LineSource

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<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.