Skip to main content

Vec2

Struct Vec2 

#[repr(C)]
pub struct Vec2<T> { pub x: T, pub y: T, }

Fields§

§x: T§y: T

Implementations§

§

impl<T> Vec2<T>

pub const fn new(x: T, y: T) -> Vec2<T>

pub const fn as_array(&self) -> &[T; 2]

pub const fn as_array_mut(&mut self) -> &mut [T; 2]

pub const fn from_array_ref(a: &[T; 2]) -> &Vec2<T>

pub const fn from_array_mut(a: &mut [T; 2]) -> &mut Vec2<T>

pub const fn into_array(self) -> [T; 2]

pub const fn from_array(a: [T; 2]) -> Vec2<T>

pub fn from_fn(f: impl FnMut(usize) -> T) -> Vec2<T>

pub fn map<U>(self, f: impl Fn(T) -> U) -> Vec2<U>

pub fn zip<U, R>(self, rhs: Vec2<U>, f: impl Fn(&T, &U) -> R) -> Vec2<R>

§

impl<T> Vec2<T>
where T: Copy,

pub const fn splat(v: T) -> Vec2<T>

pub fn zip_copied<U, R>(self, rhs: Vec2<U>, f: impl Fn(T, U) -> R) -> Vec2<R>
where U: Copy,

§

impl<T> Vec2<T>
where T: Clone,

pub fn splat_cloned(v: &T) -> Vec2<T>

§

impl<T> Vec2<T>
where T: Primitive,

pub const fn into_array_const(self) -> [T; 2]

pub const fn from_array_const(a: [T; 2]) -> Vec2<T>

§

impl<T> Vec2<T>
where T: Number,

pub fn sum(self) -> T

pub fn dot(self, rhs: Vec2<T>) -> T

pub fn length_sq(self) -> T

pub fn length(self) -> f64

pub fn normalized(self) -> Vec2<T>

pub fn lerp(self, b: Vec2<T>, t: T) -> Vec2<T>

pub fn lerp_separately(self, b: Vec2<T>, t: Vec2<T>) -> Vec2<T>

pub fn inv_lerp(self, b: Vec2<T>, x: Vec2<T>) -> T

§

impl Vec2<bool>

pub const fn all(self) -> bool

pub const fn any(self) -> bool

§

impl<T> Vec2<T>
where T: Copy,

pub fn xx(&self) -> Vec2<T>

pub fn xy(&self) -> Vec2<T>

pub fn xn(&self, y: T) -> Vec2<T>

pub fn yx(&self) -> Vec2<T>

pub fn yy(&self) -> Vec2<T>

pub fn yn(&self, y: T) -> Vec2<T>

pub fn nx(&self, x: T) -> Vec2<T>

pub fn ny(&self, x: T) -> Vec2<T>

§

impl<T> Vec2<T>
where T: Copy,

pub fn xxx(&self) -> Vec3<T>

pub fn xxy(&self) -> Vec3<T>

pub fn xxn(&self, z: T) -> Vec3<T>

pub fn xyx(&self) -> Vec3<T>

pub fn xyy(&self) -> Vec3<T>

pub fn xyn(&self, z: T) -> Vec3<T>

pub fn xnx(&self, y: T) -> Vec3<T>

pub fn xny(&self, y: T) -> Vec3<T>

pub fn xnn(&self, y: T, z: T) -> Vec3<T>

pub fn yxx(&self) -> Vec3<T>

pub fn yxy(&self) -> Vec3<T>

pub fn yxn(&self, z: T) -> Vec3<T>

pub fn yyx(&self) -> Vec3<T>

pub fn yyy(&self) -> Vec3<T>

pub fn yyn(&self, z: T) -> Vec3<T>

pub fn ynx(&self, y: T) -> Vec3<T>

pub fn yny(&self, y: T) -> Vec3<T>

pub fn ynn(&self, y: T, z: T) -> Vec3<T>

pub fn nxx(&self, x: T) -> Vec3<T>

pub fn nxy(&self, x: T) -> Vec3<T>

pub fn nxn(&self, x: T, z: T) -> Vec3<T>

pub fn nyx(&self, x: T) -> Vec3<T>

pub fn nyy(&self, x: T) -> Vec3<T>

pub fn nyn(&self, x: T, z: T) -> Vec3<T>

pub fn nnx(&self, x: T, y: T) -> Vec3<T>

pub fn nny(&self, x: T, y: T) -> Vec3<T>

§

impl<T> Vec2<T>
where T: Copy,

pub fn xxxx(&self) -> Vec4<T>

pub fn xxxy(&self) -> Vec4<T>

pub fn xxxn(&self, w: T) -> Vec4<T>

pub fn xxyx(&self) -> Vec4<T>

pub fn xxyy(&self) -> Vec4<T>

pub fn xxyn(&self, w: T) -> Vec4<T>

pub fn xxnx(&self, z: T) -> Vec4<T>

pub fn xxny(&self, z: T) -> Vec4<T>

pub fn xxnn(&self, z: T, w: T) -> Vec4<T>

pub fn xyxx(&self) -> Vec4<T>

pub fn xyxy(&self) -> Vec4<T>

pub fn xyxn(&self, w: T) -> Vec4<T>

pub fn xyyx(&self) -> Vec4<T>

pub fn xyyy(&self) -> Vec4<T>

pub fn xyyn(&self, w: T) -> Vec4<T>

pub fn xynx(&self, z: T) -> Vec4<T>

pub fn xyny(&self, z: T) -> Vec4<T>

pub fn xynn(&self, z: T, w: T) -> Vec4<T>

pub fn xnxx(&self, y: T) -> Vec4<T>

pub fn xnxy(&self, y: T) -> Vec4<T>

pub fn xnxn(&self, y: T, w: T) -> Vec4<T>

pub fn xnyx(&self, y: T) -> Vec4<T>

pub fn xnyy(&self, y: T) -> Vec4<T>

pub fn xnyn(&self, y: T, w: T) -> Vec4<T>

pub fn xnnx(&self, y: T, z: T) -> Vec4<T>

pub fn xnny(&self, y: T, z: T) -> Vec4<T>

pub fn xnnn(&self, y: T, z: T, w: T) -> Vec4<T>

pub fn yxxx(&self) -> Vec4<T>

pub fn yxxy(&self) -> Vec4<T>

pub fn yxxn(&self, w: T) -> Vec4<T>

pub fn yxyx(&self) -> Vec4<T>

pub fn yxyy(&self) -> Vec4<T>

pub fn yxyn(&self, w: T) -> Vec4<T>

pub fn yxnx(&self, z: T) -> Vec4<T>

pub fn yxny(&self, z: T) -> Vec4<T>

pub fn yxnn(&self, z: T, w: T) -> Vec4<T>

pub fn yyxx(&self) -> Vec4<T>

pub fn yyxy(&self) -> Vec4<T>

pub fn yyxn(&self, w: T) -> Vec4<T>

pub fn yyyx(&self) -> Vec4<T>

pub fn yyyy(&self) -> Vec4<T>

pub fn yyyn(&self, w: T) -> Vec4<T>

pub fn yynx(&self, z: T) -> Vec4<T>

pub fn yyny(&self, z: T) -> Vec4<T>

pub fn yynn(&self, z: T, w: T) -> Vec4<T>

pub fn ynxx(&self, y: T) -> Vec4<T>

pub fn ynxy(&self, y: T) -> Vec4<T>

pub fn ynxn(&self, y: T, w: T) -> Vec4<T>

pub fn ynyx(&self, y: T) -> Vec4<T>

pub fn ynyy(&self, y: T) -> Vec4<T>

pub fn ynyn(&self, y: T, w: T) -> Vec4<T>

pub fn ynnx(&self, y: T, z: T) -> Vec4<T>

pub fn ynny(&self, y: T, z: T) -> Vec4<T>

pub fn ynnn(&self, y: T, z: T, w: T) -> Vec4<T>

pub fn nxxx(&self, x: T) -> Vec4<T>

pub fn nxxy(&self, x: T) -> Vec4<T>

pub fn nxxn(&self, x: T, w: T) -> Vec4<T>

pub fn nxyx(&self, x: T) -> Vec4<T>

pub fn nxyy(&self, x: T) -> Vec4<T>

pub fn nxyn(&self, x: T, w: T) -> Vec4<T>

pub fn nxnx(&self, x: T, z: T) -> Vec4<T>

pub fn nxny(&self, x: T, z: T) -> Vec4<T>

pub fn nxnn(&self, x: T, z: T, w: T) -> Vec4<T>

pub fn nyxx(&self, x: T) -> Vec4<T>

pub fn nyxy(&self, x: T) -> Vec4<T>

pub fn nyxn(&self, x: T, w: T) -> Vec4<T>

pub fn nyyx(&self, x: T) -> Vec4<T>

pub fn nyyy(&self, x: T) -> Vec4<T>

pub fn nyyn(&self, x: T, w: T) -> Vec4<T>

pub fn nynx(&self, x: T, z: T) -> Vec4<T>

pub fn nyny(&self, x: T, z: T) -> Vec4<T>

pub fn nynn(&self, x: T, z: T, w: T) -> Vec4<T>

pub fn nnxx(&self, x: T, y: T) -> Vec4<T>

pub fn nnxy(&self, x: T, y: T) -> Vec4<T>

pub fn nnxn(&self, x: T, y: T, w: T) -> Vec4<T>

pub fn nnyx(&self, x: T, y: T) -> Vec4<T>

pub fn nnyy(&self, x: T, y: T) -> Vec4<T>

pub fn nnyn(&self, x: T, y: T, w: T) -> Vec4<T>

pub fn nnnx(&self, x: T, y: T, z: T) -> Vec4<T>

pub fn nnny(&self, x: T, y: T, z: T) -> Vec4<T>

§

impl<T> Vec2<T>
where T: Primitive,

pub const X: Vec2<T>

pub const Y: Vec2<T>

Trait Implementations§

§

impl<T, U> Add<Vec2<U>> for Vec2<T>
where T: Add<U>,

§

type Output = Vec2<<T as Add<U>>::Output>

The resulting type after applying the + operator.
§

fn add(self, rhs: Vec2<U>) -> <Vec2<T> as Add<Vec2<U>>>::Output

Performs the + operation. Read more
§

impl<T, U> AddAssign<Vec2<U>> for Vec2<T>
where T: AddAssign<U>,

§

fn add_assign(&mut self, rhs: Vec2<U>)

Performs the += operation. Read more
§

impl<T> AllBitVariationsValid for Vec2<T>

§

impl<T> AllBitsInit for Vec2<T>
where T: AllBitsInit,

§

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

§

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

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
§

impl<T> Copy for Vec2<T>
where T: Copy,

§

impl<T> Debug for Vec2<T>
where T: Debug,

§

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

Formats the value using the given formatter. Read more
§

impl<T> Default for Vec2<T>
where T: Default,

§

fn default() -> Vec2<T>

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

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

§

fn deserialize<__D>( __deserializer: __D, ) -> Result<Vec2<T>, <__D as Deserializer<'de>>::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
§

impl<T> Div for Vec2<T>
where T: Div,

§

type Output = Vec2<<T as Div>::Output>

The resulting type after applying the / operator.
§

fn div(self, rhs: Vec2<T>) -> <Vec2<T> as Div>::Output

Performs the / operation. Read more
§

impl<T> Div<T> for Vec2<T>
where T: Div + Copy,

§

type Output = Vec2<<T as Div>::Output>

The resulting type after applying the / operator.
§

fn div(self, rhs: T) -> <Vec2<T> as Div<T>>::Output

Performs the / operation. Read more
§

impl<T> DivAssign for Vec2<T>
where T: DivAssign,

§

fn div_assign(&mut self, rhs: Vec2<T>)

Performs the /= operation. Read more
§

impl<T> DivAssign<T> for Vec2<T>
where T: DivAssign + Copy,

§

fn div_assign(&mut self, rhs: T)

Performs the /= operation. Read more
§

impl<T> Eq for Vec2<T>
where T: Eq,

§

impl<T> From<[T; 2]> for Vec2<T>
where T: Primitive,

§

fn from(a: [T; 2]) -> Vec2<T>

Converts to this type from the input type.
§

impl<T> Hash for Vec2<T>
where T: Hash,

§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
§

impl<T> Index<usize> for Vec2<T>

§

type Output = T

The returned type after indexing.
§

fn index(&self, i: usize) -> &<Vec2<T> as Index<usize>>::Output

Performs the indexing (container[index]) operation. Read more
§

impl<T> IndexMut<usize> for Vec2<T>

§

fn index_mut(&mut self, i: usize) -> &mut <Vec2<T> as Index<usize>>::Output

Performs the mutable indexing (container[index]) operation. Read more
§

impl<T> Mul for Vec2<T>
where T: Mul,

§

type Output = Vec2<<T as Mul>::Output>

The resulting type after applying the * operator.
§

fn mul(self, rhs: Vec2<T>) -> <Vec2<T> as Mul>::Output

Performs the * operation. Read more
§

impl<T> Mul<T> for Vec2<T>
where T: Mul + Copy,

§

type Output = Vec2<<T as Mul>::Output>

The resulting type after applying the * operator.
§

fn mul(self, rhs: T) -> <Vec2<T> as Mul<T>>::Output

Performs the * operation. Read more
§

impl<T> Mul<Vec2<T>> for Mat<2, T>
where T: Number,

§

type Output = Vec2<T>

The resulting type after applying the * operator.
§

fn mul(self, rhs: Vec2<T>) -> <Mat<2, T> as Mul<Vec2<T>>>::Output

Performs the * operation. Read more
§

impl<T> MulAssign for Vec2<T>
where T: MulAssign,

§

fn mul_assign(&mut self, rhs: Vec2<T>)

Performs the *= operation. Read more
§

impl<T> MulAssign<T> for Vec2<T>
where T: MulAssign + Copy,

§

fn mul_assign(&mut self, rhs: T)

Performs the *= operation. Read more
§

impl<T> Neg for Vec2<T>
where T: Neg,

§

type Output = Vec2<<T as Neg>::Output>

The resulting type after applying the - operator.
§

fn neg(self) -> <Vec2<T> as Neg>::Output

Performs the unary - operation. Read more
§

impl<T> Ord for Vec2<T>
where T: Ord,

§

fn cmp(&self, other: &Vec2<T>) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 (const: unstable) · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 (const: unstable) · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

fn clamp_to<R>(self, range: R) -> Self
where Self: Sized, R: ClampBounds<Self>,

🔬This is a nightly-only experimental API. (clamp_to)
Restrict a value to a certain range. Read more
§

impl<T> PartialEq for Vec2<T>
where T: PartialEq,

§

fn eq(&self, other: &Vec2<T>) -> bool

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

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

Inequality operator !=. Read more
§

impl<T> PartialOrd for Vec2<T>
where T: PartialOrd,

§

fn partial_cmp(&self, other: &Vec2<T>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 (const: unstable) · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 (const: unstable) · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
§

impl<S, T> Serializable<S> for Vec2<T>
where S: SerializerCtxState<T>, Vec2<T>: Default,

§

fn serialize(&self, ctx: SerializerCtx<'_, S>, path: &str) -> SerializedValue

§

fn deserialize( &mut self, ctx: SerializerCtx<'_, S>, path: &str, value: &SerializedValue, )

§

impl<T> Serialize for Vec2<T>
where T: Serialize,

§

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

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

impl<T> StructuralPartialEq for Vec2<T>
where T: PartialEq,

§

impl<T, U> Sub<Vec2<U>> for Vec2<T>
where T: Sub<U>,

§

type Output = Vec2<<T as Sub<U>>::Output>

The resulting type after applying the - operator.
§

fn sub(self, rhs: Vec2<U>) -> <Vec2<T> as Sub<Vec2<U>>>::Output

Performs the - operation. Read more
§

impl<T, U> SubAssign<Vec2<U>> for Vec2<T>
where T: SubAssign<U>,

§

fn sub_assign(&mut self, rhs: Vec2<U>)

Performs the -= operation. Read more

Auto Trait Implementations§

§

impl<T> Forget for Vec2<T>

§

impl<T> Freeze for Vec2<T>
where T: Freeze,

§

impl<T> Move for Vec2<T>

§

impl<T> RefUnwindSafe for Vec2<T>
where T: RefUnwindSafe,

§

impl<T> Send for Vec2<T>
where T: Send,

§

impl<T> Sync for Vec2<T>
where T: Sync,

§

impl<T> Unpin for Vec2<T>
where T: Unpin,

§

impl<T> UnsafeUnpin for Vec2<T>
where T: UnsafeUnpin,

§

impl<T> UnwindSafe for Vec2<T>
where T: 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
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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
§

impl<Q, K> Comparable<K> for Q
where Q: Ord + ?Sized, K: Borrow<Q> + ?Sized,

§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
Source§

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

§

impl<T> Downcast for T
where T: Any,

§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
§

impl<T> Downcast<T> for T

§

fn downcast(&self) -> &T

§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync> ⓘ

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
§

impl<S, T> Duplex<S> for T
where T: FromSample<S> + ToSample<S>,

§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<S> FromSample<S> for S

§

fn from_sample_(s: S) -> S

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<R, P> ReadPrimitive<R> for P
where R: Read + ReadEndian<P>, P: Default,

Source§

fn read_from_little_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_little_endian().
Source§

fn read_from_big_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_big_endian().
Source§

fn read_from_native_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_native_endian().
§

impl<T> SameType for T

§

type Same = T

§

fn same_to_self(v: <T as SameType>::Same) -> T

§

fn self_to_same(v: T) -> <T as SameType>::Same

§

fn same_to_self_ref(v: &<T as SameType>::Same) -> &T

§

fn self_to_same_ref(v: &T) -> &<T as SameType>::Same

§

fn same_to_self_mut(v: &mut <T as SameType>::Same) -> &mut T

§

fn self_to_same_mut(v: &mut T) -> &mut <T as SameType>::Same

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
§

impl<T, U> ToSample<U> for T
where U: FromSample<T>,

§

fn to_sample_(self) -> U

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

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.
§

impl<T> Upcast<T> for T

§

fn upcast(&self) -> Option<&T>

§

impl<T> WasmNotSend for T
where T: Send,

§

impl<T> WasmNotSendSync for T
where T: WasmNotSend + WasmNotSync,

§

impl<T> WasmNotSync for T
where T: Sync,

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more