[][src]Struct structural::enums::VariantProxy

pub struct VariantProxy<T: ?Sized, V> { /* fields omitted */ }

Enum wrapper,for accessing the fields of a particular variant (determined by the V type parameter).

The V type parameter is a TStr.

Example type: VariantProxy<Enum,TS!(Foo)>,Foo being the name of the variant.

Construction

These are 3 ways to construct a VariantProxy:

  • Safe: Calling StructuralExt methods with fp!(::VariantName) as an argument, which returns an Option<VariantProxy<Self,TS!(VariantName)>> (reference methods return a reference to a VariantProxy).

  • Safe: Calling an EnumExt method with fp!(VariantName) as an argument

  • Unsafe: Calling a VariantProxy constructor function.

Generic parameters

T is the enum this wraps.

V is the name of the wrapped variant (example type:TS!(Bar)).

Example

This example constructs a VariantProxy safely.

use structural::{fp,ts,StructuralExt,Structural,TS};
use structural::enums::{EnumExt,VariantProxy};

with_bar(Foo::Bar(0,"hello"));

with_bar(Foo2::Bar(0,"hello",true));

/// Runs some assertions.
///
/// # Panics
///
/// This function panics if you pass an enum whose current variant is **not** `Bar`.
fn with_bar<T>(this: T)
where
    // `Foo_ESI` was generated by the `Structural` derive,
    // it aliases the accessor traits for `Foo`,
    // and also requires an enum with the same amount of variants as `Foo`
    //
    // `Debug` is required to print the enum in the `.expect(...)` error.
    T: Foo_ESI + Copy + std::fmt::Debug
{
    let mut proxy: VariantProxy<T, TS!(Bar)>=
        this.into_variant(ts!(Bar))
            .expect("Expected the `Bar` variant to be passed in");
    
    assert_eq!( proxy.field_(fp!(0)), &0);
    assert_eq!( proxy.field_(fp!(1)), &"hello");
    
    assert_eq!( proxy.field_mut(fp!(0)), &mut 0);
    assert_eq!( proxy.field_mut(fp!(1)), &mut "hello");
    
    assert_eq!( proxy.into_field(fp!(0)), 0);
    assert_eq!( proxy.into_field(fp!(1)), "hello");
}

#[derive(Debug,PartialEq,Structural,Copy,Clone)]
enum Foo{
    Bar(u32,&'static str),
    Baz(u32),
}

#[derive(Debug,PartialEq,Structural,Copy,Clone)]
enum Foo2{
    Bar(u32,&'static str,bool),
    Baz(u32,u64),
}

Example

This example uses an unsafe constructor.

use structural::{fp,ts,TS,StructuralExt,Structural};
use structural::enums::VariantProxy;


unsafe{
    with_bar(Foo::Bar(0,"hello"));

    with_bar(Foo2::Bar(0,"hello",true));
}

/// Runs some assertions.
///
/// # Safety
///
/// You must pass an enum whose current variant is `Bar`,
/// `this.is_variant(ts!(Bar))` (the method is from `StructuralExt`) must return true.
unsafe fn with_bar<T>(this: T)
where
    // `Foo_ESI` was generated by the `Structural` derive,
    // it aliases the accessor traits for `Foo`,
    // and also requires an enum with the same amount of variants as `Foo`
    T: Foo_ESI + Copy
{
    let mut proxy: VariantProxy<T, TS!(Bar)>=
        VariantProxy::new(this, ts!(Bar));
    
    assert_eq!( proxy.field_(fp!(0)), &0);
    assert_eq!( proxy.field_(fp!(1)), &"hello");
    
    assert_eq!( proxy.field_mut(fp!(0)), &mut 0);
    assert_eq!( proxy.field_mut(fp!(1)), &mut "hello");
    
    assert_eq!( proxy.into_field(fp!(0)), 0);
    assert_eq!( proxy.into_field(fp!(1)), "hello");
}

#[derive(Debug,PartialEq,Structural,Copy,Clone)]
enum Foo{
    Bar(u32,&'static str),
    Baz(u32),
}

#[derive(Debug,PartialEq,Structural,Copy,Clone)]
enum Foo2{
    Bar(u32,&'static str,bool),
    Baz(u32,u64),
}

Example

This example demonstrates how you can use a VariantProxy to treat a newtype variant as the struct that it wraps.

use structural::{StructuralExt, Structural, TS, fp};
use structural::enums::VariantProxy;

// `Point_SI` was generated by the `Structural` derive macro on `Point`,
// aliasing the accessor traits that `Point` implements.
fn with_bar(this: &impl Point_SI){
    assert_eq!( this.fields(fp!(x,y)), (&21, &34) );
}

let point=Point{x:21, y:34};
with_bar(&point);

let variant=Foo::Point(point);
// The type annotation here isn't necessary.
let proxy: &VariantProxy<Foo, TS!(Point)>=
    variant.field_(fp!(::Point)).expect("it was just constructed as a Foo::Point");
with_bar(proxy);


#[derive(Structural)]
// The `#[struc(no_trait)]` attribute disables the generation of
// the `*_SI` and `*_ESI` traits for this type.
#[struc(no_trait)]
pub enum Foo{
    // You would write this as `#[struc(newtype(bounds = "Point_VSI<@variant>"))]`
    // if you didn't use the  `#[struc(no_trait)]` attribute.
    #[struc(newtype)]
    Point(Point),
}

#[derive(Structural)]
pub struct Point{
    pub x:u32,
    pub y:u32,
}

Implementations

impl<T: ?Sized, V> VariantProxy<T, TStr<V>>[src]

pub const unsafe fn new(value: T, name: TStr<V>) -> Self where
    T: Sized
[src]

Constructs this VariantProxy from an enum.

Safety

V must be the name of the wrapped enum variant.

Example

use structural::{fp,ts,TS,field_path_aliases,StructuralExt,Structural};
use structural::enums::VariantProxy;

#[derive(Debug,PartialEq,Structural)]
#[struc(no_trait)]
enum Foo{
    Bar(u32),
    Baz(u64),
}

let proxy: VariantProxy<Foo, TS!(Bar)>= unsafe{
    VariantProxy::new(Foo::Bar(0), ts!(Bar))
};

assert_eq!( proxy.into_field(fp!(0)), 0 );

pub unsafe fn from_ref(reference: &T, _: TStr<V>) -> &Self[src]

Constructs this VariantProxy from a reference to an enum.

Safety

V must be the name of the wrapped enum variant.

Example

use structural::{fp,ts,TS,StructuralExt,Structural};
use structural::enums::VariantProxy;

#[derive(Debug,PartialEq,Structural)]
#[struc(no_trait)]
enum Foo{
    Bar(u32,bool),
    Baz(u32),
}

let proxy: &VariantProxy<Foo, TS!(Bar)>= unsafe{
    VariantProxy::from_ref(&Foo::Bar(99,false), ts!(Bar))
};

assert_eq!( proxy.field_(fp!(0)), &99 );
assert_eq!( proxy.field_(fp!(1)), &false );

pub unsafe fn from_mut(reference: &mut T, vari: TStr<V>) -> &mut Self[src]

Constructs this VariantProxy from a mutable reference to the enum.

Safety

V must be the name of the wrapped enum variant.

Safety

V must be the name of the wrapped enum variant.

Example

use structural::{fp,ts,TS,StructuralExt,Structural};
use structural::enums::VariantProxy;

#[derive(Debug,PartialEq,Structural)]
#[struc(no_trait)]
enum Foo{
    Bar(u32),
    Baz(Option<usize>,Vec<String>),
}

let mut this=Foo::Baz(Some(1),vec![]);

let proxy: &mut VariantProxy<Foo, TS!(Baz)>= unsafe{
    VariantProxy::from_mut(&mut this, ts!(Baz))
};

assert_eq!( proxy.field_mut(fp!(0)), &mut Some(1) );
assert_eq!( proxy.field_mut(fp!(1)), &mut Vec::<String>::new() );

pub const unsafe fn from_raw_mut(ptr: *mut T, name: TStr<V>) -> *mut Self[src]

Constructs this VariantProxy from a raw pointer to the enum.

Safety

V must be the name of the wrapped enum variant.

Safety

V must be the name of the wrapped enum variant.

Example

use structural::{fp,ts,TS,StructuralExt,Structural};
use structural::enums::VariantProxy;

use std::cmp::Ordering;

#[derive(Debug,PartialEq,Structural)]
#[struc(no_trait)]
enum Foo{
    Bar(u32),
    Baz(Ordering,&'static [u8]),
}

let mut this=Foo::Baz( Ordering::Less, &[0,1,2,3] );

let proxy: *mut VariantProxy<Foo, TS!(Baz)>= unsafe{
    VariantProxy::from_raw_mut(&mut this as *mut Foo, ts!(Baz))
};

unsafe{
    assert_eq!( (*proxy).field_mut(fp!(0)), &mut Ordering::Less );
    assert_eq!( (*proxy).field_mut(fp!(1)), &mut &[0,1,2,3] );
}

pub fn get(&self) -> &T[src]

Gets a reference to the wrapped enum.

Example

use structural::{fp,ts,TS,StructuralExt,Structural};
use structural::enums::VariantProxy;

#[derive(Debug,PartialEq,Structural)]
#[struc(no_trait)]
enum Foo{
    Bar(u32),
    Baz(u32),
}

let proxy: VariantProxy<Foo, TS!(Bar)>= unsafe{
    VariantProxy::new(Foo::Bar(0), ts!(Bar))
};

assert_eq!(proxy.get() , &Foo::Bar(0));

pub unsafe fn get_mut(&mut self) -> &mut T[src]

Gets a mutable reference to the wrapped enum.

Safety

You must not change the variant of the wrapped enum, since VariantProxy relies on it being the one that the V generic parmeter specifies

Example

use structural::{fp,ts,TS,StructuralExt,Structural};
use structural::enums::VariantProxy;

#[derive(Debug,PartialEq,Structural)]
#[struc(no_trait)]
enum Foo{
    Bar(u32),
    Baz(u32),
}

let mut this=Foo::Baz(0);

let proxy: &mut VariantProxy<Foo, TS!(Baz)>= unsafe{
    VariantProxy::from_mut(&mut this, ts!(Baz))
};

assert_eq!(unsafe{ proxy.get_mut() }, &mut Foo::Baz(0));

pub fn into_inner(self) -> T where
    T: Sized
[src]

Unwraps this VariantProxy into the enum it wraps.

Example

use structural::{fp,ts,TS,StructuralExt,Structural};
use structural::enums::VariantProxy;

#[derive(Debug,PartialEq,Structural)]
#[struc(no_trait)]
enum Foo{
    Bar(u32),
    Baz(u32),
}

let proxy: VariantProxy<Foo, TS!(Bar)>= unsafe{
    VariantProxy::new(Foo::Bar(0), ts!(Bar))
};

assert_eq!(proxy.into_inner() , Foo::Bar(0));

pub unsafe fn as_raw_mut(this: *mut Self) -> *mut T[src]

Gets a mutable raw pointer to the wrapped enum.

Safety

You must not change the variant of the wrapped enum, because VariantProxy relies on it being the one that the V generic parmaetere specifies

Example

use structural::{fp,ts,TS,StructuralExt,Structural};
use structural::enums::VariantProxy;

#[derive(Debug,PartialEq,Structural)]
#[struc(no_trait)]
enum Foo{
    Bar(u32),
    Baz(u32),
}

let mut this=Foo::Baz(0);

let proxy: *mut VariantProxy<Foo, TS!(Baz)>= unsafe{
    VariantProxy::from_raw_mut(&mut this as *mut Foo, ts!(Baz))
};

assert_eq!(unsafe{  &mut *VariantProxy::as_raw_mut(proxy) }, &mut Foo::Baz(0));

Trait Implementations

impl<T: Clone + ?Sized, V: Clone> Clone for VariantProxy<T, V>[src]

impl<T: Copy + ?Sized, V: Copy> Copy for VariantProxy<T, V>[src]

impl<T: ?Sized, V> Debug for VariantProxy<T, V> where
    T: Debug,
    V: IsTStr
[src]

impl<T: ?Sized, V> Deref for VariantProxy<T, V> where
    V: IsTStr
[src]

type Target = T

The resulting type after dereferencing.

impl<T, V> DropFields for VariantProxy<T, V> where
    T: IsVariant<V> + DropFields,
    V: IsTStr
[src]

impl<T: Eq + ?Sized, V: Eq> Eq for VariantProxy<T, V>[src]

impl<T: ?Sized, V, F> FieldType<F> for VariantProxy<T, V> where
    T: FieldType<VariantField<V, F>>,
    V: IsTStr
[src]

type Ty = T::Ty

The type of the FieldPath field.

impl<T: ?Sized, V, F> GetField<F> for VariantProxy<T, V> where
    T: GetVariantField<V, F>,
    V: IsTStr
[src]

impl<T: ?Sized, V, F> GetFieldMut<F> for VariantProxy<T, V> where
    T: GetVariantFieldMut<V, F>,
    V: IsTStr
[src]

impl<T, V, F> IntoField<F> for VariantProxy<T, V> where
    T: IntoVariantField<V, F>,
    V: IsTStr
[src]

impl<T: Ord + ?Sized, V: Ord> Ord for VariantProxy<T, V>[src]

impl<T: PartialEq + ?Sized, V: PartialEq> PartialEq<VariantProxy<T, V>> for VariantProxy<T, V>[src]

impl<T: PartialOrd + ?Sized, V: PartialOrd> PartialOrd<VariantProxy<T, V>> for VariantProxy<T, V>[src]

impl<T: ?Sized, V> StructuralEq for VariantProxy<T, V>[src]

impl<T: ?Sized, V> StructuralPartialEq for VariantProxy<T, V>[src]

Auto Trait Implementations

impl<T: ?Sized, V> RefUnwindSafe for VariantProxy<T, V> where
    T: RefUnwindSafe,
    V: RefUnwindSafe

impl<T: ?Sized, V> Send for VariantProxy<T, V> where
    T: Send,
    V: Send

impl<T: ?Sized, V> Sync for VariantProxy<T, V> where
    T: Sync,
    V: Sync

impl<T: ?Sized, V> Unpin for VariantProxy<T, V> where
    T: Unpin,
    V: Unpin

impl<T: ?Sized, V> UnwindSafe for VariantProxy<T, V> where
    T: UnwindSafe,
    V: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

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

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

impl<This, T> Array1<T> for This where
    This: IntoFieldMut<TStr<__TS<(__0,)>>, Ty = T> + ?Sized
[src]

impl<This, T> Array10<T> for This where
    This: IntoFieldMut<TStr<__TS<(__8,)>>, Ty = T, Ty = T> + IntoFieldMut<TStr<__TS<(__9,)>>> + Array_0_8<T> + ?Sized
[src]

impl<This, T> Array11<T> for This where
    This: IntoFieldMut<TStr<__TS<(__9,)>>, Ty = T, Ty = T, Ty = T> + Array_0_8<T> + IntoFieldMut<TStr<__TS<(__1, __0)>>> + IntoFieldMut<TStr<__TS<(__8,)>>> + ?Sized
[src]

impl<This, T> Array12<T> for This where
    This: IntoFieldMut<TStr<__TS<(__9,)>>, Ty = T, Ty = T, Ty = T, Ty = T> + Array_0_8<T> + IntoFieldMut<TStr<__TS<(__1, __0)>>> + IntoFieldMut<TStr<__TS<(__8,)>>> + IntoFieldMut<TStr<__TS<(__1, __1)>>> + ?Sized
[src]

impl<This, T> Array13<T> for This where
    This: Array_0_8<T, Ty = T, Ty = T, Ty = T, Ty = T, Ty = T> + IntoFieldMut<TStr<__TS<(__1, __0)>>> + IntoFieldMut<TStr<__TS<(__8,)>>> + IntoFieldMut<TStr<__TS<(__1, __1)>>> + IntoFieldMut<TStr<__TS<(__1, __2)>>> + IntoFieldMut<TStr<__TS<(__9,)>>> + ?Sized
[src]

impl<This, T> Array14<T> for This where
    This: IntoFieldMut<TStr<__TS<(__1, __0)>>, Ty = T, Ty = T, Ty = T, Ty = T, Ty = T, Ty = T> + IntoFieldMut<TStr<__TS<(__8,)>>> + IntoFieldMut<TStr<__TS<(__1, __1)>>> + IntoFieldMut<TStr<__TS<(__1, __2)>>> + IntoFieldMut<TStr<__TS<(__9,)>>> + IntoFieldMut<TStr<__TS<(__1, __3)>>> + Array_0_8<T> + ?Sized
[src]

impl<This, T> Array15<T> for This where
    This: IntoFieldMut<TStr<__TS<(__8,)>>, Ty = T, Ty = T, Ty = T, Ty = T, Ty = T, Ty = T, Ty = T> + IntoFieldMut<TStr<__TS<(__1, __1)>>> + IntoFieldMut<TStr<__TS<(__1, __2)>>> + IntoFieldMut<TStr<__TS<(__9,)>>> + IntoFieldMut<TStr<__TS<(__1, __3)>>> + Array_0_8<T> + IntoFieldMut<TStr<__TS<(__1, __4)>>> + IntoFieldMut<TStr<__TS<(__1, __0)>>> + ?Sized
[src]

impl<This, T> Array16<T> for This where
    This: Array_8_16<T> + ?Sized
[src]

impl<This, T> Array17<T> for This where
    This: Array_8_16<T, Ty = T> + IntoFieldMut<TStr<__TS<(__1, __6)>>> + ?Sized
[src]

impl<This, T> Array18<T> for This where
    This: IntoFieldMut<TStr<__TS<(__1, __6)>>, Ty = T, Ty = T> + IntoFieldMut<TStr<__TS<(__1, __7)>>> + Array_8_16<T> + ?Sized
[src]

impl<This, T> Array19<T> for This where
    This: IntoFieldMut<TStr<__TS<(__1, __7)>>, Ty = T, Ty = T, Ty = T> + Array_8_16<T> + IntoFieldMut<TStr<__TS<(__1, __8)>>> + IntoFieldMut<TStr<__TS<(__1, __6)>>> + ?Sized
[src]

impl<This, T> Array2<T> for This where
    This: IntoFieldMut<TStr<__TS<(__1,)>>, Ty = T, Ty = T> + IntoFieldMut<TStr<__TS<(__0,)>>> + ?Sized
[src]

impl<This, T> Array20<T> for This where
    This: IntoFieldMut<TStr<__TS<(__1, __7)>>, Ty = T, Ty = T, Ty = T, Ty = T> + Array_8_16<T> + IntoFieldMut<TStr<__TS<(__1, __8)>>> + IntoFieldMut<TStr<__TS<(__1, __6)>>> + IntoFieldMut<TStr<__TS<(__1, __9)>>> + ?Sized
[src]

impl<This, T> Array21<T> for This where
    This: Array_8_16<T, Ty = T, Ty = T, Ty = T, Ty = T, Ty = T> + IntoFieldMut<TStr<__TS<(__1, __8)>>> + IntoFieldMut<TStr<__TS<(__1, __6)>>> + IntoFieldMut<TStr<__TS<(__1, __9)>>> + IntoFieldMut<TStr<__TS<(__2, __0)>>> + IntoFieldMut<TStr<__TS<(__1, __7)>>> + ?Sized
[src]

impl<This, T> Array22<T> for This where
    This: IntoFieldMut<TStr<__TS<(__1, __8)>>, Ty = T, Ty = T, Ty = T, Ty = T, Ty = T, Ty = T> + IntoFieldMut<TStr<__TS<(__1, __6)>>> + IntoFieldMut<TStr<__TS<(__1, __9)>>> + IntoFieldMut<TStr<__TS<(__2, __0)>>> + IntoFieldMut<TStr<__TS<(__1, __7)>>> + IntoFieldMut<TStr<__TS<(__2, __1)>>> + Array_8_16<T> + ?Sized
[src]

impl<This, T> Array23<T> for This where
    This: IntoFieldMut<TStr<__TS<(__1, __6)>>, Ty = T, Ty = T, Ty = T, Ty = T, Ty = T, Ty = T, Ty = T> + IntoFieldMut<TStr<__TS<(__1, __9)>>> + IntoFieldMut<TStr<__TS<(__2, __0)>>> + IntoFieldMut<TStr<__TS<(__1, __7)>>> + IntoFieldMut<TStr<__TS<(__2, __1)>>> + Array_8_16<T> + IntoFieldMut<TStr<__TS<(__2, __2)>>> + IntoFieldMut<TStr<__TS<(__1, __8)>>> + ?Sized
[src]

impl<This, T> Array24<T> for This where
    This: Array_16_24<T> + ?Sized
[src]

impl<This, T> Array25<T> for This where
    This: Array_16_24<T, Ty = T> + IntoFieldMut<TStr<__TS<(__2, __4)>>> + ?Sized
[src]

impl<This, T> Array26<T> for This where
    This: IntoFieldMut<TStr<__TS<(__2, __4)>>, Ty = T, Ty = T> + IntoFieldMut<TStr<__TS<(__2, __5)>>> + Array_16_24<T> + ?Sized
[src]

impl<This, T> Array27<T> for This where
    This: IntoFieldMut<TStr<__TS<(__2, __5)>>, Ty = T, Ty = T, Ty = T> + Array_16_24<T> + IntoFieldMut<TStr<__TS<(__2, __6)>>> + IntoFieldMut<TStr<__TS<(__2, __4)>>> + ?Sized
[src]

impl<This, T> Array28<T> for This where
    This: IntoFieldMut<TStr<__TS<(__2, __5)>>, Ty = T, Ty = T, Ty = T, Ty = T> + Array_16_24<T> + IntoFieldMut<TStr<__TS<(__2, __6)>>> + IntoFieldMut<TStr<__TS<(__2, __4)>>> + IntoFieldMut<TStr<__TS<(__2, __7)>>> + ?Sized
[src]

impl<This, T> Array29<T> for This where
    This: Array_16_24<T, Ty = T, Ty = T, Ty = T, Ty = T, Ty = T> + IntoFieldMut<TStr<__TS<(__2, __6)>>> + IntoFieldMut<TStr<__TS<(__2, __4)>>> + IntoFieldMut<TStr<__TS<(__2, __7)>>> + IntoFieldMut<TStr<__TS<(__2, __8)>>> + IntoFieldMut<TStr<__TS<(__2, __5)>>> + ?Sized
[src]

impl<This, T> Array3<T> for This where
    This: IntoFieldMut<TStr<__TS<(__1,)>>, Ty = T, Ty = T, Ty = T> + IntoFieldMut<TStr<__TS<(__0,)>>> + IntoFieldMut<TStr<__TS<(__2,)>>> + ?Sized
[src]

impl<This, T> Array30<T> for This where
    This: IntoFieldMut<TStr<__TS<(__2, __6)>>, Ty = T, Ty = T, Ty = T, Ty = T, Ty = T, Ty = T> + IntoFieldMut<TStr<__TS<(__2, __4)>>> + IntoFieldMut<TStr<__TS<(__2, __7)>>> + IntoFieldMut<TStr<__TS<(__2, __8)>>> + IntoFieldMut<TStr<__TS<(__2, __5)>>> + IntoFieldMut<TStr<__TS<(__2, __9)>>> + Array_16_24<T> + ?Sized
[src]

impl<This, T> Array31<T> for This where
    This: IntoFieldMut<TStr<__TS<(__2, __4)>>, Ty = T, Ty = T, Ty = T, Ty = T, Ty = T, Ty = T, Ty = T> + IntoFieldMut<TStr<__TS<(__2, __7)>>> + IntoFieldMut<TStr<__TS<(__2, __8)>>> + IntoFieldMut<TStr<__TS<(__2, __5)>>> + IntoFieldMut<TStr<__TS<(__2, __9)>>> + Array_16_24<T> + IntoFieldMut<TStr<__TS<(__3, __0)>>> + IntoFieldMut<TStr<__TS<(__2, __6)>>> + ?Sized
[src]

impl<This, T> Array32<T> for This where
    This: IntoFieldMut<TStr<__TS<(__2, __7)>>, Ty = T, Ty = T, Ty = T, Ty = T, Ty = T, Ty = T, Ty = T, Ty = T> + IntoFieldMut<TStr<__TS<(__2, __8)>>> + IntoFieldMut<TStr<__TS<(__2, __5)>>> + IntoFieldMut<TStr<__TS<(__2, __9)>>> + Array_16_24<T> + IntoFieldMut<TStr<__TS<(__3, __0)>>> + IntoFieldMut<TStr<__TS<(__2, __6)>>> + IntoFieldMut<TStr<__TS<(__3, __1)>>> + IntoFieldMut<TStr<__TS<(__2, __4)>>> + ?Sized
[src]

impl<This, T> Array4<T> for This where
    This: IntoFieldMut<TStr<__TS<(__0,)>>, Ty = T, Ty = T, Ty = T, Ty = T> + IntoFieldMut<TStr<__TS<(__2,)>>> + IntoFieldMut<TStr<__TS<(__3,)>>> + IntoFieldMut<TStr<__TS<(__1,)>>> + ?Sized
[src]

impl<This, T> Array5<T> for This where
    This: IntoFieldMut<TStr<__TS<(__2,)>>, Ty = T, Ty = T, Ty = T, Ty = T, Ty = T> + IntoFieldMut<TStr<__TS<(__3,)>>> + IntoFieldMut<TStr<__TS<(__1,)>>> + IntoFieldMut<TStr<__TS<(__4,)>>> + IntoFieldMut<TStr<__TS<(__0,)>>> + ?Sized
[src]

impl<This, T> Array6<T> for This where
    This: IntoFieldMut<TStr<__TS<(__3,)>>, Ty = T, Ty = T, Ty = T, Ty = T, Ty = T, Ty = T> + IntoFieldMut<TStr<__TS<(__1,)>>> + IntoFieldMut<TStr<__TS<(__4,)>>> + IntoFieldMut<TStr<__TS<(__0,)>>> + IntoFieldMut<TStr<__TS<(__5,)>>> + IntoFieldMut<TStr<__TS<(__2,)>>> + ?Sized
[src]

impl<This, T> Array7<T> for This where
    This: IntoFieldMut<TStr<__TS<(__3,)>>, Ty = T, Ty = T, Ty = T, Ty = T, Ty = T, Ty = T, Ty = T> + IntoFieldMut<TStr<__TS<(__1,)>>> + IntoFieldMut<TStr<__TS<(__4,)>>> + IntoFieldMut<TStr<__TS<(__0,)>>> + IntoFieldMut<TStr<__TS<(__5,)>>> + IntoFieldMut<TStr<__TS<(__2,)>>> + IntoFieldMut<TStr<__TS<(__6,)>>> + ?Sized
[src]

impl<This, T> Array8<T> for This where
    This: Array_0_8<T> + ?Sized
[src]

impl<This, T> Array9<T> for This where
    This: Array_0_8<T, Ty = T> + IntoFieldMut<TStr<__TS<(__8,)>>> + ?Sized
[src]

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

impl<This, T> ArrayMove1<T> for This where
    This: IntoField<TStr<__TS<(__0,)>>, Ty = T> + ?Sized
[src]

impl<This, T> ArrayMove10<T> for This where
    This: IntoField<TStr<__TS<(__8,)>>, Ty = T, Ty = T> + IntoField<TStr<__TS<(__9,)>>> + ArrayMove_0_8<T> + ?Sized
[src]

impl<This, T> ArrayMove11<T> for This where
    This: IntoField<TStr<__TS<(__9,)>>, Ty = T, Ty = T, Ty = T> + ArrayMove_0_8<T> + IntoField<TStr<__TS<(__1, __0)>>> + IntoField<TStr<__TS<(__8,)>>> + ?Sized
[src]

impl<This, T> ArrayMove12<T> for This where
    This: IntoField<TStr<__TS<(__9,)>>, Ty = T, Ty = T, Ty = T, Ty = T> + ArrayMove_0_8<T> + IntoField<TStr<__TS<(__1, __0)>>> + IntoField<TStr<__TS<(__8,)>>> + IntoField<TStr<__TS<(__1, __1)>>> + ?Sized
[src]

impl<This, T> ArrayMove13<T> for This where
    This: ArrayMove_0_8<T, Ty = T, Ty = T, Ty = T, Ty = T, Ty = T> + IntoField<TStr<__TS<(__1, __0)>>> + IntoField<TStr<__TS<(__8,)>>> + IntoField<TStr<__TS<(__1, __1)>>> + IntoField<TStr<__TS<(__1, __2)>>> + IntoField<TStr<__TS<(__9,)>>> + ?Sized
[src]

impl<This, T> ArrayMove14<T> for This where
    This: IntoField<TStr<__TS<(__1, __0)>>, Ty = T, Ty = T, Ty = T, Ty = T, Ty = T, Ty = T> + IntoField<TStr<__TS<(__8,)>>> + IntoField<TStr<__TS<(__1, __1)>>> + IntoField<TStr<__TS<(__1, __2)>>> + IntoField<TStr<__TS<(__9,)>>> + IntoField<TStr<__TS<(__1, __3)>>> + ArrayMove_0_8<T> + ?Sized
[src]

impl<This, T> ArrayMove15<T> for This where
    This: IntoField<TStr<__TS<(__8,)>>, Ty = T, Ty = T, Ty = T, Ty = T, Ty = T, Ty = T, Ty = T> + IntoField<TStr<__TS<(__1, __1)>>> + IntoField<TStr<__TS<(__1, __2)>>> + IntoField<TStr<__TS<(__9,)>>> + IntoField<TStr<__TS<(__1, __3)>>> + ArrayMove_0_8<T> + IntoField<TStr<__TS<(__1, __4)>>> + IntoField<TStr<__TS<(__1, __0)>>> + ?Sized
[src]

impl<This, T> ArrayMove16<T> for This where
    This: ArrayMove_8_16<T> + ?Sized
[src]

impl<This, T> ArrayMove17<T> for This where
    This: ArrayMove_8_16<T, Ty = T> + IntoField<TStr<__TS<(__1, __6)>>> + ?Sized
[src]

impl<This, T> ArrayMove18<T> for This where
    This: IntoField<TStr<__TS<(__1, __6)>>, Ty = T, Ty = T> + IntoField<TStr<__TS<(__1, __7)>>> + ArrayMove_8_16<T> + ?Sized
[src]

impl<This, T> ArrayMove19<T> for This where
    This: IntoField<TStr<__TS<(__1, __7)>>, Ty = T, Ty = T, Ty = T> + ArrayMove_8_16<T> + IntoField<TStr<__TS<(__1, __8)>>> + IntoField<TStr<__TS<(__1, __6)>>> + ?Sized
[src]

impl<This, T> ArrayMove2<T> for This where
    This: IntoField<TStr<__TS<(__1,)>>, Ty = T, Ty = T> + IntoField<TStr<__TS<(__0,)>>> + ?Sized
[src]

impl<This, T> ArrayMove20<T> for This where
    This: IntoField<TStr<__TS<(__1, __7)>>, Ty = T, Ty = T, Ty = T, Ty = T> + ArrayMove_8_16<T> + IntoField<TStr<__TS<(__1, __8)>>> + IntoField<TStr<__TS<(__1, __6)>>> + IntoField<TStr<__TS<(__1, __9)>>> + ?Sized
[src]

impl<This, T> ArrayMove21<T> for This where
    This: ArrayMove_8_16<T, Ty = T, Ty = T, Ty = T, Ty = T, Ty = T> + IntoField<TStr<__TS<(__1, __8)>>> + IntoField<TStr<__TS<(__1, __6)>>> + IntoField<TStr<__TS<(__1, __9)>>> + IntoField<TStr<__TS<(__2, __0)>>> + IntoField<TStr<__TS<(__1, __7)>>> + ?Sized
[src]

impl<This, T> ArrayMove22<T> for This where
    This: IntoField<TStr<__TS<(__1, __8)>>, Ty = T, Ty = T, Ty = T, Ty = T, Ty = T, Ty = T> + IntoField<TStr<__TS<(__1, __6)>>> + IntoField<TStr<__TS<(__1, __9)>>> + IntoField<TStr<__TS<(__2, __0)>>> + IntoField<TStr<__TS<(__1, __7)>>> + IntoField<TStr<__TS<(__2, __1)>>> + ArrayMove_8_16<T> + ?Sized
[src]

impl<This, T> ArrayMove23<T> for This where
    This: IntoField<TStr<__TS<(__1, __6)>>, Ty = T, Ty = T, Ty = T, Ty = T, Ty = T, Ty = T, Ty = T> + IntoField<TStr<__TS<(__1, __9)>>> + IntoField<TStr<__TS<(__2, __0)>>> + IntoField<TStr<__TS<(__1, __7)>>> + IntoField<TStr<__TS<(__2, __1)>>> + ArrayMove_8_16<T> + IntoField<TStr<__TS<(__2, __2)>>> + IntoField<TStr<__TS<(__1, __8)>>> + ?Sized
[src]

impl<This, T> ArrayMove24<T> for This where
    This: ArrayMove_16_24<T> + ?Sized
[src]

impl<This, T> ArrayMove25<T> for This where
    This: ArrayMove_16_24<T, Ty = T> + IntoField<TStr<__TS<(__2, __4)>>> + ?Sized
[src]

impl<This, T> ArrayMove26<T> for This where
    This: IntoField<TStr<__TS<(__2, __4)>>, Ty = T, Ty = T> + IntoField<TStr<__TS<(__2, __5)>>> + ArrayMove_16_24<T> + ?Sized
[src]

impl<This, T> ArrayMove27<T> for This where
    This: IntoField<TStr<__TS<(__2, __5)>>, Ty = T, Ty = T, Ty = T> + ArrayMove_16_24<T> + IntoField<TStr<__TS<(__2, __6)>>> + IntoField<TStr<__TS<(__2, __4)>>> + ?Sized
[src]

impl<This, T> ArrayMove28<T> for This where
    This: IntoField<TStr<__TS<(__2, __5)>>, Ty = T, Ty = T, Ty = T, Ty = T> + ArrayMove_16_24<T> + IntoField<TStr<__TS<(__2, __6)>>> + IntoField<TStr<__TS<(__2, __4)>>> + IntoField<TStr<__TS<(__2, __7)>>> + ?Sized
[src]

impl<This, T> ArrayMove29<T> for This where
    This: ArrayMove_16_24<T, Ty = T, Ty = T, Ty = T, Ty = T, Ty = T> + IntoField<TStr<__TS<(__2, __6)>>> + IntoField<TStr<__TS<(__2, __4)>>> + IntoField<TStr<__TS<(__2, __7)>>> + IntoField<TStr<__TS<(__2, __8)>>> + IntoField<TStr<__TS<(__2, __5)>>> + ?Sized
[src]

impl<This, T> ArrayMove3<T> for This where
    This: IntoField<TStr<__TS<(__1,)>>, Ty = T, Ty = T, Ty = T> + IntoField<TStr<__TS<(__0,)>>> + IntoField<TStr<__TS<(__2,)>>> + ?Sized
[src]

impl<This, T> ArrayMove30<T> for This where
    This: IntoField<TStr<__TS<(__2, __6)>>, Ty = T, Ty = T, Ty = T, Ty = T, Ty = T, Ty = T> + IntoField<TStr<__TS<(__2, __4)>>> + IntoField<TStr<__TS<(__2, __7)>>> + IntoField<TStr<__TS<(__2, __8)>>> + IntoField<TStr<__TS<(__2, __5)>>> + IntoField<TStr<__TS<(__2, __9)>>> + ArrayMove_16_24<T> + ?Sized
[src]

impl<This, T> ArrayMove31<T> for This where
    This: IntoField<TStr<__TS<(__2, __4)>>, Ty = T, Ty = T, Ty = T, Ty = T, Ty = T, Ty = T, Ty = T> + IntoField<TStr<__TS<(__2, __7)>>> + IntoField<TStr<__TS<(__2, __8)>>> + IntoField<TStr<__TS<(__2, __5)>>> + IntoField<TStr<__TS<(__2, __9)>>> + ArrayMove_16_24<T> + IntoField<TStr<__TS<(__3, __0)>>> + IntoField<TStr<__TS<(__2, __6)>>> + ?Sized
[src]

impl<This, T> ArrayMove32<T> for This where
    This: IntoField<TStr<__TS<(__2, __7)>>, Ty = T, Ty = T, Ty = T, Ty = T, Ty = T, Ty = T, Ty = T, Ty = T> + IntoField<TStr<__TS<(__2, __8)>>> + IntoField<TStr<__TS<(__2, __5)>>> + IntoField<TStr<__TS<(__2, __9)>>> + ArrayMove_16_24<T> + IntoField<TStr<__TS<(__3, __0)>>> + IntoField<TStr<__TS<(__2, __6)>>> + IntoField<TStr<__TS<(__3, __1)>>> + IntoField<TStr<__TS<(__2, __4)>>> + ?Sized
[src]

impl<This, T> ArrayMove4<T> for This where
    This: IntoField<TStr<__TS<(__0,)>>, Ty = T, Ty = T, Ty = T, Ty = T> + IntoField<TStr<__TS<(__2,)>>> + IntoField<TStr<__TS<(__3,)>>> + IntoField<TStr<__TS<(__1,)>>> + ?Sized
[src]

impl<This, T> ArrayMove5<T> for This where
    This: IntoField<TStr<__TS<(__2,)>>, Ty = T, Ty = T, Ty = T, Ty = T, Ty = T> + IntoField<TStr<__TS<(__3,)>>> + IntoField<TStr<__TS<(__1,)>>> + IntoField<TStr<__TS<(__4,)>>> + IntoField<TStr<__TS<(__0,)>>> + ?Sized
[src]

impl<This, T> ArrayMove6<T> for This where
    This: IntoField<TStr<__TS<(__3,)>>, Ty = T, Ty = T, Ty = T, Ty = T, Ty = T, Ty = T> + IntoField<TStr<__TS<(__1,)>>> + IntoField<TStr<__TS<(__4,)>>> + IntoField<TStr<__TS<(__0,)>>> + IntoField<TStr<__TS<(__5,)>>> + IntoField<TStr<__TS<(__2,)>>> + ?Sized
[src]

impl<This, T> ArrayMove7<T> for This where
    This: IntoField<TStr<__TS<(__3,)>>, Ty = T, Ty = T, Ty = T, Ty = T, Ty = T, Ty = T, Ty = T> + IntoField<TStr<__TS<(__1,)>>> + IntoField<TStr<__TS<(__4,)>>> + IntoField<TStr<__TS<(__0,)>>> + IntoField<TStr<__TS<(__5,)>>> + IntoField<TStr<__TS<(__2,)>>> + IntoField<TStr<__TS<(__6,)>>> + ?Sized
[src]

impl<This, T> ArrayMove8<T> for This where
    This: ArrayMove_0_8<T> + ?Sized
[src]

impl<This, T> ArrayMove9<T> for This where
    This: ArrayMove_0_8<T, Ty = T> + IntoField<TStr<__TS<(__8,)>>> + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<This, F> IntoFieldMut<F> for This where
    This: IntoField<F> + GetFieldMut<F> + ?Sized
[src]

impl<This, T> IntoStructural<T> for This where
    T: FromStructural<This>, 
[src]

impl<T, __This> RangeFrom_SI<T> for __This where
    __This: IntoFieldMut<TStr<__TS<(__s, __t, __a, __r, __t)>>, Ty = T> + ?Sized
[src]

impl<T, __This> RangeRef_SI<T> for __This where
    __This: GetField<TStr<__TS<(__e, __n, __d)>>, Ty = T, Ty = T> + GetField<TStr<__TS<(__s, __t, __a, __r, __t)>>> + ?Sized
[src]

impl<T, __This> RangeTo_SI<T> for __This where
    __This: IntoFieldMut<TStr<__TS<(__e, __n, __d)>>, Ty = T> + ?Sized
[src]

impl<T, __This> Range_SI<T> for __This where
    __This: IntoFieldMut<TStr<__TS<(__e, __n, __d)>>, Ty = T, Ty = T> + IntoFieldMut<TStr<__TS<(__s, __t, __a, __r, __t)>>> + ?Sized
[src]

impl<T> SelfOps for T where
    T: ?Sized
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The error type returned when the conversion fails.

impl<This, T> TryIntoStructural<T> for This where
    T: TryFromStructural<This>, 
[src]

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

The error parameter of TryFromError, returned from try_into_structural on conversion error. Read more

impl<T> TypeIdentity for T where
    T: ?Sized
[src]

type Type = T

The same type as Self. Read more