Struct NestedFieldPathSet

Source
pub struct NestedFieldPathSet<F, S, U> { /* private fields */ }
Expand description

Allows accessing multiple fields inside of some nested field.

This is most useful for accessing multiple fields inside of a (nested) enum.

This is the type that fp!(a.b => b, c, d) and fp!(::Foo => bar, baz, qux) construct.

§Uniqueness

If the U type parameter is a:

  • UniquePaths: all the field paths are unique, and this can be passed to StructuralExt::fields_mut and StructuralExt::into_fields.

  • AliasedPaths: there might be repeated field paths. This cannot be passed to StructuralExt::fields_mut, because it might borrow the same field mutably twice. This can also not be passed to StructuralExt::into_fields, because a field cannot generally be moved out twice.

§Construction

NestedFieldPathSet can be constructed in these ways:

  • Using the fp macro.
    Example: fp!(::Foo=>a,b), this gets the a,and b fields from inside the Foo variant.
    Example: fp!(a.b=>uh,what), this gets the uh,and what fields from inside the a.b field.

  • Constructing it from a NestedFieldPath and a FieldPathSet.
    Example: NestedFieldPathSet::new( fp!(a.b.c), fp!(foo,bar,baz) ), this gets the foo,bar,and baz fields from inside the a.b.c field.
    Example: NestedFieldPathSet::new( fp!(::Foo), fp!(a,b) ), this gets the a,and b fields from inside the Foo variant.

  • Using the NEW associated constant, if F and S implements core_extensions::ConstDefault (reexported in structural::reexports::ConstDefault) Example: <FP!(::Foo=>a,b,c)>::NEW

§Drop Types

To make all the inherent methods in this type const fn this type wraps the NestedFieldPath<F> inside a ManuallyDrop, which means that F won’t be dropped inside. If that is a problem don’t construct a NestedFieldPathSet with an F that owns some resource.

§Examples

You can look for examples of using this in the multi-field StructuralExt methods, like fields,fields_mut,and into_fields (look for the enum examples).

Implementations§

Source§

impl<F, S> NestedFieldPathSet<F, S, AliasedPaths>

Source

pub const NEW: Self = Self::DEFAULT

Constructs a NestedFieldPathSet.

Source§

impl<F, S, U> NestedFieldPathSet<F, S, U>

Source

pub const NEW_ALIASED: NestedFieldPathSet<F, S, AliasedPaths> = NestedFieldPathSet::NEW

This can be used to construct a NestedFieldPathSet<T, UniquePaths> from a type alias, by doing unsafe{ FOO::NEW_ALIASED.upgrade_unchecked() } (read the docs for upgrade_unchecked first).

Source§

impl<F, S, U> NestedFieldPathSet<F, S, U>

Source

pub const fn new(nested: F, set: FieldPathSet<S, U>) -> Self

Constructs a NestedFieldPathSet from an F and a FieldPathSet

Source

pub const fn into_inner(self) -> (F, FieldPathSet<S, U>)

Unwraps a NestedFieldPathSet into a NestedFieldPath and a FieldPathSet

Source

pub const fn into_nested(self) -> F

Unwraps a NestedFieldPathSet into the NestedFieldPath for the nested field.

Source

pub const fn into_set(self) -> FieldPathSet<S, U>

Unwraps a NestedFieldPathSet into the FieldPathSet used to access the multiple fields inside a nested field.

Source§

impl<F, S> NestedFieldPathSet<F, S, UniquePaths>

Source

pub const fn downgrade(self) -> NestedFieldPathSet<F, S, AliasedPaths>

Converts a NestedFieldPathSet<F, S, UniquePaths> to a NestedFieldPathSet<F, S, AliasedPaths>

Source§

impl<F, S> NestedFieldPathSet<F, S, AliasedPaths>

Source

pub const unsafe fn upgrade_unchecked( self, ) -> NestedFieldPathSet<F, S, UniquePaths>

Converts a NestedFieldPathSet<F, S, AliasedPaths> to a NestedFieldPathSet<F, S, UniquePaths>

§Safety

You must ensure that all the field paths in in the S type parameter are unique, there must be no field path that is a prefix of any other field path.

Source

pub const unsafe fn set_uniqueness<U>(self) -> NestedFieldPathSet<F, S, U>

Converts a NestedFieldPathSet<F, S, AliasedPaths> to a NestedFieldPathSet<F, S, U>

§Safety

If U == UniquePaths, you must ensure that all the field paths in the S type parameter are unique, there must be no field path that is a prefix of any other field path.

Trait Implementations§

Source§

impl<F: Clone, S: Clone, U: Clone> Clone for NestedFieldPathSet<F, S, U>

Source§

fn clone(&self) -> NestedFieldPathSet<F, S, U>

Returns a duplicate 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<F, S> ConstDefault for NestedFieldPathSet<F, S, AliasedPaths>

Source§

const DEFAULT: Self

The default value for Self.
Source§

impl<F: Debug, S: Debug, U: Debug> Debug for NestedFieldPathSet<F, S, U>

Source§

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

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

impl<F, S> Default for NestedFieldPathSet<F, S, AliasedPaths>
where F: Default, S: Default,

Source§

fn default() -> Self

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

impl<F, S, U> IntoAliasing for NestedFieldPathSet<F, S, U>

Source§

type Output = NestedFieldPathSet<F, S, AliasedPaths>

The return value of this trait.
Source§

impl<F, S, U> IsMultiFieldPath for NestedFieldPathSet<F, S, U>

Source§

type PathUniqueness = U

Whether the paths in the set can contain duplicate paths. Read more
Source§

impl<This, A, B, U> RevFieldErr<This> for NestedFieldPathSet<A, (B,), U>
where This: ?Sized, A: RevFieldErr<This>, B: RevFieldErr<A::Ty>, (A::Err, B::Err): CombinedErrs,

Source§

type Err = <(<A as RevFieldErr<This>>::Err, <B as RevFieldErr<<A as RevFieldType<This>>::Ty>>::Err) as CombinedErrs>::Combined

The error returned by rev_* methods. Read more
Source§

impl<This, A, B, U> RevFieldType<This> for NestedFieldPathSet<A, (B,), U>
where This: ?Sized, A: RevFieldType<This>, B: RevFieldType<A::Ty>,

Source§

type Ty = <B as RevFieldType<<A as RevFieldType<This>>::Ty>>::Ty

The type of the field.
Source§

impl<'a, This, A, B, U> RevGetFieldImpl<'a, This> for NestedFieldPathSet<A, (B,), U>
where This: ?Sized + 'a, A: RevGetFieldImpl<'a, This>, B: RevGetFieldImpl<'a, A::Ty>, A::Ty: 'a, Self: RevFieldErr<This, Ty = B::Ty>, A::Err: IntoFieldErr<Self::Err>, B::Err: IntoFieldErr<Self::Err>,

Source§

fn rev_get_field(self, this: &'a This) -> Result<&'a B::Ty, Self::Err>

Accesses the field that self represents inside of this,by reference.
Source§

impl<'a, This, A, B, U> RevGetFieldMutImpl<'a, This> for NestedFieldPathSet<A, (B,), U>
where This: ?Sized + 'a, A: RevGetFieldMutImpl<'a, This>, B: RevGetFieldMutImpl<'a, A::Ty>, A::Ty: 'a, Self: RevFieldErr<This, Ty = B::Ty>, A::Err: IntoFieldErr<Self::Err>, B::Err: IntoFieldErr<Self::Err>,

Source§

fn rev_get_field_mut( self, this: &'a mut This, ) -> Result<&'a mut B::Ty, Self::Err>

Accesses the field that self represents inside of this,by mutable reference.
Source§

unsafe fn rev_get_field_raw_mut( self, this: *mut This, ) -> Result<*mut B::Ty, Self::Err>

Accesses the field that self represents inside of this,by raw pointer. Read more
Source§

impl<'a, F, S, U, This, Mid, OutTy, OutErr> RevGetMultiFieldImpl<'a, This> for NestedFieldPathSet<F, S, U>
where F: RevGetFieldImpl<'a, This, Ty = Mid, Err = OutErr>, FieldPathSet<S, U>: RevGetMultiFieldImpl<'a, Mid, UnnormFields = OutTy>, OutErr: IsFieldErr, This: 'a + ?Sized, Mid: 'a + ?Sized, OutTy: 'a + NormalizeFields, NestedFieldPathSetOutput<OutTy, OutErr>: 'a + NormalizeFields,

Source§

type UnnormFields = NestedFieldPathSetOutput<OutTy, OutErr>

A collection of Results<&'a _,_>s referencing fields.
Source§

fn rev_get_multi_field_impl( self, this: &'a This, ) -> NestedFieldPathSetOutput<OutTy, OutErr>

Gets references to multiple fields from this.
Source§

impl<'a, F, S, This, Mid, OutTy, OutRawTy, OutErr> RevGetMultiFieldMutImpl<'a, This> for NestedFieldPathSet<F, S, UniquePaths>
where F: RevGetFieldMutImpl<'a, This, Ty = Mid, Err = OutErr>, FieldPathSet<S, UniquePaths>: RevGetMultiFieldMutImpl<'a, Mid, UnnormFieldsMut = OutTy, UnnormFieldsRawMut = OutRawTy>, This: 'a + ?Sized, OutErr: IsFieldErr, Mid: 'a + ?Sized, OutTy: 'a + NormalizeFields, OutRawTy: 'a + NormalizeFields, NestedFieldPathSetOutput<OutTy, OutErr>: 'a + NormalizeFields, NestedFieldPathSetOutput<OutRawTy, OutErr>: 'a + NormalizeFields,

Source§

type UnnormFieldsMut = NestedFieldPathSetOutput<OutTy, OutErr>

This is usually a tuple of Result<&mut _,E: IsFieldErr>s.
Source§

type UnnormFieldsRawMut = NestedFieldPathSetOutput<OutRawTy, OutErr>

This is usually a tuple of Result<*mut _,E: IsFieldErr>s.
Source§

fn rev_get_multi_field_mut_impl( self, this: &'a mut This, ) -> NestedFieldPathSetOutput<OutTy, OutErr>

Gets mutable references to multiple fields from this, usually a tuple of Result<&mut _,E: IsFieldErr>s.
Source§

unsafe fn rev_get_multi_field_raw_mut_impl( self, this: *mut This, ) -> NestedFieldPathSetOutput<OutRawTy, OutErr>

Gets raw pointers to multiple fields from this, usually a tuple of Result<*mut _,E: IsFieldErr>s. Read more
Source§

impl<This, A, B, U> RevIntoFieldImpl<This> for NestedFieldPathSet<A, (B,), U>
where This: ?Sized, A: RevIntoFieldImpl<This>, B: RevIntoFieldImpl<A::Ty>, A::Ty: Sized, Self: RevFieldErr<This, Ty = B::Ty>, A::Err: IntoFieldErr<Self::Err>, B::Err: IntoFieldErr<Self::Err>,

Source§

fn rev_into_field(self, this: This) -> Result<B::Ty, Self::Err>
where This: Sized, B::Ty: Sized,

Accesses the field that self represents inside of this,by value.
Source§

impl<F, S, This, Mid, OutTy, OutErr> RevIntoMultiFieldImpl<This> for NestedFieldPathSet<F, S, UniquePaths>
where F: RevIntoFieldImpl<This, Ty = Mid, Err = OutErr>, FieldPathSet<S, UniquePaths>: RevIntoMultiFieldImpl<Mid, UnnormIntoFields = OutTy>, OutTy: NormalizeFields, OutErr: IsFieldErr, NestedFieldPathSetOutput<OutTy, OutErr>: NormalizeFields,

Source§

type UnnormIntoFields = NestedFieldPathSetOutput<OutTy, OutErr>

This is usually a tuple of Result<_, E: IsFieldErr>s.
Source§

fn rev_into_multi_field_impl(self, this: This) -> Self::UnnormIntoFields

Converts this into multiple fields by value, usually a tuple of Result<_, E: IsFieldErr>s.
Source§

impl<F: Copy, S: Copy, U: Copy> Copy for NestedFieldPathSet<F, S, U>

Source§

impl<F, S, U> IsSingleFieldPath for NestedFieldPathSet<F, (S,), U>

Auto Trait Implementations§

§

impl<F, S, U> Freeze for NestedFieldPathSet<F, S, U>
where F: Freeze, S: Freeze,

§

impl<F, S, U> RefUnwindSafe for NestedFieldPathSet<F, S, U>

§

impl<F, S, U> Send for NestedFieldPathSet<F, S, U>
where F: Send, S: Send, U: Send,

§

impl<F, S, U> Sync for NestedFieldPathSet<F, S, U>
where F: Sync, S: Sync, U: Sync,

§

impl<F, S, U> Unpin for NestedFieldPathSet<F, S, U>
where F: Unpin, S: Unpin, U: Unpin,

§

impl<F, S, U> UnwindSafe for NestedFieldPathSet<F, S, U>
where F: UnwindSafe, S: UnwindSafe, U: 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<This> EnumExt for This
where This: ?Sized,

Source§

fn as_variant<V>( &self, vari: TStr<V>, ) -> Result<&VariantProxy<Self, TStr<V>>, &Self>
where Self: IsVariant<TStr<V>>,

Fallibly converts a reference to an enum into a reference of a VariantProxy of some variant. Read more
Source§

fn as_mut_variant<V>( &mut self, vari: TStr<V>, ) -> Result<&mut VariantProxy<Self, TStr<V>>, &mut Self>
where Self: IsVariant<TStr<V>>,

Fallibly converts a mutable reference to an enum into a mutable reference of a VariantProxy of some variant. Read more
Source§

unsafe fn as_raw_mut_variant<V>( this: *mut Self, vari: TStr<V>, ) -> Result<*mut VariantProxy<Self, TStr<V>>, *mut Self>
where Self: IsVariant<TStr<V>>,

Fallibly converts a raw pointer to an enum into a raw pointer of a VariantProxy of some variant. Read more
Source§

fn into_variant<V>( self, vari: TStr<V>, ) -> Result<VariantProxy<Self, TStr<V>>, Self>
where Self: IsVariant<TStr<V>> + Sized,

Fallibly converts an enum into a VariantProxy of some variant. Read more
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<This, T> IntoStructural<T> for This
where T: FromStructural<This>,

Source§

fn into_structural(self) -> T

Performs the conversion
Source§

impl<'a, This, Path> RevGetMultiField<'a, This> for Path
where This: 'a + ?Sized, Path: RevGetMultiFieldImpl<'a, This>,

Source§

type Fields = <<Path as RevGetMultiFieldImpl<'a, This>>::UnnormFields as NormalizeFields>::Output

This is usually a tuple of Option<&_>s and &_s.
Source§

fn rev_get_multi_field( self, this: &'a This, ) -> <Path as RevGetMultiField<'a, This>>::Fields

Gets references to multiple fields from this, usually a tuple of Option<&_>s and &_s.
Source§

impl<'a, This, Path> RevGetMultiFieldMut<'a, This> for Path
where This: 'a + ?Sized, Path: RevGetMultiFieldMutImpl<'a, This>,

Source§

type FieldsMut = <<Path as RevGetMultiFieldMutImpl<'a, This>>::UnnormFieldsMut as NormalizeFields>::Output

This is usually a tuple of Option<&mut _>s and &mut _s.
Source§

type FieldsRawMut = <<Path as RevGetMultiFieldMutImpl<'a, This>>::UnnormFieldsRawMut as NormalizeFields>::Output

This is usually a tuple of Option<*mut _>s and *mut _s.
Source§

fn rev_get_multi_field_mut( self, this: &'a mut This, ) -> <Path as RevGetMultiFieldMut<'a, This>>::FieldsMut

Gets mutable references to multiple fields from this, usually a tuple of Option<&mut _>s and &mut _s.
Source§

unsafe fn rev_get_multi_field_raw_mut( self, this: *mut This, ) -> <Path as RevGetMultiFieldMut<'a, This>>::FieldsRawMut

Gets raw pointers to multiple fields from this, usually a tuple of Option<*mut _>s and *mut _s. Read more
Source§

impl<This, Path> RevIntoMultiField<This> for Path
where Path: RevIntoMultiFieldImpl<This>,

Source§

type IntoFields = <<Path as RevIntoMultiFieldImpl<This>>::UnnormIntoFields as NormalizeFields>::Output

This is usually a tuple of Option<T>s and Ts.
Source§

fn rev_into_multi_field( self, this: This, ) -> <Path as RevIntoMultiField<This>>::IntoFields

Converts this into multiple fields by value. usually a tuple of Option<T>s and Ts.
Source§

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

Source§

const T: PhantomData<fn() -> Self> = PhantomData

Represents Self by using a VariantPhantom, using the syntax Type::T to pass it in methods with _:VariantPhantom<T> parameters. Read more
Source§

const T_D: PhantomData<Self> = PhantomData

Represents Self by using a VariantDropPhantom,for specialized cases. Read more
Source§

fn assert_ty(self, _other: PhantomData<fn() -> Self>) -> Self
where Self: Sized,

Asserts that other is the same type as self.
Source§

fn assert_ty_ref(&self, _other: PhantomData<fn() -> Self>) -> &Self
where Self: Sized,

Asserts that other is the same type as self.
Source§

fn assert_ty_mut(&mut self, _other: PhantomData<fn() -> Self>) -> &mut Self
where Self: Sized,

Asserts that other is the same type as self.
Source§

fn ty_(&self) -> PhantomData<fn() -> Self>

Equivalent to SelfOps::T,as a method. Read more
Source§

fn ty_d(&self) -> PhantomData<Self>

Equivalent to Self::ty_,for specialized cases. Read more
Source§

fn ty_inv(&self) -> PhantomData<fn(Self) -> Self>

Equivalent to Self::ty_ with an invariant type.
Source§

fn ty_inv_ref(&self) -> PhantomData<Cell<&Self>>

Equivalent to Self::ty_ with an invariant lifetime.
Source§

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

Identity comparison to another value of the same type. Read more
Source§

fn piped<F, U>(self, f: F) -> U
where F: FnOnce(Self) -> U, Self: Sized,

Emulates the pipeline operator,allowing method syntax in more places. Read more
Source§

fn piped_ref<'a, F, U>(&'a self, f: F) -> U
where F: FnOnce(&'a Self) -> U,

The same as piped except that the function takes &Self Useful for functions that take &Self instead of Self. Read more
Source§

fn piped_mut<'a, F, U>(&'a mut self, f: F) -> U
where F: FnOnce(&'a mut Self) -> U,

The same as piped except that the function takes &mut Self. Useful for functions that take &mut Self instead of Self.
Source§

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

Mutates self using a closure taking self by mutable reference, passing it along the method chain. Read more
Source§

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

Observes the value of self passing it along unmodified. Useful in a long method chain. Read more
Source§

fn into_<T>(self, _: PhantomData<fn() -> T>) -> T
where Self: Into<T>,

Performs a conversion using Into. Read more
Source§

fn as_ref_<T>(&self) -> &T
where Self: AsRef<T>, T: ?Sized,

Performs a reference to reference conversion using AsRef, using the turbofish .as_ref_::<_>() syntax. Read more
Source§

fn as_mut_<T>(&mut self) -> &mut T
where Self: AsMut<T>, T: ?Sized,

Performs a mutable reference to mutable reference conversion using AsMut, using the turbofish .as_mut_::<_>() syntax. Read more
Source§

fn drop_(self)
where Self: Sized,

Drops self using method notation. Alternative to std::mem::drop. Read more
Source§

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

Source§

fn field_<'a, P>( &'a self, path: P, ) -> NormalizeFieldsOut<Result<&'a P::Ty, P::Err>>
where P: RevGetFieldImpl<'a, Self>, Result<&'a P::Ty, P::Err>: NormalizeFields,

Gets a reference to a field,determined by path. Read more
Source§

fn fields<'a, P>(&'a self, path: P) -> RevGetMultiFieldOut<'a, P, Self>
where P: RevGetMultiField<'a, Self>,

Gets references to multiple fields,determined by path. Read more
Source§

fn cloned_fields<'a, P>( &'a self, path: P, ) -> ClonedOut<RevGetMultiFieldOut<'a, P, Self>>
where P: RevGetMultiField<'a, Self>, RevGetMultiFieldOut<'a, P, Self>: Cloned,

Gets clones of multiple fields,determined by path. Read more
Source§

fn field_mut<'a, P>( &'a mut self, path: P, ) -> NormalizeFieldsOut<Result<&'a mut P::Ty, P::Err>>
where P: RevGetFieldMutImpl<'a, Self>, Result<&'a mut P::Ty, P::Err>: NormalizeFields,

Gets a mutable reference to a field,determined by path. Read more
Source§

fn fields_mut<'a, P>( &'a mut self, path: P, ) -> RevGetMultiFieldMutOut<'a, P, Self>
where P: RevGetMultiFieldMut<'a, Self>,

Gets mutable references to multiple fields,determined by path. Read more
Source§

fn into_field<P>(self, path: P) -> NormalizeFieldsOut<Result<P::Ty, P::Err>>
where P: RevIntoFieldImpl<Self>, P::Ty: Sized, Result<P::Ty, P::Err>: NormalizeFields, Self: Sized,

Converts ´self´ into a field,determined by path. Read more
Source§

fn into_fields<P>(self, path: P) -> RevIntoMultiFieldOut<P, Self>
where P: RevIntoMultiField<Self>, Self: Sized,

Converts self into multiple fields by value. Read more
Source§

fn is_variant<P>(&self, _path: P) -> bool
where P: IsTStr, Self: IsVariant<P>,

Checks whether an enum is a particular variant. Read more
Source§

fn into_struc<U>(self) -> U
where Self: IntoStructural<U>,

Converts this into another structural type using IntoStructural. Read more
Source§

fn try_into_struc<U>(self) -> Result<U, TryFromError<Self, Self::Error>>
where Self: TryIntoStructural<U>,

Performs a fallible conversion into another structural type using TryIntoStructural. 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, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The error type returned when the conversion fails.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion
Source§

impl<This, T> TryIntoStructural<T> for This
where T: TryFromStructural<This>,

Source§

type Error = <T as TryFromStructural<This>>::Error

The error parameter of TryFromError, returned from try_into_structural on conversion error.
Source§

fn try_into_structural( self, ) -> Result<T, TryFromError<This, <This as TryIntoStructural<T>>::Error>>

Performs the conversion
Source§

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

Source§

type Type = T

The same type as Self. Read more
Source§

fn into_type_val(self) -> Self::Type
where Self: Sized, Self::Type: Sized,

Converts a value back to the original type.
Source§

fn into_type_ref(&self) -> &Self::Type

Converts a reference back to the original type.
Source§

fn into_type_mut(&mut self) -> &mut Self::Type

Converts a mutable reference back to the original type.
Source§

fn into_type_box(self: Box<Self>) -> Box<Self::Type>

Converts a box back to the original type.
Source§

fn into_type_arc(this: Arc<Self>) -> Arc<Self::Type>

Converts an Arc back to the original type.
Source§

fn into_type_rc(this: Rc<Self>) -> Rc<Self::Type>

Converts an Rc back to the original type.
Source§

fn from_type_val(this: Self::Type) -> Self
where Self: Sized, Self::Type: Sized,

Converts a value back to the original type.
Source§

fn from_type_ref(this: &Self::Type) -> &Self

Converts a reference back to the original type.
Source§

fn from_type_mut(this: &mut Self::Type) -> &mut Self

Converts a mutable reference back to the original type.
Source§

fn from_type_box(this: Box<Self::Type>) -> Box<Self>

Converts a box back to the original type.
Source§

fn from_type_arc(this: Arc<Self::Type>) -> Arc<Self>

Converts an Arc back to the original type.
Source§

fn from_type_rc(this: Rc<Self::Type>) -> Rc<Self>

Converts an Rc back to the original type.
Source§

impl<This, T> Array0<T> for This
where This: ?Sized,

Source§

impl<This, V, T> Array0Variant<T, V> for This
where This: ?Sized,

Source§

impl<This, T> ArrayMove0<T> for This
where This: ?Sized,

Source§

impl<'a, Path, This> OptRevGetField<'a, This> for Path
where Path: RevGetFieldImpl<'a, This, Err = FailedAccess>,

Source§

impl<'a, Path, This> OptRevGetFieldMut<'a, This> for Path
where Path: RevGetFieldMutImpl<'a, This, Err = FailedAccess>,

Source§

impl<Path, This> OptRevIntoField<This> for Path
where Path: RevIntoFieldImpl<This, Err = FailedAccess>,

Source§

impl<'a, Path, This> OptRevIntoFieldMut<'a, This> for Path
where Path: OptRevIntoField<This> + OptRevGetFieldMut<'a, This>,

Source§

impl<'a, Path, This> OptRevIntoFieldRef<'a, This> for Path
where Path: OptRevIntoField<This> + OptRevGetFieldMut<'a, This>,

Source§

impl<'a, Path, This> RevGetField<'a, This> for Path
where Path: RevGetFieldImpl<'a, This, Err = InfallibleAccess>,

Source§

impl<'a, Path, This> RevGetFieldMut<'a, This> for Path
where Path: RevGetFieldMutImpl<'a, This, Err = InfallibleAccess>,

Source§

impl<Path, This> RevIntoField<This> for Path
where Path: RevIntoFieldImpl<This, Err = InfallibleAccess>,

Source§

impl<'a, Path, This> RevIntoFieldMut<'a, This> for Path
where Path: RevIntoField<This> + RevGetFieldMut<'a, This>,

Source§

impl<'a, Path, This> RevIntoFieldRef<'a, This> for Path
where Path: RevIntoField<This> + RevGetFieldMut<'a, This>,