pub struct Own<S, V> {
pub s: S,
pub v: V,
}
Expand description
A return type encapsulating an owned state S
and a value V
.
It is designed to be used by methods that take ownership of self
,
and return it alongside the operation-specific result.
By convention methods that return an Own
should to be prefixed with own_
,
and any Result
or Option
should be part of the state
field for the
constructors, and part of the value
field for most other methods, allowing
self
to be passed along a chain of operations.
§Methods
§General methods
Additional const methods are available when both types are Copy
.
- Construct:
new
,empty
. - Deconstruct:
sv
(const)sv_ref
,sv_mut
. - Replace:
s_replace
(const),v_replace
(const),sv_replace
(const), - Wrap:
s_wrap_ok
(const),s_wrap_some
(const),v_wrap_ok
(const),v_wrap_some
(const), - Map:
s_map
,v_map
,sv_map
. - Query:
s_eq
,v_eq
,sv_eq
. - Assert:
s_assert
(or, eq, eq_or),v_assert
(or eq, eq_or),sv_assert
(or, eq, eq_or).
§Methods for when state
is a Result
- Map:
s_map_ok
,s_map_err
,s_and
,s_and_then
. - Assert:
s_assert_ok
(or),s_assert_err
(or). - Unwrap:
s_unwrap
(const),s_unwrap_or
(const),s_expect
(const).
§Methods for when state
is an Option
- Map:
s_map_some
,s_and
,s_and_then
. - Assert:
s_assert_some
(or),s_assert_none
(or). - Unwrap:
s_unwrap
(const),s_unwrap_or
(const),s_expect
(const).
§Methods for when value
is a Result
- Map:
v_map_ok
,v_map_err
,v_and
,v_and_then
. - Assert:
v_assert_ok
(or),v_assert_err
(or). - Unwrap:
v_unwrap
(const),v_unwrap_or
(const),v_expect
(const).
§Methods for when value
is an Option
- Map:
v_map_some
,v_and
,v_and_then
. - Assert:
v_assert_some
(or),v_assert_none
(or). - Unwrap:
v_unwrap
(const),v_unwrap_or
(const),v_expect
(const).
Fields§
§s: S
The state
after the operation.
v: V
The value
resulting from the operation.
Implementations§
Source§impl<S, V> Own<S, V>
§General methods.
impl<S, V> Own<S, V>
§General methods.
Sourcepub fn sv_mut(&mut self) -> (&mut S, &mut V) ⓘ
pub fn sv_mut(&mut self) -> (&mut S, &mut V) ⓘ
Returns exclusive references to both state
and value
.
Sourcepub fn sv_replace(self, new_state: S, new_value: V) -> Self
pub fn sv_replace(self, new_state: S, new_value: V) -> Self
Replaces the existing state
and value
with new_state
and new_value
, respectively.
Sourcepub fn s_wrap_some(self) -> Own<Option<S>, V>
pub fn s_wrap_some(self) -> Own<Option<S>, V>
Wraps the state
field into Some
.
Sourcepub fn v_wrap_some(self) -> Own<S, Option<V>>
pub fn v_wrap_some(self) -> Own<S, Option<V>>
Wraps the value
field into Some
.
Sourcepub fn s_map<T, F: FnOnce(S) -> T>(self, f: F) -> Own<T, V>
pub fn s_map<T, F: FnOnce(S) -> T>(self, f: F) -> Own<T, V>
Applies a mapping function to the state.
Sourcepub fn v_map<W, F: FnOnce(V) -> W>(self, f: F) -> Own<S, W>
pub fn v_map<W, F: FnOnce(V) -> W>(self, f: F) -> Own<S, W>
Applies a mapping function to the value.
Sourcepub fn sv_map<F, G, T, W>(self, sf: F, vf: G) -> Own<T, W>
pub fn sv_map<F, G, T, W>(self, sf: F, vf: G) -> Own<T, W>
Applies applies a separate mapping function to the state and value.
Sourcepub fn s_eq(&self, expected: &S) -> boolwhere
S: PartialEq,
pub fn s_eq(&self, expected: &S) -> boolwhere
S: PartialEq,
Returns true
if the current state
equals the given expected
state.
Sourcepub fn v_eq(&self, expected: &V) -> boolwhere
V: PartialEq,
pub fn v_eq(&self, expected: &V) -> boolwhere
V: PartialEq,
Returns true
if the current value
equals the given expected
value.
Sourcepub fn sv_eq(&self, expected_state: &S, expected_value: &V) -> bool
pub fn sv_eq(&self, expected_state: &S, expected_value: &V) -> bool
Returns true
if the current state
and value
equals the corresponding expected ones.
Sourcepub fn s_assert<F: FnOnce(&S) -> bool>(self, predicate: F) -> Self
pub fn s_assert<F: FnOnce(&S) -> bool>(self, predicate: F) -> Self
Asserts the state
matches the predicate
, otherwise panics.
§Panics
Panics if the predicate returns false
.
Sourcepub fn s_assert_or<F: FnOnce(&S) -> bool>(
self,
predicate: F,
message: &str,
) -> Self
pub fn s_assert_or<F: FnOnce(&S) -> bool>( self, predicate: F, message: &str, ) -> Self
Asserts the state
matches the predicate
, otherwise panics with message
.
§Panics
Panics if the predicate returns false
.
Sourcepub fn s_assert_eq(self, expected_state: &S) -> Selfwhere
S: PartialEq,
pub fn s_assert_eq(self, expected_state: &S) -> Selfwhere
S: PartialEq,
Asserts the state
equals expected
and returns self
, otherwise panics.
§Panics
Panics if the state
doesn’t equal the expected
state.
Sourcepub fn s_assert_eq_or(self, expected_state: &S, message: &str) -> Selfwhere
S: PartialEq,
pub fn s_assert_eq_or(self, expected_state: &S, message: &str) -> Selfwhere
S: PartialEq,
Asserts the state
equals expected
and returns self
, otherwise panics with message
.
§Panics
Panics if the state
doesn’t equal the expected
state.
Sourcepub fn v_assert<F: FnOnce(&V) -> bool>(self, predicate: F) -> Self
pub fn v_assert<F: FnOnce(&V) -> bool>(self, predicate: F) -> Self
Asserts the value
matches the predicate
, otherwise panics.
§Panics
Panics if the predicate returns false
.
Sourcepub fn v_assert_or<F: FnOnce(&V) -> bool>(
self,
predicate: F,
message: &str,
) -> Self
pub fn v_assert_or<F: FnOnce(&V) -> bool>( self, predicate: F, message: &str, ) -> Self
Asserts the value
matches the predicate
, otherwise panics with message
.
§Panics
Panics if the predicate returns false
.
Sourcepub fn v_assert_eq(self, expected_value: &V) -> Selfwhere
V: PartialEq,
pub fn v_assert_eq(self, expected_value: &V) -> Selfwhere
V: PartialEq,
Asserts the value
equals expected
and returns self
, otherwise panics.
§Panics
Panics if the value
doesn’t equal the expected
value.
Sourcepub fn v_assert_eq_or(self, expected_value: &V, message: &str) -> Selfwhere
V: PartialEq,
pub fn v_assert_eq_or(self, expected_value: &V, message: &str) -> Selfwhere
V: PartialEq,
Asserts the value
equals expected
and returns self
, otherwise panics with message
.
§Panics
Panics if the value
doesn’t equal the expected
value.
Sourcepub fn sv_assert<F, G>(self, s_predicate: F, v_predicate: G) -> Self
pub fn sv_assert<F, G>(self, s_predicate: F, v_predicate: G) -> Self
Asserts both the state
and value
matches the corresponding predicates,
otherwise panics.
§Panics
Panics if any predicate returns false
.
Sourcepub fn sv_assert_or<F, G>(
self,
s_predicate: F,
v_predicate: G,
message: &str,
) -> Self
pub fn sv_assert_or<F, G>( self, s_predicate: F, v_predicate: G, message: &str, ) -> Self
Asserts both the state
and value
matches the corresponding predicates,
otherwise panics with message
.
§Panics
Panics if any predicate returns false
.
Sourcepub fn sv_assert_eq(self, expected_state: &S, expected_value: &V) -> Self
pub fn sv_assert_eq(self, expected_state: &S, expected_value: &V) -> Self
Asserts the state
and value
equals the corresponding expected ones,
and returns self
, otherwise panics.
§Panics
Panics if either the state
or the value
are not the expected ones.
Source§impl<S: Copy, V: Copy> Own<S, V>
§Additional const
impl<S: Copy, V: Copy> Own<S, V>
§Additional const
Copy
.Sourcepub const fn s_const_replace(self, s: S) -> Self
pub const fn s_const_replace(self, s: S) -> Self
Replaces the state
self with a new_state
, in compile-time.
Sourcepub const fn v_const_replace(self, v: V) -> Self
pub const fn v_const_replace(self, v: V) -> Self
Replaces the value
with a new_value
, in compile-time.
Sourcepub const fn sv_const_replace(self, new_state: S, new_value: V) -> Self
pub const fn sv_const_replace(self, new_state: S, new_value: V) -> Self
Replaces the state
self with a new_state
and the value
with a new_value
,
in compile-time.
Sourcepub const fn s_const_wrap_ok<E>(self) -> Own<Result<S, E>, V>
pub const fn s_const_wrap_ok<E>(self) -> Own<Result<S, E>, V>
Wraps the state
field into a Result
, in compile-time.
Sourcepub const fn s_const_wrap_some(self) -> Own<Option<S>, V>
pub const fn s_const_wrap_some(self) -> Own<Option<S>, V>
Wraps the state
field into an Option
, in compile-time.
Sourcepub const fn v_const_wrap_ok<E>(self) -> Own<S, Result<V, E>>
pub const fn v_const_wrap_ok<E>(self) -> Own<S, Result<V, E>>
Wraps the value
field into a Result
, in compile-time.
Sourcepub const fn v_const_wrap_some(self) -> Own<S, Option<V>>
pub const fn v_const_wrap_some(self) -> Own<S, Option<V>>
Wraps the value
field into an Option
, in compile-time.
Source§impl<S, E, V> Own<Result<S, E>, V>
§Additional methods for when the state
is a Result
.
impl<S, E, V> Own<Result<S, E>, V>
§Additional methods for when the state
is a Result
.
Sourcepub const fn s_assert_ok(self) -> Self
pub const fn s_assert_ok(self) -> Self
Sourcepub const fn s_assert_ok_or(self, message: &'static str) -> Self
pub const fn s_assert_ok_or(self, message: &'static str) -> Self
Sourcepub const fn s_assert_err(self) -> Self
pub const fn s_assert_err(self) -> Self
Sourcepub const fn s_assert_err_or(self, message: &'static str) -> Self
pub const fn s_assert_err_or(self, message: &'static str) -> Self
Sourcepub fn s_unwrap_or(self, default: S) -> Own<S, V>
pub fn s_unwrap_or(self, default: S) -> Own<S, V>
Source§impl<S: Copy, E: Copy, V: Copy> Own<Result<S, E>, V>
§const
impl<S: Copy, E: Copy, V: Copy> Own<Result<S, E>, V>
§const
Copy
and the state
is a Result
.Sourcepub const fn s_const_unwrap(self) -> Own<S, V>
pub const fn s_const_unwrap(self) -> Own<S, V>
Sourcepub const fn s_const_unwrap_or(self, default: S) -> Own<S, V>
pub const fn s_const_unwrap_or(self, default: S) -> Own<S, V>
Unwraps the contained Ok(state)
or provides a default
.
Sourcepub const fn s_const_expect(self, message: &'static str) -> Own<S, V>
pub const fn s_const_expect(self, message: &'static str) -> Own<S, V>
Unwraps the contained Ok(state)
or panics with the given message
.
§Panics
Panics if the state is Err
.
Source§impl<S, V> Own<Option<S>, V>
§Additional methods for when the value
field is an Option
.
impl<S, V> Own<Option<S>, V>
§Additional methods for when the value
field is an Option
.
Sourcepub fn s_map_some<T, F: FnOnce(S) -> T>(self, op: F) -> Own<Option<T>, V>
pub fn s_map_some<T, F: FnOnce(S) -> T>(self, op: F) -> Own<Option<T>, V>
Maps an Option<S>
to an Option<T>
by applying the op
function
to a contained state (if Some
), or returns None
(if None
).
Sourcepub fn s_and<T>(self, res: Option<T>) -> Own<Option<T>, V>
pub fn s_and<T>(self, res: Option<T>) -> Own<Option<T>, V>
Returns None
if the state is None
, otherwise returns optb
.
Sourcepub fn s_and_then<T, F: FnOnce(S) -> Option<T>>(
self,
op: F,
) -> Own<Option<T>, V>
pub fn s_and_then<T, F: FnOnce(S) -> Option<T>>( self, op: F, ) -> Own<Option<T>, V>
Returns None
if the state is None
,
otherwise calls op
with the wrapped state and returns the result.
Sourcepub const fn s_assert_some(self) -> Self
pub const fn s_assert_some(self) -> Self
Sourcepub const fn s_assert_some_or(self, message: &'static str) -> Self
pub const fn s_assert_some_or(self, message: &'static str) -> Self
Sourcepub const fn s_assert_none(self) -> Self
pub const fn s_assert_none(self) -> Self
Sourcepub const fn s_assert_none_or(self, message: &'static str) -> Self
pub const fn s_assert_none_or(self, message: &'static str) -> Self
Sourcepub fn s_unwrap_or(self, default: S) -> Own<S, V>
pub fn s_unwrap_or(self, default: S) -> Own<S, V>
Unwraps the contained Some(state)
or provides a default
.
Source§impl<S: Copy, V: Copy> Own<Option<S>, V>
§const
impl<S: Copy, V: Copy> Own<Option<S>, V>
§const
Copy
and the value
is an Option
.Sourcepub const fn s_const_unwrap(self) -> Own<S, V>
pub const fn s_const_unwrap(self) -> Own<S, V>
Sourcepub const fn s_const_unwrap_or(self, default: S) -> Own<S, V>
pub const fn s_const_unwrap_or(self, default: S) -> Own<S, V>
Unwraps the contained Some(state)
or provides a default
.
Sourcepub const fn s_const_expect(self, message: &'static str) -> Own<S, V>
pub const fn s_const_expect(self, message: &'static str) -> Own<S, V>
Unwraps the contained Some(state)
or panics with the given message
.
§Panics
Panics if the state is None
.
Source§impl<S, V, E> Own<S, Result<V, E>>
§Additional methods for when the value
field is a Result
.
impl<S, V, E> Own<S, Result<V, E>>
§Additional methods for when the value
field is a Result
.
Sourcepub const fn v_assert_ok(self) -> Self
pub const fn v_assert_ok(self) -> Self
Sourcepub const fn v_assert_ok_or(self, message: &'static str) -> Self
pub const fn v_assert_ok_or(self, message: &'static str) -> Self
Sourcepub const fn v_assert_err(self) -> Self
pub const fn v_assert_err(self) -> Self
Sourcepub const fn v_assert_err_or(self, message: &'static str) -> Self
pub const fn v_assert_err_or(self, message: &'static str) -> Self
Sourcepub fn v_unwrap_or(self, default: V) -> Own<S, V>
pub fn v_unwrap_or(self, default: V) -> Own<S, V>
Unwraps the contained Ok(value)
or provides a default
.
Source§impl<S: Copy, V: Copy, E: Copy> Own<S, Result<V, E>>
§const
impl<S: Copy, V: Copy, E: Copy> Own<S, Result<V, E>>
§const
Copy
and the value
is a Result
.Sourcepub const fn v_const_unwrap(self) -> Own<S, V>
pub const fn v_const_unwrap(self) -> Own<S, V>
Sourcepub const fn v_const_unwrap_or(self, default: V) -> Own<S, V>
pub const fn v_const_unwrap_or(self, default: V) -> Own<S, V>
Unwraps the contained Ok(value)
or provides a default
.
Sourcepub const fn v_const_expect_const(self, message: &'static str) -> Own<S, V>
pub const fn v_const_expect_const(self, message: &'static str) -> Own<S, V>
Unwraps the contained Ok(value)
or panics with the given message
.
§Panics
Panics if the value is Err
.
Source§impl<S, V> Own<S, Option<V>>
§Additional methods for when the value
field is an Option
.
impl<S, V> Own<S, Option<V>>
§Additional methods for when the value
field is an Option
.
Sourcepub fn v_map_some<W, F: FnOnce(V) -> W>(self, op: F) -> Own<S, Option<W>>
pub fn v_map_some<W, F: FnOnce(V) -> W>(self, op: F) -> Own<S, Option<W>>
Maps an Option<V>
to an Option<W>
by applying the op
function
to a contained value (if Some
), or returns None
(if None
).
Sourcepub fn v_and<W>(self, optb: Option<W>) -> Own<S, Option<W>>
pub fn v_and<W>(self, optb: Option<W>) -> Own<S, Option<W>>
Returns None
if the value is None
,
otherwise returns optb
.
Sourcepub fn v_and_then<W, F: FnOnce(V) -> Option<W>>(
self,
op: F,
) -> Own<S, Option<W>>
pub fn v_and_then<W, F: FnOnce(V) -> Option<W>>( self, op: F, ) -> Own<S, Option<W>>
Returns None
if the value is None
,
otherwise calls op
with the wrapped value and returns the result.
Sourcepub const fn v_assert_some(self) -> Self
pub const fn v_assert_some(self) -> Self
Sourcepub const fn v_assert_some_or(self, message: &'static str) -> Self
pub const fn v_assert_some_or(self, message: &'static str) -> Self
Sourcepub const fn v_assert_none(self) -> Self
pub const fn v_assert_none(self) -> Self
Sourcepub const fn v_assert_none_or(self, message: &'static str) -> Self
pub const fn v_assert_none_or(self, message: &'static str) -> Self
Sourcepub fn v_unwrap_or(self, default: V) -> Own<S, V>
pub fn v_unwrap_or(self, default: V) -> Own<S, V>
Unwraps the contained Some(value)
or provides a default
.
Source§impl<S: Copy, V: Copy> Own<S, Option<V>>
§const
impl<S: Copy, V: Copy> Own<S, Option<V>>
§const
Copy
and the value
is an Option
.Sourcepub const fn v_const_unwrap(self) -> Own<S, V>
pub const fn v_const_unwrap(self) -> Own<S, V>
Sourcepub const fn v_const_unwrap_or(self, default: V) -> Own<S, V>
pub const fn v_const_unwrap_or(self, default: V) -> Own<S, V>
Unwraps the contained Some(value)
or provides a default
.
Sourcepub const fn v_const_expect(self, message: &'static str) -> Own<S, V>
pub const fn v_const_expect(self, message: &'static str) -> Own<S, V>
Unwraps the contained Some(value)
or panics with the given message
.
§Panics
Panics if the value is None
.
Trait Implementations§
Source§impl<S: ConstDefault, V: ConstDefault> ConstDefault for Own<S, V>
impl<S: ConstDefault, V: ConstDefault> ConstDefault for Own<S, V>
Source§impl<S: Ord, V: Ord> Ord for Own<S, V>
impl<S: Ord, V: Ord> Ord for Own<S, V>
Source§fn cmp(&self, other: &Self) -> Ordering
fn cmp(&self, other: &Self) -> Ordering
State’s ordering takes precedence over value’s ordering.
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl<S: PartialOrd, V: PartialOrd> PartialOrd for Own<S, V>
impl<S: PartialOrd, V: PartialOrd> PartialOrd for Own<S, V>
impl<S: Copy, V: Copy> Copy for Own<S, V>
impl<S: Eq, V: Eq> Eq for Own<S, V>
Auto Trait Implementations§
impl<S, V> Freeze for Own<S, V>
impl<S, V> RefUnwindSafe for Own<S, V>where
S: RefUnwindSafe,
V: RefUnwindSafe,
impl<S, V> Send for Own<S, V>
impl<S, V> Sync for Own<S, V>
impl<S, V> Unpin for Own<S, V>
impl<S, V> UnwindSafe for Own<S, V>where
S: UnwindSafe,
V: UnwindSafe,
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> ByteSized for T
impl<T> ByteSized for T
Source§const BYTE_ALIGN: usize = _
const BYTE_ALIGN: usize = _
Source§fn byte_align(&self) -> usize ⓘ
fn byte_align(&self) -> usize ⓘ
Source§fn ptr_size_ratio(&self) -> [usize; 2]
fn ptr_size_ratio(&self) -> [usize; 2]
Source§impl<T, R> Chain<R> for Twhere
T: ?Sized,
impl<T, R> Chain<R> for Twhere
T: ?Sized,
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.Source§impl<T> ExtAny for T
impl<T> ExtAny for T
Source§fn as_any_mut(&mut self) -> &mut dyn Anywhere
Self: Sized,
fn as_any_mut(&mut self) -> &mut dyn Anywhere
Self: Sized,
Source§impl<T> ExtMem for Twhere
T: ?Sized,
impl<T> ExtMem for Twhere
T: ?Sized,
Source§const NEEDS_DROP: bool = _
const NEEDS_DROP: bool = _
Source§fn mem_align_of_val(&self) -> usize ⓘ
fn mem_align_of_val(&self) -> usize ⓘ
Source§fn mem_size_of_val(&self) -> usize ⓘ
fn mem_size_of_val(&self) -> usize ⓘ
Source§fn mem_needs_drop(&self) -> bool
fn mem_needs_drop(&self) -> bool
true
if dropping values of this type matters. Read moreSource§fn mem_forget(self)where
Self: Sized,
fn mem_forget(self)where
Self: Sized,
self
without running its destructor. Read moreSource§fn mem_replace(&mut self, other: Self) -> Selfwhere
Self: Sized,
fn mem_replace(&mut self, other: Self) -> Selfwhere
Self: Sized,
Source§unsafe fn mem_zeroed<T>() -> T
unsafe fn mem_zeroed<T>() -> T
unsafe_layout
only.T
represented by the all-zero byte-pattern. Read moreSource§unsafe fn mem_transmute_copy<Src, Dst>(src: &Src) -> Dst
unsafe fn mem_transmute_copy<Src, Dst>(src: &Src) -> Dst
unsafe_layout
only.T
represented by the all-zero byte-pattern. Read moreSource§fn mem_as_bytes(&self) -> &[u8] ⓘ
fn mem_as_bytes(&self) -> &[u8] ⓘ
unsafe_slice
only.§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> Hook for T
impl<T> Hook for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError> ⓘ
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError> ⓘ
§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out
indicating that a T
is niched.