pub struct Generics<P, W = WhereClause> {
pub params: Vec<P>,
pub where_clause: Option<W>,
}
Expand description
A mirror of the syn::Generics
type which can contain arbitrary representations
of params and where clauses.
Fields§
§params: Vec<P>
§where_clause: Option<W>
Implementations§
source§impl<P, W> Generics<P, W>
impl<P, W> Generics<P, W>
pub fn type_params(&self) -> TypeParams<'_, P>
Trait Implementations§
source§impl<P: FromGenericParam> FromGenerics for Generics<P>
impl<P: FromGenericParam> FromGenerics for Generics<P>
fn from_generics(generics: &Generics) -> Result<Self>
impl<P: Eq, W: Eq> Eq for Generics<P, W>
impl<P, W> StructuralPartialEq for Generics<P, W>
Auto Trait Implementations§
impl<P, W> Freeze for Generics<P, W>where
W: Freeze,
impl<P, W> RefUnwindSafe for Generics<P, W>where
W: RefUnwindSafe,
P: RefUnwindSafe,
impl<P, W> Send for Generics<P, W>
impl<P, W> Sync for Generics<P, W>
impl<P, W> Unpin for Generics<P, W>
impl<P, W> UnwindSafe for Generics<P, W>where
W: UnwindSafe,
P: UnwindSafe,
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
)