Struct darling_core::ast::Generics
source · [−]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
sourceimpl<P, W> Generics<P, W>
impl<P, W> Generics<P, W>
pub fn type_params<'a>(&'a self) -> TypeParams<'a, P>
Trait Implementations
sourceimpl<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> 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 T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more