Struct kittycad_modeling_cmds::shared::Point4d

source ·
pub struct Point4d<T = f32>
where Primitive: From<T>, T: Value,
{ pub x: T, pub y: T, pub z: T, pub w: T, }
Expand description

A point in homogeneous (4D) space

Fields§

§x: T§y: T§z: T§w: T

Implementations§

source§

impl Point4d<LengthUnit>

source

pub fn to_millimeters(&self, from: UnitLength) -> Point4d<f64>

Convert the point to millimeters.

source§

impl Point4d<f64>

source

pub fn from_millimeters(&self, to: UnitLength) -> Point4d<LengthUnit>

Convert the point from millimeters.

Trait Implementations§

source§

impl<T> Clone for Point4d<T>
where Primitive: From<T>, T: Value + Clone,

source§

fn clone(&self) -> Point4d<T>

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl<T> Debug for Point4d<T>
where Primitive: From<T>, T: Value + Debug,

source§

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

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

impl<'de, T> Deserialize<'de> for Point4d<T>
where Primitive: From<T>, T: Value + Deserialize<'de>,

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<T> JsonSchema for Point4d<T>
where Primitive: From<T>, T: Value + JsonSchema,

source§

fn schema_name() -> String

The name of the generated JSON Schema. Read more
source§

fn schema_id() -> Cow<'static, str>

Returns a string that uniquely identifies the schema produced by this type. Read more
source§

fn json_schema(gen: &mut SchemaGenerator) -> Schema

Generates a JSON Schema for this type. Read more
source§

fn is_referenceable() -> bool

Whether JSON Schemas generated for this type should be re-used where possible using the $ref keyword. Read more
source§

impl<T> PartialEq for Point4d<T>
where Primitive: From<T>, T: Value + PartialEq,

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<T> Serialize for Point4d<T>
where Primitive: From<T>, T: Value + Serialize,

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<T> Value for Point4d<T>
where Primitive: From<T>, T: Value,

source§

fn into_parts(self) -> Vec<Primitive>

Store the value in memory.
source§

fn from_parts<I>(values: &mut I) -> Result<(Self, usize), MemoryError>
where I: Iterator<Item = Option<Primitive>>,

Read the value from memory.
source§

impl<T> Copy for Point4d<T>
where Primitive: From<T>, T: Value + Copy,

Auto Trait Implementations§

§

impl<T> Freeze for Point4d<T>
where Primitive: Sized, T: Freeze,

§

impl<T> RefUnwindSafe for Point4d<T>

§

impl<T> Send for Point4d<T>
where Primitive: Sized, T: Send,

§

impl<T> Sync for Point4d<T>
where Primitive: Sized, T: Sync,

§

impl<T> Unpin for Point4d<T>
where Primitive: Sized, T: Unpin,

§

impl<T> UnwindSafe for Point4d<T>

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<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

source§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

source§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

source§

fn implicit( self, class: Class, constructed: bool, tag: u32 ) -> TaggedParser<'a, Implicit, Self, E>

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

§

type Err = Infallible

source§

fn into_result(self) -> Result<T, <T as IntoResult<T>>::Err>

source§

impl<T> IntoSql for T

source§

fn into_sql<T>(self) -> Self::Expression

Convert self to an expression for Diesel’s query builder. Read more
source§

fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression

Convert &self to an expression for Diesel’s query builder. Read more
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

§

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>,

§

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>,

§

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<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V

source§

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

source§

impl<T> SendSyncUnwindSafe for T
where T: Send + Sync + UnwindSafe + ?Sized,