Enum Enum

Source
#[non_exhaustive]
pub enum Enum<const LEN: usize, A, B, C = (), D = (), E = (), F = (), G = (), H = (), I = (), J = (), K = (), L = ()> { A(A), B(B), C(C), D(D), E(E), F(F), G(G), H(H), I(I), J(J), K(K), L(L), }
Expand description

A generic, parameterized enum for expressing structured alternatives.

Variants are expected to be contiguous, meaning () (unit types) should only appear at the end.

The first variant (A) is considered the default, implementing Default when A: Default.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

A(A)

The 1st variant (default).

§

B(B)

The 2nd variant.

§

C(C)

The 3rd variant.

§

D(D)

The 4th variant.

§

E(E)

The 5th variant.

§

F(F)

The 6th variant.

§

G(G)

The 7th variant.

§

H(H)

The 8th variant.

§

I(I)

The 9th variant.

§

J(J)

The 10th variant.

§

K(K)

The 11th variant.

§

L(L)

The 12th variant.

Implementations§

Source§

impl<const LEN: usize, A, B, C, D, E, F, G, H, I, J, K, L> Enum<LEN, A, B, C, D, E, F, G, H, I, J, K, L>

§Structural methods.

Source

pub const LEN: usize

The number of active (non-() type) variants.

Source

pub const MAX_ARITY: usize = 12usize

The maximum number of generic type parameters in this enum.

Source

pub const fn variant_index(&self) -> usize

Returns the current variant index (0-based).

Source

pub const fn is_variant_index(&self, index: usize) -> bool

Checks whether the current variant is at index (0-based).

Source

pub const fn variant_name(&self) -> &'static str

Returns the current variant name.

Source

pub const fn is_variant_name(&self, name: &str) -> bool

Checks whether the current variant has the given name.

Source§

impl<const LEN: usize, A: 'static, B: 'static, C: 'static, D: 'static, E: 'static, F: 'static, G: 'static, H: 'static, I: 'static, J: 'static, K: 'static, L: 'static> Enum<LEN, A, B, C, D, E, F, G, H, I, J, K, L>

Source

pub fn first_non_unit() -> Option<&'static str>

Returns the first non-unit variant name, if any.

Source

pub fn validate() -> bool

Validates that inactive () variants only appear at the end, and that LEN equals the number of active variants.

Source§

impl<const LEN: usize, A: Clone, B: Clone, C: Clone, D: Clone, E: Clone, F: Clone, G: Clone, H: Clone, I: Clone, J: Clone, K: Clone, L: Clone> Enum<LEN, A, B, C, D, E, F, G, H, I, J, K, L>

§Conversion methods.

Source

pub fn into_tuple_options( self, ) -> (Option<A>, Option<B>, Option<C>, Option<D>, Option<E>, Option<F>, Option<G>, Option<H>, Option<I>, Option<J>, Option<K>, Option<L>)

Returns a tuple with Some(value) for the active variant and None elsewhere.

Source

pub fn into_tuple_defaults(self) -> (A, B, C, D, E, F, G, H, I, J, K, L)
where A: Default, B: Default, C: Default, D: Default, E: Default, F: Default, G: Default, H: Default, I: Default, J: Default, K: Default, L: Default,

Returns a tuple with the active variant’s inner value in its corresponding position and Default::default() for all others.

Source§

impl<const LEN: usize, A, B, C, D, E, F, G, H, I, J, K, L> Enum<LEN, A, B, C, D, E, F, G, H, I, J, K, L>

Source

pub fn as_tuple_ref_options( &self, ) -> (Option<&A>, Option<&B>, Option<&C>, Option<&D>, Option<&E>, Option<&F>, Option<&G>, Option<&H>, Option<&I>, Option<&J>, Option<&K>, Option<&L>)

Returns a tuple with Some(&value) for the active variant and None elsewhere.

Source§

impl<const LEN: usize, A, B, C, D, E, F, G, H, I, J, K, L> Enum<LEN, A, B, C, D, E, F, G, H, I, J, K, L>

§Variant-specific methods.

Source

pub const fn is_a(&self) -> bool

Returns true if the value is of type A

Source

pub fn into_a(self) -> Option<A>

Returns the inner A value, if present.

Source

pub fn as_ref_a(&self) -> Option<&A>

Returns a reference to the inner A value, if present.

Source

pub fn as_mut_a(&mut self) -> Option<&mut A>

Returns a reference to the inner A value, if present.

Source

pub const fn is_b(&self) -> bool

Returns true if the value is of type B

Source

pub fn into_b(self) -> Option<B>

Returns the inner B value, if present.

Source

pub fn as_ref_b(&self) -> Option<&B>

Returns a reference to the inner B value, if present.

Source

pub fn as_mut_b(&mut self) -> Option<&mut B>

Returns a reference to the inner B value, if present.

Source

pub const fn is_c(&self) -> bool

Returns true if the value is of type C

Source

pub fn into_c(self) -> Option<C>

Returns the inner C value, if present.

Source

pub fn as_ref_c(&self) -> Option<&C>

Returns a reference to the inner C value, if present.

Source

pub fn as_mut_c(&mut self) -> Option<&mut C>

Returns a reference to the inner C value, if present.

Source

pub const fn is_d(&self) -> bool

Returns true if the value is of type D

Source

pub fn into_d(self) -> Option<D>

Returns the inner D value, if present.

Source

pub fn as_ref_d(&self) -> Option<&D>

Returns a reference to the inner D value, if present.

Source

pub fn as_mut_d(&mut self) -> Option<&mut D>

Returns a reference to the inner D value, if present.

Source

pub const fn is_e(&self) -> bool

Returns true if the value is of type E

Source

pub fn into_e(self) -> Option<E>

Returns the inner E value, if present.

Source

pub fn as_ref_e(&self) -> Option<&E>

Returns a reference to the inner E value, if present.

Source

pub fn as_mut_e(&mut self) -> Option<&mut E>

Returns a reference to the inner E value, if present.

Source

pub const fn is_f(&self) -> bool

Returns true if the value is of type F

Source

pub fn into_f(self) -> Option<F>

Returns the inner F value, if present.

Source

pub fn as_ref_f(&self) -> Option<&F>

Returns a reference to the inner F value, if present.

Source

pub fn as_mut_f(&mut self) -> Option<&mut F>

Returns a reference to the inner F value, if present.

Source

pub const fn is_g(&self) -> bool

Returns true if the value is of type G

Source

pub fn into_g(self) -> Option<G>

Returns the inner G value, if present.

Source

pub fn as_ref_g(&self) -> Option<&G>

Returns a reference to the inner G value, if present.

Source

pub fn as_mut_g(&mut self) -> Option<&mut G>

Returns a reference to the inner G value, if present.

Source

pub const fn is_h(&self) -> bool

Returns true if the value is of type H

Source

pub fn into_h(self) -> Option<H>

Returns the inner H value, if present.

Source

pub fn as_ref_h(&self) -> Option<&H>

Returns a reference to the inner H value, if present.

Source

pub fn as_mut_h(&mut self) -> Option<&mut H>

Returns a reference to the inner H value, if present.

Source

pub const fn is_i(&self) -> bool

Returns true if the value is of type I

Source

pub fn into_i(self) -> Option<I>

Returns the inner I value, if present.

Source

pub fn as_ref_i(&self) -> Option<&I>

Returns a reference to the inner I value, if present.

Source

pub fn as_mut_i(&mut self) -> Option<&mut I>

Returns a reference to the inner I value, if present.

Source

pub const fn is_j(&self) -> bool

Returns true if the value is of type J

Source

pub fn into_j(self) -> Option<J>

Returns the inner J value, if present.

Source

pub fn as_ref_j(&self) -> Option<&J>

Returns a reference to the inner J value, if present.

Source

pub fn as_mut_j(&mut self) -> Option<&mut J>

Returns a reference to the inner J value, if present.

Source

pub const fn is_k(&self) -> bool

Returns true if the value is of type K

Source

pub fn into_k(self) -> Option<K>

Returns the inner K value, if present.

Source

pub fn as_ref_k(&self) -> Option<&K>

Returns a reference to the inner K value, if present.

Source

pub fn as_mut_k(&mut self) -> Option<&mut K>

Returns a reference to the inner K value, if present.

Source

pub const fn is_l(&self) -> bool

Returns true if the value is of type L

Source

pub fn into_l(self) -> Option<L>

Returns the inner L value, if present.

Source

pub fn as_ref_l(&self) -> Option<&L>

Returns a reference to the inner L value, if present.

Source

pub fn as_mut_l(&mut self) -> Option<&mut L>

Returns a reference to the inner L value, if present.

Source

pub fn map_a<NEW>( self, f: impl FnOnce(A) -> NEW, ) -> Enum<LEN, NEW, B, C, D, E, F, G, H, I, J, K, L>

Transforms the inner A value using f, leaving other variants unchanged.

Source

pub fn map_b<NEW>( self, f: impl FnOnce(B) -> NEW, ) -> Enum<LEN, A, NEW, C, D, E, F, G, H, I, J, K, L>

Transforms the inner B value using f, leaving other variants unchanged.

Source

pub fn map_c<NEW>( self, f: impl FnOnce(C) -> NEW, ) -> Enum<LEN, A, B, NEW, D, E, F, G, H, I, J, K, L>

Transforms the inner C value using f, leaving other variants unchanged.

Source

pub fn map_d<NEW>( self, f: impl FnOnce(D) -> NEW, ) -> Enum<LEN, A, B, C, NEW, E, F, G, H, I, J, K, L>

Transforms the inner D value using f, leaving other variants unchanged.

Source

pub fn map_e<NEW>( self, f: impl FnOnce(E) -> NEW, ) -> Enum<LEN, A, B, C, D, NEW, F, G, H, I, J, K, L>

Transforms the inner E value using f, leaving other variants unchanged.

Source

pub fn map_f<NEW>( self, f: impl FnOnce(F) -> NEW, ) -> Enum<LEN, A, B, C, D, E, NEW, G, H, I, J, K, L>

Transforms the inner F value using f, leaving other variants unchanged.

Source

pub fn map_g<NEW>( self, f: impl FnOnce(G) -> NEW, ) -> Enum<LEN, A, B, C, D, E, F, NEW, H, I, J, K, L>

Transforms the inner G value using f, leaving other variants unchanged.

Source

pub fn map_h<NEW>( self, f: impl FnOnce(H) -> NEW, ) -> Enum<LEN, A, B, C, D, E, F, G, NEW, I, J, K, L>

Transforms the inner H value using f, leaving other variants unchanged.

Source

pub fn map_i<NEW>( self, f: impl FnOnce(I) -> NEW, ) -> Enum<LEN, A, B, C, D, E, F, G, H, NEW, J, K, L>

Transforms the inner I value using f, leaving other variants unchanged.

Source

pub fn map_j<NEW>( self, f: impl FnOnce(J) -> NEW, ) -> Enum<LEN, A, B, C, D, E, F, G, H, I, NEW, K, L>

Transforms the inner J value using f, leaving other variants unchanged.

Source

pub fn map_k<NEW>( self, f: impl FnOnce(K) -> NEW, ) -> Enum<LEN, A, B, C, D, E, F, G, H, I, J, NEW, L>

Transforms the inner K value using f, leaving other variants unchanged.

Source

pub fn map_l<NEW>( self, f: impl FnOnce(L) -> NEW, ) -> Enum<LEN, A, B, C, D, E, F, G, H, I, J, K, NEW>

Transforms the inner L value using f, leaving other variants unchanged.

Trait Implementations§

Source§

impl<const LEN: usize, A: Clone, B: Clone, C: Clone, D: Clone, E: Clone, F: Clone, G: Clone, H: Clone, I: Clone, J: Clone, K: Clone, L: Clone> Clone for Enum<LEN, A, B, C, D, E, F, G, H, I, J, K, L>

Source§

fn clone(&self) -> Enum<LEN, A, B, C, D, E, F, G, H, I, J, K, L>

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<const LEN: usize, A: ConstDefault, B, C, D, E, F, G, H, I, J, K, L> ConstDefault for Enum<LEN, A, B, C, D, E, F, G, H, I, J, K, L>

Source§

const DEFAULT: Self

Returns the compile-time “default value” for a type.
Source§

impl<const LEN: usize, A: Debug, B: Debug, C: Debug, D: Debug, E: Debug, F: Debug, G: Debug, H: Debug, I: Debug, J: Debug, K: Debug, L: Debug> Debug for Enum<LEN, A, B, C, D, E, F, G, H, I, J, K, L>

Source§

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

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

impl<const LEN: usize, A: Default, B, C, D, E, F, G, H, I, J, K, L> Default for Enum<LEN, A, B, C, D, E, F, G, H, I, J, K, L>

Source§

fn default() -> Self

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

impl<const LEN: usize, A: Hash, B: Hash, C: Hash, D: Hash, E: Hash, F: Hash, G: Hash, H: Hash, I: Hash, J: Hash, K: Hash, L: Hash> Hash for Enum<LEN, A, B, C, D, E, F, G, H, I, J, K, L>

Source§

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

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

impl<const LEN: usize, A: PartialEq, B: PartialEq, C: PartialEq, D: PartialEq, E: PartialEq, F: PartialEq, G: PartialEq, H: PartialEq, I: PartialEq, J: PartialEq, K: PartialEq, L: PartialEq> PartialEq for Enum<LEN, A, B, C, D, E, F, G, H, I, J, K, L>

Source§

fn eq(&self, other: &Enum<LEN, A, B, C, D, E, F, G, H, I, J, K, L>) -> bool

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

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<const LEN: usize, A: Copy, B: Copy, C: Copy, D: Copy, E: Copy, F: Copy, G: Copy, H: Copy, I: Copy, J: Copy, K: Copy, L: Copy> Copy for Enum<LEN, A, B, C, D, E, F, G, H, I, J, K, L>

Source§

impl<const LEN: usize, A: Eq, B: Eq, C: Eq, D: Eq, E: Eq, F: Eq, G: Eq, H: Eq, I: Eq, J: Eq, K: Eq, L: Eq> Eq for Enum<LEN, A, B, C, D, E, F, G, H, I, J, K, L>

Source§

impl<const LEN: usize, A, B, C, D, E, F, G, H, I, J, K, L> StructuralPartialEq for Enum<LEN, A, B, C, D, E, F, G, H, I, J, K, L>

Auto Trait Implementations§

§

impl<const LEN: usize, A, B, C, D, E, F, G, H, I, J, K, L> Freeze for Enum<LEN, A, B, C, D, E, F, G, H, I, J, K, L>
where A: Freeze, B: Freeze, C: Freeze, D: Freeze, E: Freeze, F: Freeze, G: Freeze, H: Freeze, I: Freeze, J: Freeze, K: Freeze, L: Freeze,

§

impl<const LEN: usize, A, B, C, D, E, F, G, H, I, J, K, L> RefUnwindSafe for Enum<LEN, A, B, C, D, E, F, G, H, I, J, K, L>

§

impl<const LEN: usize, A, B, C, D, E, F, G, H, I, J, K, L> Send for Enum<LEN, A, B, C, D, E, F, G, H, I, J, K, L>
where A: Send, B: Send, C: Send, D: Send, E: Send, F: Send, G: Send, H: Send, I: Send, J: Send, K: Send, L: Send,

§

impl<const LEN: usize, A, B, C, D, E, F, G, H, I, J, K, L> Sync for Enum<LEN, A, B, C, D, E, F, G, H, I, J, K, L>
where A: Sync, B: Sync, C: Sync, D: Sync, E: Sync, F: Sync, G: Sync, H: Sync, I: Sync, J: Sync, K: Sync, L: Sync,

§

impl<const LEN: usize, A, B, C, D, E, F, G, H, I, J, K, L> Unpin for Enum<LEN, A, B, C, D, E, F, G, H, I, J, K, L>
where A: Unpin, B: Unpin, C: Unpin, D: Unpin, E: Unpin, F: Unpin, G: Unpin, H: Unpin, I: Unpin, J: Unpin, K: Unpin, L: Unpin,

§

impl<const LEN: usize, A, B, C, D, E, F, G, H, I, J, K, L> UnwindSafe for Enum<LEN, A, B, C, D, E, F, G, H, I, J, K, L>

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

Source§

const BYTE_ALIGN: usize = _

The alignment of this type in bytes.
Source§

const BYTE_SIZE: usize = _

The size of this type in bytes.
Source§

fn byte_align(&self) -> usize

Returns the alignment of this type in bytes.
Source§

fn byte_size(&self) -> usize

Returns the size of this type in bytes. Read more
Source§

fn ptr_size_ratio(&self) -> [usize; 2]

Returns the size ratio between Ptr::BYTES and BYTE_SIZE. Read more
Source§

impl<T, R> Chain<R> for T
where T: ?Sized,

Source§

fn chain<F>(self, f: F) -> R
where F: FnOnce(Self) -> R, Self: Sized,

Chain a function which takes the parameter by value.
Source§

fn chain_ref<F>(&self, f: F) -> R
where F: FnOnce(&Self) -> R,

Chain a function which takes the parameter by shared reference.
Source§

fn chain_mut<F>(&mut self, f: F) -> R
where F: FnOnce(&mut Self) -> R,

Chain a function which takes the parameter by exclusive reference.
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<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

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

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

impl<T> ExtAny for T
where T: Any + ?Sized,

Source§

fn type_id() -> TypeId

Returns the TypeId of Self. Read more
Source§

fn type_of(&self) -> TypeId

Returns the TypeId of self. Read more
Source§

fn type_name(&self) -> &'static str

Returns the type name of self. Read more
Source§

fn type_is<T: 'static>(&self) -> bool

Returns true if Self is of type T. Read more
Source§

fn type_hash(&self) -> u64

Returns a deterministic hash of the TypeId of Self.
Source§

fn type_hash_with<H: Hasher>(&self, hasher: H) -> u64

Returns a deterministic hash of the TypeId of Self using a custom hasher.
Source§

fn as_any_ref(&self) -> &dyn Any
where Self: Sized,

Upcasts &self as &dyn Any. Read more
Source§

fn as_any_mut(&mut self) -> &mut dyn Any
where Self: Sized,

Upcasts &mut self as &mut dyn Any. Read more
Source§

fn as_any_box(self: Box<Self>) -> Box<dyn Any>
where Self: Sized,

Upcasts Box<self> as Box<dyn Any>. Read more
Source§

fn downcast_ref<T: 'static>(&self) -> Option<&T>

Available on crate feature unsafe_layout only.
Returns some shared reference to the inner value if it is of type T. Read more
Source§

fn downcast_mut<T: 'static>(&mut self) -> Option<&mut T>

Available on crate feature unsafe_layout only.
Returns some exclusive reference to the inner value if it is of type T. Read more
Source§

impl<T> ExtMem for T
where T: ?Sized,

Source§

const NEEDS_DROP: bool = _

Know whether dropping values of this type matters, in compile-time.
Source§

fn mem_align_of<T>() -> usize

Returns the minimum alignment of the type in bytes. Read more
Source§

fn mem_align_of_val(&self) -> usize

Returns the alignment of the pointed-to value in bytes. Read more
Source§

fn mem_size_of<T>() -> usize

Returns the size of a type in bytes. Read more
Source§

fn mem_size_of_val(&self) -> usize

Returns the size of the pointed-to value in bytes. Read more
Source§

fn mem_copy(&self) -> Self
where Self: Copy,

Bitwise-copies a value. Read more
Source§

fn mem_needs_drop(&self) -> bool

Returns true if dropping values of this type matters. Read more
Source§

fn mem_drop(self)
where Self: Sized,

Drops self by running its destructor. Read more
Source§

fn mem_forget(self)
where Self: Sized,

Forgets about self without running its destructor. Read more
Source§

fn mem_replace(&mut self, other: Self) -> Self
where Self: Sized,

Replaces self with other, returning the previous value of self. Read more
Source§

fn mem_take(&mut self) -> Self
where Self: Default,

Replaces self with its default value, returning the previous value of self. Read more
Source§

fn mem_swap(&mut self, other: &mut Self)
where Self: Sized,

Swaps the value of self and other without deinitializing either one. Read more
Source§

unsafe fn mem_zeroed<T>() -> T

Available on crate feature unsafe_layout only.
Returns the value of type T represented by the all-zero byte-pattern. Read more
Source§

unsafe fn mem_transmute_copy<Src, Dst>(src: &Src) -> Dst

Available on crate feature unsafe_layout only.
Returns the value of type T represented by the all-zero byte-pattern. Read more
Source§

fn mem_as_bytes(&self) -> &[u8]
where Self: Sync + Unpin,

Available on crate feature unsafe_slice only.
View a Sync + Unpin self as &[u8]. Read more
Source§

fn mem_as_bytes_mut(&mut self) -> &mut [u8]
where Self: Sync + Unpin,

Available on crate feature unsafe_slice only.
View a Sync + Unpin self as &mut [u8]. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<S> FromSample<S> for S

Source§

fn from_sample_(s: S) -> S

Source§

impl<T> Hook for T

Source§

fn hook_ref<F>(self, f: F) -> Self
where F: FnOnce(&Self),

Applies a function which takes the parameter by shared reference, and then returns the (possibly) modified owned value. Read more
Source§

fn hook_mut<F>(self, f: F) -> Self
where F: FnOnce(&mut Self),

Applies a function which takes the parameter by exclusive reference, and then returns the (possibly) modified owned value. 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
Source§

impl<F, T> IntoSample<T> for F
where T: FromSample<F>,

Source§

fn into_sample(self) -> T

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

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

Initializes a with the given initializer. Read more
Source§

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

Dereferences the given pointer. Read more
Source§

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

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. 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> ToSample<U> for T
where U: FromSample<T>,

Source§

fn to_sample_(self) -> U

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<S, T> Duplex<S> for T
where T: FromSample<S> + ToSample<S>,

Source§

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