pub struct Generics<P, W = WhereClause> {
pub params: Vec<P, Global>,
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, Global>
where_clause: Option<W>
Implementations
sourceimpl<P, W> Generics<P, W>
impl<P, W> Generics<P, W>
pub fn type_params(&self) -> TypeParams<'_, P>
Trait Implementations
sourceimpl<P> FromGenerics for Generics<P, WhereClause>where
P: FromGenericParam,
impl<P> FromGenerics for Generics<P, WhereClause>where
P: FromGenericParam,
fn from_generics(generics: &Generics) -> Result<Generics<P, WhereClause>, Error>
sourceimpl<P, W> PartialEq<Generics<P, W>> for Generics<P, W>where
P: PartialEq<P>,
W: PartialEq<W>,
impl<P, W> PartialEq<Generics<P, W>> for Generics<P, W>where
P: PartialEq<P>,
W: PartialEq<W>,
impl<P, W> Eq for Generics<P, W>where
P: Eq,
W: Eq,
impl<P, W> StructuralEq for Generics<P, W>
impl<P, W> StructuralPartialEq for Generics<P, W>
Auto Trait Implementations
impl<P, W> RefUnwindSafe for Generics<P, W>where
P: RefUnwindSafe,
W: RefUnwindSafe,
impl<P, W> Send for Generics<P, W>where
P: Send,
W: Send,
impl<P, W> Sync for Generics<P, W>where
P: Sync,
W: Sync,
impl<P, W> Unpin for Generics<P, W>where
P: Unpin,
W: Unpin,
impl<P, W> UnwindSafe for Generics<P, W>where
P: UnwindSafe,
W: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more