[−][src]Trait structural::field::GetVariantField
Provides shared access to an enum variant field.
The V
and F
type parameters are expected to be TStr.
Every instance of "the F
field"/"the V
variant" in the docs mean
"in the field/variant named by the F
/V
type parameter"
Safety
IsVariant<V>
and GetVariantField<V, F>
must agree on what variant the enum currently is.
If IsVariant
returns true for a particular V
variant,
then get_vfield_
must return Some(_)
for the same variant.
If overriden, the *_unchecked
methods must diverge
(abort, panic, or call the equivalent of std::hint::unreachable_unchecked
)
if the enum is not currently the V
variant,
and return the same field as the checked equivalents if the enum
is currently the V
variant.
Example: Use as bound
use structural::field::GetVariantField; use structural::for_examples::{Variants,WithBar}; use structural::{StructuralExt,TS,fp}; fn example(this: impl GetVariantField<TS!(Bar),TS!(0),Ty= &'static str>){ assert_eq!( this.field_(fp!(::Bar.0)), Some(&"why?") ); // You can use `fp!(::Foo=>bar,baz)` to access multiple fields inside // an enum variant. assert_eq!( this.fields(fp!(::Bar=>0,0)), Some((&"why?",&"why?")) ); assert_eq!( this.cloned_fields(fp!(::Bar=>0,0)), Some(("why?","why?")) ); assert_eq!( this.is_variant(fp!(Bar)), true ); } example(Variants::Bar("why?")); example(WithBar::Bar("why?"));
Example: Manual implementation
While this trait is better derived, it can be implemented manually.
Note that the derive macro also declares trait aliases for the traits implemented here.
use structural::{ FieldType, GetVariantField, FP, TS, StructuralExt,fp,structural_alias, }; use structural::enums::{IsVariant, VariantCount}; // The `FooBounds` trait is defined below. fn using_enum(bar: &dyn FooBounds, baz: &dyn FooBounds){ assert_eq!( bar.fields(fp!(::Bar=>0,1)), Some((&34, &51)) ); assert_eq!( bar.is_variant(fp!(Bar)), true ); assert_eq!( bar.is_variant(fp!(Baz)), false ); assert_eq!( baz.fields(fp!(::Bar=>0,1)), None ); assert_eq!( baz.is_variant(fp!(Bar)), false ); assert_eq!( baz.is_variant(fp!(Baz)), true ); } using_enum(&Foo::Bar(34,51), &Foo::Baz); enum Foo{ Bar(u32,u64), Baz, } unsafe impl VariantCount for Foo{ type Count=TS!(2); } unsafe impl IsVariant<TS!(Bar)> for Foo { fn is_variant_(&self,_:TS!(Bar))->bool{ match self { Foo::Bar{..}=>true, _=>false, } } } impl FieldType<FP!(::Bar.0)> for Foo{ type Ty=u32; } unsafe impl GetVariantField<TS!(Bar),TS!(0)> for Foo{ fn get_vfield_(&self, _:TS!(Bar), _:TS!(0)) -> Option<&u32>{ match self { Foo::Bar(ret,_)=>Some(ret), _=>None, } } } impl FieldType<FP!(::Bar.1)> for Foo{ type Ty=u64; } unsafe impl GetVariantField<TS!(Bar),TS!(1)> for Foo{ fn get_vfield_(&self, _:TS!(Bar), _:TS!(1)) -> Option<&u64>{ match self { Foo::Bar(_,ret)=>Some(ret), _=>None, } } } unsafe impl IsVariant<TS!(Baz)> for Foo { fn is_variant_(&self,_:TS!(Baz))->bool{ match self { Foo::Baz{..}=>true, _=>false, } } } structural_alias!{ trait FooBounds{ ref Bar(u32,u64), ref Baz, } }
Required methods
fn get_vfield_(&self, variant: V, field: F) -> Option<&Self::Ty>
Accesses the F
field in the V
variant by reference.
Provided methods
unsafe fn get_vfield_unchecked(&self, variant: V, field: F) -> &Self::Ty
Accesses the F
field in the V
variant by reference,
without checking that the enum is currently the V
variant.
Safety
The enum must be the V
variant.
Implementations on Foreign Types
impl<T> GetVariantField<TStr<__TS<(__S, __o, __m, __e)>>, TStr<__TS<(__0,)>>> for Option<T>
[src]
fn get_vfield_(
&self,
_: TStr<__TS<(__S, __o, __m, __e)>>,
_: TStr<__TS<(__0,)>>
) -> Option<&T>
[src]
&self,
_: TStr<__TS<(__S, __o, __m, __e)>>,
_: TStr<__TS<(__0,)>>
) -> Option<&T>
impl<T, E> GetVariantField<TStr<__TS<(__O, __k)>>, TStr<__TS<(__0,)>>> for Result<T, E>
[src]
impl<T, E> GetVariantField<TStr<__TS<(__E, __r, __r)>>, TStr<__TS<(__0,)>>> for Result<T, E>
[src]
impl<T, __V, __F, __Ty> GetVariantField<TStr<__V>, __F> for ManuallyDrop<T> where
T: GetVariantField<TStr<__V>, __F, Ty = __Ty>,
[src]
T: GetVariantField<TStr<__V>, __F, Ty = __Ty>,
fn get_vfield_(
&self,
vname: TStr<__V>,
fname: __F
) -> Option<&GetVariantFieldType<T, TStr<__V>, __F>>
[src]
&self,
vname: TStr<__V>,
fname: __F
) -> Option<&GetVariantFieldType<T, TStr<__V>, __F>>
impl<P, __V, __F, __Ty> GetVariantField<TStr<__V>, __F> for Pin<P> where
P::Target: GetVariantField<TStr<__V>, __F, Ty = __Ty>,
P: Deref,
P::Target: Sized,
[src]
P::Target: GetVariantField<TStr<__V>, __F, Ty = __Ty>,
P: Deref,
P::Target: Sized,
fn get_vfield_(
&self,
vname: TStr<__V>,
fname: __F
) -> Option<&GetVariantFieldType<P::Target, TStr<__V>, __F>>
[src]
&self,
vname: TStr<__V>,
fname: __F
) -> Option<&GetVariantFieldType<P::Target, TStr<__V>, __F>>
impl<T, __V, __F, __Ty> GetVariantField<TStr<__V>, __F> for Arc<T> where
T: GetVariantField<TStr<__V>, __F, Ty = __Ty>,
T: ?Sized,
[src]
T: GetVariantField<TStr<__V>, __F, Ty = __Ty>,
T: ?Sized,
fn get_vfield_(
&self,
vname: TStr<__V>,
fname: __F
) -> Option<&GetVariantFieldType<T, TStr<__V>, __F>>
[src]
&self,
vname: TStr<__V>,
fname: __F
) -> Option<&GetVariantFieldType<T, TStr<__V>, __F>>
impl<T, __V, __F, __Ty> GetVariantField<TStr<__V>, __F> for Rc<T> where
T: GetVariantField<TStr<__V>, __F, Ty = __Ty>,
T: ?Sized,
[src]
T: GetVariantField<TStr<__V>, __F, Ty = __Ty>,
T: ?Sized,
fn get_vfield_(
&self,
vname: TStr<__V>,
fname: __F
) -> Option<&GetVariantFieldType<T, TStr<__V>, __F>>
[src]
&self,
vname: TStr<__V>,
fname: __F
) -> Option<&GetVariantFieldType<T, TStr<__V>, __F>>
impl<T, __V, __F, __Ty> GetVariantField<TStr<__V>, __F> for Box<T> where
T: GetVariantField<TStr<__V>, __F, Ty = __Ty>,
T: ?Sized,
[src]
T: GetVariantField<TStr<__V>, __F, Ty = __Ty>,
T: ?Sized,
fn get_vfield_(
&self,
vname: TStr<__V>,
fname: __F
) -> Option<&GetVariantFieldType<T, TStr<__V>, __F>>
[src]
&self,
vname: TStr<__V>,
fname: __F
) -> Option<&GetVariantFieldType<T, TStr<__V>, __F>>
impl<'a, T, __V, __F, __Ty> GetVariantField<TStr<__V>, __F> for &'a T where
T: GetVariantField<TStr<__V>, __F, Ty = __Ty>,
T: ?Sized,
[src]
T: GetVariantField<TStr<__V>, __F, Ty = __Ty>,
T: ?Sized,
fn get_vfield_(
&self,
vname: TStr<__V>,
fname: __F
) -> Option<&GetVariantFieldType<T, TStr<__V>, __F>>
[src]
&self,
vname: TStr<__V>,
fname: __F
) -> Option<&GetVariantFieldType<T, TStr<__V>, __F>>
impl<'a, T, __V, __F, __Ty> GetVariantField<TStr<__V>, __F> for &'a mut T where
T: GetVariantField<TStr<__V>, __F, Ty = __Ty>,
T: 'a + ?Sized,
[src]
T: GetVariantField<TStr<__V>, __F, Ty = __Ty>,
T: 'a + ?Sized,
fn get_vfield_(
&self,
vname: TStr<__V>,
fname: __F
) -> Option<&GetVariantFieldType<T, TStr<__V>, __F>>
[src]
&self,
vname: TStr<__V>,
fname: __F
) -> Option<&GetVariantFieldType<T, TStr<__V>, __F>>
Implementors
impl GetVariantField<TStr<__TS<(__0xE7, __0x94, __0x9F, __0xE8, __0x8F, __0x9C)>>, TStr<__TS<(__0xE6, __0xA0, __0x91, __0xE5, __0x8F, __0xB6)>>> for Vegetable
[src]
fn get_vfield_(
&self,
_: TStr<__TS<(__0xE7, __0x94, __0x9F, __0xE8, __0x8F, __0x9C)>>,
_: TStr<__TS<(__0xE6, __0xA0, __0x91, __0xE5, __0x8F, __0xB6)>>
) -> Option<&u32>
[src]
&self,
_: TStr<__TS<(__0xE7, __0x94, __0x9F, __0xE8, __0x8F, __0x9C)>>,
_: TStr<__TS<(__0xE6, __0xA0, __0x91, __0xE5, __0x8F, __0xB6)>>
) -> Option<&u32>
impl GetVariantField<TStr<__TS<(__B, __a, __r)>>, TStr<__TS<(__0,)>>> for WithBar
[src]
fn get_vfield_(
&self,
_: TStr<__TS<(__B, __a, __r)>>,
_: TStr<__TS<(__0,)>>
) -> Option<&&'static str>
[src]
&self,
_: TStr<__TS<(__B, __a, __r)>>,
_: TStr<__TS<(__0,)>>
) -> Option<&&'static str>
impl GetVariantField<TStr<__TS<(__B, __a, __r)>>, TStr<__TS<(__0,)>>> for Variants
[src]
fn get_vfield_(
&self,
_: TStr<__TS<(__B, __a, __r)>>,
_: TStr<__TS<(__0,)>>
) -> Option<&&'static str>
[src]
&self,
_: TStr<__TS<(__B, __a, __r)>>,
_: TStr<__TS<(__0,)>>
) -> Option<&&'static str>
impl GetVariantField<TStr<__TS<(__B, __a, __r)>>, TStr<__TS<(__0,)>>> for Enum2
[src]
fn get_vfield_(
&self,
_: TStr<__TS<(__B, __a, __r)>>,
_: TStr<__TS<(__0,)>>
) -> Option<&Ordering>
[src]
&self,
_: TStr<__TS<(__B, __a, __r)>>,
_: TStr<__TS<(__0,)>>
) -> Option<&Ordering>
impl GetVariantField<TStr<__TS<(__B, __a, __r)>>, TStr<__TS<(__0,)>>> for Enum3
[src]
fn get_vfield_(
&self,
_: TStr<__TS<(__B, __a, __r)>>,
_: TStr<__TS<(__0,)>>
) -> Option<&Ordering>
[src]
&self,
_: TStr<__TS<(__B, __a, __r)>>,
_: TStr<__TS<(__0,)>>
) -> Option<&Ordering>
impl GetVariantField<TStr<__TS<(__B, __a, __r)>>, TStr<__TS<(__0,)>>> for Enum4
[src]
fn get_vfield_(
&self,
_: TStr<__TS<(__B, __a, __r)>>,
_: TStr<__TS<(__0,)>>
) -> Option<&Ordering>
[src]
&self,
_: TStr<__TS<(__B, __a, __r)>>,
_: TStr<__TS<(__0,)>>
) -> Option<&Ordering>
impl GetVariantField<TStr<__TS<(__B, __a, __r)>>, TStr<__TS<(__1,)>>> for Enum2
[src]
fn get_vfield_(
&self,
_: TStr<__TS<(__B, __a, __r)>>,
_: TStr<__TS<(__1,)>>
) -> Option<&Option<u64>>
[src]
&self,
_: TStr<__TS<(__B, __a, __r)>>,
_: TStr<__TS<(__1,)>>
) -> Option<&Option<u64>>
impl GetVariantField<TStr<__TS<(__B, __a, __r)>>, TStr<__TS<(__1,)>>> for Enum3
[src]
fn get_vfield_(
&self,
_: TStr<__TS<(__B, __a, __r)>>,
_: TStr<__TS<(__1,)>>
) -> Option<&Option<u64>>
[src]
&self,
_: TStr<__TS<(__B, __a, __r)>>,
_: TStr<__TS<(__1,)>>
) -> Option<&Option<u64>>
impl GetVariantField<TStr<__TS<(__B, __a, __r)>>, TStr<__TS<(__1,)>>> for Enum4
[src]
fn get_vfield_(
&self,
_: TStr<__TS<(__B, __a, __r)>>,
_: TStr<__TS<(__1,)>>
) -> Option<&Option<u64>>
[src]
&self,
_: TStr<__TS<(__B, __a, __r)>>,
_: TStr<__TS<(__1,)>>
) -> Option<&Option<u64>>
impl GetVariantField<TStr<__TS<(__B, __a, __z)>>, TStr<__TS<(__0,)>>> for Variants
[src]
fn get_vfield_(
&self,
_: TStr<__TS<(__B, __a, __z)>>,
_: TStr<__TS<(__0,)>>
) -> Option<&Option<Ordering>>
[src]
&self,
_: TStr<__TS<(__B, __a, __z)>>,
_: TStr<__TS<(__0,)>>
) -> Option<&Option<Ordering>>
impl GetVariantField<TStr<__TS<(__B, __a, __z)>>, TStr<__TS<(__f, __o, __o, __m)>>> for Enum3
[src]
fn get_vfield_(
&self,
_: TStr<__TS<(__B, __a, __z)>>,
_: TStr<__TS<(__f, __o, __o, __m)>>
) -> Option<&&'static str>
[src]
&self,
_: TStr<__TS<(__B, __a, __z)>>,
_: TStr<__TS<(__f, __o, __o, __m)>>
) -> Option<&&'static str>
impl GetVariantField<TStr<__TS<(__B, __a, __z)>>, TStr<__TS<(__f, __o, __o, __m)>>> for Enum4
[src]
fn get_vfield_(
&self,
_: TStr<__TS<(__B, __a, __z)>>,
_: TStr<__TS<(__f, __o, __o, __m)>>
) -> Option<&&'static str>
[src]
&self,
_: TStr<__TS<(__B, __a, __z)>>,
_: TStr<__TS<(__f, __o, __o, __m)>>
) -> Option<&&'static str>
impl GetVariantField<TStr<__TS<(__B, __o, __o, __m)>>, TStr<__TS<(__a,)>>> for Bomb
[src]
fn get_vfield_(
&self,
_: TStr<__TS<(__B, __o, __o, __m)>>,
_: TStr<__TS<(__a,)>>
) -> Option<&&'static str>
[src]
&self,
_: TStr<__TS<(__B, __o, __o, __m)>>,
_: TStr<__TS<(__a,)>>
) -> Option<&&'static str>
impl GetVariantField<TStr<__TS<(__B, __o, __o, __m)>>, TStr<__TS<(__a,)>>> for Variants
[src]
fn get_vfield_(
&self,
_: TStr<__TS<(__B, __o, __o, __m)>>,
_: TStr<__TS<(__a,)>>
) -> Option<&Option<&'static [u8]>>
[src]
&self,
_: TStr<__TS<(__B, __o, __o, __m)>>,
_: TStr<__TS<(__a,)>>
) -> Option<&Option<&'static [u8]>>
impl GetVariantField<TStr<__TS<(__B, __o, __o, __m)>>, TStr<__TS<(__a,)>>> for WithBoom
[src]
fn get_vfield_(
&self,
_: TStr<__TS<(__B, __o, __o, __m)>>,
_: TStr<__TS<(__a,)>>
) -> Option<&&'static str>
[src]
&self,
_: TStr<__TS<(__B, __o, __o, __m)>>,
_: TStr<__TS<(__a,)>>
) -> Option<&&'static str>
impl GetVariantField<TStr<__TS<(__B, __o, __o, __m)>>, TStr<__TS<(__b,)>>> for Bomb
[src]
fn get_vfield_(
&self,
_: TStr<__TS<(__B, __o, __o, __m)>>,
_: TStr<__TS<(__b,)>>
) -> Option<&&'static [u16]>
[src]
&self,
_: TStr<__TS<(__B, __o, __o, __m)>>,
_: TStr<__TS<(__b,)>>
) -> Option<&&'static [u16]>
impl GetVariantField<TStr<__TS<(__B, __o, __o, __m)>>, TStr<__TS<(__b,)>>> for Variants
[src]
fn get_vfield_(
&self,
_: TStr<__TS<(__B, __o, __o, __m)>>,
_: TStr<__TS<(__b,)>>
) -> Option<&&'static [u16]>
[src]
&self,
_: TStr<__TS<(__B, __o, __o, __m)>>,
_: TStr<__TS<(__b,)>>
) -> Option<&&'static [u16]>
impl GetVariantField<TStr<__TS<(__B, __o, __o, __m)>>, TStr<__TS<(__b,)>>> for WithBoom
[src]
fn get_vfield_(
&self,
_: TStr<__TS<(__B, __o, __o, __m)>>,
_: TStr<__TS<(__b,)>>
) -> Option<&&'static [u16]>
[src]
&self,
_: TStr<__TS<(__B, __o, __o, __m)>>,
_: TStr<__TS<(__b,)>>
) -> Option<&&'static [u16]>
impl GetVariantField<TStr<__TS<(__F, __o, __o)>>, TStr<__TS<(__0,)>>> for Variants
[src]
impl GetVariantField<TStr<__TS<(__F, __o, __o)>>, TStr<__TS<(__1,)>>> for Variants
[src]
impl GetVariantField<TStr<__TS<(__F, __o, __o)>>, TStr<__TS<(__0,)>>> for Enum2
[src]
impl GetVariantField<TStr<__TS<(__F, __o, __o)>>, TStr<__TS<(__0,)>>> for Enum3
[src]
impl GetVariantField<TStr<__TS<(__F, __o, __o)>>, TStr<__TS<(__0,)>>> for Enum4
[src]
impl GetVariantField<TStr<__TS<(__F, __o, __o)>>, TStr<__TS<(__1,)>>> for Enum2
[src]
impl GetVariantField<TStr<__TS<(__F, __o, __o)>>, TStr<__TS<(__1,)>>> for Enum3
[src]
impl GetVariantField<TStr<__TS<(__F, __o, __o)>>, TStr<__TS<(__1,)>>> for Enum4
[src]
impl GetVariantField<TStr<__TS<(__L, __i, __m, __b, __s)>>, TStr<__TS<(__h, __a, __n, __d, __s)>>> for EnumOptA
[src]
fn get_vfield_(
&self,
_: TStr<__TS<(__L, __i, __m, __b, __s)>>,
_: TStr<__TS<(__h, __a, __n, __d, __s)>>
) -> Option<&Option<usize>>
[src]
&self,
_: TStr<__TS<(__L, __i, __m, __b, __s)>>,
_: TStr<__TS<(__h, __a, __n, __d, __s)>>
) -> Option<&Option<usize>>
impl GetVariantField<TStr<__TS<(__L, __i, __m, __b, __s)>>, TStr<__TS<(__h, __a, __n, __d, __s)>>> for EnumOptFlying
[src]
fn get_vfield_(
&self,
_: TStr<__TS<(__L, __i, __m, __b, __s)>>,
_: TStr<__TS<(__h, __a, __n, __d, __s)>>
) -> Option<&Option<usize>>
[src]
&self,
_: TStr<__TS<(__L, __i, __m, __b, __s)>>,
_: TStr<__TS<(__h, __a, __n, __d, __s)>>
) -> Option<&Option<usize>>
impl GetVariantField<TStr<__TS<(__L, __i, __m, __b, __s)>>, TStr<__TS<(__l, __e, __g, __s)>>> for EnumOptA
[src]
fn get_vfield_(
&self,
_: TStr<__TS<(__L, __i, __m, __b, __s)>>,
_: TStr<__TS<(__l, __e, __g, __s)>>
) -> Option<&Option<usize>>
[src]
&self,
_: TStr<__TS<(__L, __i, __m, __b, __s)>>,
_: TStr<__TS<(__l, __e, __g, __s)>>
) -> Option<&Option<usize>>
impl GetVariantField<TStr<__TS<(__L, __i, __m, __b, __s)>>, TStr<__TS<(__l, __e, __g, __s)>>> for EnumOptFlying
[src]
fn get_vfield_(
&self,
_: TStr<__TS<(__L, __i, __m, __b, __s)>>,
_: TStr<__TS<(__l, __e, __g, __s)>>
) -> Option<&Option<usize>>
[src]
&self,
_: TStr<__TS<(__L, __i, __m, __b, __s)>>,
_: TStr<__TS<(__l, __e, __g, __s)>>
) -> Option<&Option<usize>>
impl GetVariantField<TStr<__TS<(__L, __i, __m, __b, __s)>>, TStr<__TS<(__n, __o, __o, __d, __l, __e, __s)>>> for EnumOptFlying
[src]
fn get_vfield_(
&self,
_: TStr<__TS<(__L, __i, __m, __b, __s)>>,
_: TStr<__TS<(__n, __o, __o, __d, __l, __e, __s)>>
) -> Option<&usize>
[src]
&self,
_: TStr<__TS<(__L, __i, __m, __b, __s)>>,
_: TStr<__TS<(__n, __o, __o, __d, __l, __e, __s)>>
) -> Option<&usize>
impl GetVariantField<TStr<__TS<(__Q, __u, __x)>>, TStr<__TS<(__u, __h)>>> for Enum4
[src]
fn get_vfield_(
&self,
_: TStr<__TS<(__Q, __u, __x)>>,
_: TStr<__TS<(__u, __h)>>
) -> Option<&[u8; 4]>
[src]
&self,
_: TStr<__TS<(__Q, __u, __x)>>,
_: TStr<__TS<(__u, __h)>>
) -> Option<&[u8; 4]>
impl GetVariantField<TStr<__TS<(__Q, __u, __x)>>, TStr<__TS<(__w, __h, __a, __t)>>> for Enum4
[src]
fn get_vfield_(
&self,
_: TStr<__TS<(__Q, __u, __x)>>,
_: TStr<__TS<(__w, __h, __a, __t)>>
) -> Option<&(bool, bool)>
[src]
&self,
_: TStr<__TS<(__Q, __u, __x)>>,
_: TStr<__TS<(__w, __h, __a, __t)>>
) -> Option<&(bool, bool)>
impl GetVariantField<TStr<__TS<(__Z, __i, __e, __m, __n, __i, __a, __k)>>, TStr<__TS<(__c, __e, __n, __t, __y, __m, __e, __t, __r, __y, __0x20, __o, __b, __j, __0xC4, __0x99, __t, __o, __0xC5, __0x9B, __c, __i)>>> for Vegetable
[src]
fn get_vfield_(
&self,
_: TStr<__TS<(__Z, __i, __e, __m, __n, __i, __a, __k)>>,
_: TStr<__TS<(__c, __e, __n, __t, __y, __m, __e, __t, __r, __y, __0x20, __o, __b, __j, __0xC4, __0x99, __t, __o, __0xC5, __0x9B, __c, __i)>>
) -> Option<&u32>
[src]
&self,
_: TStr<__TS<(__Z, __i, __e, __m, __n, __i, __a, __k)>>,
_: TStr<__TS<(__c, __e, __n, __t, __y, __m, __e, __t, __r, __y, __0x20, __o, __b, __j, __0xC4, __0x99, __t, __o, __0xC5, __0x9B, __c, __i)>>
) -> Option<&u32>
impl<'a> GetVariantField<TStr<__TS<(__U, __3, __2)>>, TStr<__TS<(__0,)>>> for EnumWithoutNewtype<'a>
[src]
impl<'a> GetVariantField<TStr<__TS<(__U, __3, __2)>>, TStr<__TS<(__1,)>>> for EnumWithoutNewtype<'a>
[src]
fn get_vfield_(
&self,
_: TStr<__TS<(__U, __3, __2)>>,
_: TStr<__TS<(__1,)>>
) -> Option<&&'a u32>
[src]
&self,
_: TStr<__TS<(__U, __3, __2)>>,
_: TStr<__TS<(__1,)>>
) -> Option<&&'a u32>
impl<'a> GetVariantField<TStr<__TS<(__U, __6, __4)>>, TStr<__TS<(__0,)>>> for EnumWithoutNewtype<'a>
[src]
impl<'a> GetVariantField<TStr<__TS<(__U, __6, __4)>>, TStr<__TS<(__1,)>>> for EnumWithoutNewtype<'a>
[src]
fn get_vfield_(
&self,
_: TStr<__TS<(__U, __6, __4)>>,
_: TStr<__TS<(__1,)>>
) -> Option<&&'a u64>
[src]
&self,
_: TStr<__TS<(__U, __6, __4)>>,
_: TStr<__TS<(__1,)>>
) -> Option<&&'a u64>
impl<'a, __F, __Ty> GetVariantField<TStr<__TS<(__U, __3, __2)>>, __F> for EnumWithNewtype<'a> where
RefWrapper<'a, u32>: GetField<__F, Ty = __Ty>,
[src]
RefWrapper<'a, u32>: GetField<__F, Ty = __Ty>,
impl<'a, __F, __Ty> GetVariantField<TStr<__TS<(__U, __6, __4)>>, __F> for EnumWithNewtype<'a> where
RefWrapper<'a, u64>: GetField<__F, Ty = __Ty>,
[src]
RefWrapper<'a, u64>: GetField<__F, Ty = __Ty>,
impl<T, __V, __F, __Ty> GetVariantField<TStr<__V>, __F> for Delegating<T> where
T: GetVariantField<TStr<__V>, __F, Ty = __Ty>,
[src]
T: GetVariantField<TStr<__V>, __F, Ty = __Ty>,
fn get_vfield_(
&self,
vname: TStr<__V>,
fname: __F
) -> Option<&GetVariantFieldType<T, TStr<__V>, __F>>
[src]
&self,
vname: TStr<__V>,
fname: __F
) -> Option<&GetVariantFieldType<T, TStr<__V>, __F>>
impl<T, __V, __F, __Ty> GetVariantField<TStr<__V>, __F> for StrucWrapper<T> where
T: GetVariantField<TStr<__V>, __F, Ty = __Ty>,
[src]
T: GetVariantField<TStr<__V>, __F, Ty = __Ty>,
fn get_vfield_(
&self,
vname: TStr<__V>,
fname: __F
) -> Option<&GetVariantFieldType<T, TStr<__V>, __F>>
[src]
&self,
vname: TStr<__V>,
fname: __F
) -> Option<&GetVariantFieldType<T, TStr<__V>, __F>>