pub enum GenericParam<T = TypeParam, L = LifetimeParam, C = ConstParam> {
Type(T),
Lifetime(L),
Const(C),
}
Expand description
A mirror of syn::GenericParam
which is generic over all its contents.
Variants§
Trait Implementations§
source§impl<T: Clone, L: Clone, C: Clone> Clone for GenericParam<T, L, C>
impl<T: Clone, L: Clone, C: Clone> Clone for GenericParam<T, L, C>
source§fn clone(&self) -> GenericParam<T, L, C>
fn clone(&self) -> GenericParam<T, L, C>
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 moresource§impl<T: FromTypeParam> FromGenericParam for GenericParam<T>
impl<T: FromTypeParam> FromGenericParam for GenericParam<T>
fn from_generic_param(param: &GenericParam) -> Result<Self>
source§impl<T: FromTypeParam> FromTypeParam for GenericParam<T>
impl<T: FromTypeParam> FromTypeParam for GenericParam<T>
fn from_type_param(type_param: &TypeParam) -> Result<Self>
source§impl<T, L, C> GenericParamExt for GenericParam<T, L, C>
impl<T, L, C> GenericParamExt for GenericParam<T, L, C>
type LifetimeParam = L
type ConstParam = C
source§fn as_type_param(&self) -> Option<&T>
fn as_type_param(&self) -> Option<&T>
If this GenericParam is a type param, get the underlying value.
source§fn as_lifetime_param(&self) -> Option<&L>
fn as_lifetime_param(&self) -> Option<&L>
If this GenericParam is a lifetime, get the underlying value.
source§fn as_const_param(&self) -> Option<&C>
fn as_const_param(&self) -> Option<&C>
If this GenericParam is a const param, get the underlying value.
impl<T: Eq, L: Eq, C: Eq> Eq for GenericParam<T, L, C>
impl<T, L, C> StructuralPartialEq for GenericParam<T, L, C>
Auto Trait Implementations§
impl<T, L, C> Freeze for GenericParam<T, L, C>
impl<T, L, C> RefUnwindSafe for GenericParam<T, L, C>
impl<T, L, C> Send for GenericParam<T, L, C>
impl<T, L, C> Sync for GenericParam<T, L, C>
impl<T, L, C> Unpin for GenericParam<T, L, C>
impl<T, L, C> UnwindSafe for GenericParam<T, L, C>
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
)