Struct Guideline

Source
pub struct Guideline<GD: PointData> {
    pub at: GuidelinePoint,
    pub angle: IntegerOrFloat,
    pub name: Option<String>,
    pub color: Option<Color>,
    pub identifier: Option<String>,
    pub data: GD,
}

Fields§

§at: GuidelinePoint§angle: IntegerOrFloat§name: Option<String>§color: Option<Color>§identifier: Option<String>§data: GD

Implementations§

Source§

impl<GD: PointData> Guideline<GD>

Source§

impl<GD: PointData> Guideline<GD>

Source

pub fn from_x_y_angle(x: f32, y: f32, angle: IntegerOrFloat) -> Self

Source

pub fn name(self, name: impl Into<String>) -> Self

Source

pub fn color(self, color: impl Into<Color>) -> Self

Source

pub fn identifier(self, identifier: impl Into<String>) -> Self

Source

pub fn data(self, data: impl Into<GD>) -> Self

Trait Implementations§

Source§

impl<GD: Clone + PointData> Clone for Guideline<GD>

Source§

fn clone(&self) -> Guideline<GD>

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl<GD: Debug + PointData> Debug for Guideline<GD>

Source§

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

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

impl<GD: Default + PointData> Default for Guideline<GD>

Source§

fn default() -> Guideline<GD>

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

impl<'de, GD> Deserialize<'de> for Guideline<GD>
where GD: Deserialize<'de> + PointData,

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<GD: PointData> IntoXML for Guideline<GD>

Source§

fn xml(&self) -> Element

Source§

fn into_xml(self) -> Element
where Self: Sized,

Source§

impl<GD: PartialEq + PointData> PartialEq for Guideline<GD>

Source§

fn eq(&self, other: &Guideline<GD>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<GD> Serialize for Guideline<GD>
where GD: Serialize + PointData,

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<GD: PointData> StructuralPartialEq for Guideline<GD>

Auto Trait Implementations§

§

impl<GD> Freeze for Guideline<GD>
where GD: Freeze,

§

impl<GD> RefUnwindSafe for Guideline<GD>
where GD: RefUnwindSafe,

§

impl<GD> Send for Guideline<GD>
where GD: Send,

§

impl<GD> Sync for Guideline<GD>
where GD: Sync,

§

impl<GD> Unpin for Guideline<GD>
where GD: Unpin,

§

impl<GD> UnwindSafe for Guideline<GD>
where GD: UnwindSafe,

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

Source§

fn __clone_box(&self, _: Private) -> *mut ()

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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
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.
Source§

impl<T> TupleTree<T, ()> for T

Source§

const SIZE: Size

Source§

fn descendants(_indirect_level: usize) -> usize

Source§

fn height() -> usize

Source§

fn preorder(self, f: &mut impl FnMut(Visit<T>))

Source§

fn preorder_with_size_hint(self, f: &mut impl FnMut(Visit<T>, Size))

Source§

fn postorder(self, f: &mut impl FnMut(Visit<T>))

Source§

fn postorder_with_size_hint(self, f: &mut impl FnMut(Visit<T>, Size))

Source§

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