enum UnsizedFieldKind<'a> {
Cow(OwnULETy<'a>),
ZeroVec(&'a Type),
VarZeroVec(&'a Type),
Custom(&'a TypePath, Ident),
Growable(OwnULETy<'a>),
Boxed(OwnULETy<'a>),
Ref(OwnULETy<'a>),
}
Expand description
Represents the type of the last field of the struct
Variants§
Cow(OwnULETy<'a>)
ZeroVec(&'a Type)
VarZeroVec(&'a Type)
Custom(&'a TypePath, Ident)
Custom VarULE type, and the identifier corresponding to the VarULE type
Growable(OwnULETy<'a>)
Boxed(OwnULETy<'a>)
Ref(OwnULETy<'a>)
Implementations§
source§impl<'a> UnsizedFieldKind<'a>
impl<'a> UnsizedFieldKind<'a>
sourcefn new(
ty: &'a Type,
custom_varule_ident: Option<Ident>,
) -> Result<UnsizedFieldKind<'a>, String>
fn new( ty: &'a Type, custom_varule_ident: Option<Ident>, ) -> Result<UnsizedFieldKind<'a>, String>
Construct a UnsizedFieldKind for the type of a UnsizedFieldKind if possible
sourcefn varule_ty(&self) -> TokenStream2
fn varule_ty(&self) -> TokenStream2
Get the tokens for the corresponding VarULE type
fn encodeable_value(&self, value: TokenStream2) -> TokenStream2
sourcefn encodeable_ty(&self) -> TokenStream2
fn encodeable_ty(&self) -> TokenStream2
Returns the EncodeAsVarULE type this can be represented as, the same returned by encodeable_value()
fn has_zf(&self) -> bool
Trait Implementations§
source§impl<'a> Clone for UnsizedFieldKind<'a>
impl<'a> Clone for UnsizedFieldKind<'a>
source§fn clone(&self) -> UnsizedFieldKind<'a>
fn clone(&self) -> UnsizedFieldKind<'a>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl<'a> Freeze for UnsizedFieldKind<'a>
impl<'a> RefUnwindSafe for UnsizedFieldKind<'a>
impl<'a> !Send for UnsizedFieldKind<'a>
impl<'a> !Sync for UnsizedFieldKind<'a>
impl<'a> Unpin for UnsizedFieldKind<'a>
impl<'a> UnwindSafe for UnsizedFieldKind<'a>
Blanket Implementations§
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
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)