pub struct GenericParam {
pub name: Ident,
pub bounds: Vec<Ident>,
pub span: Span,
}Expand description
One type parameter of a declaration, with the traits it is bounded by.
A bound is checked at the call site that instantiates the parameter, and it is what makes a method call on a value of that parameter resolvable.
Fields§
§name: Ident§bounds: Vec<Ident>T: Display + Ordered binds two traits; an unbounded T binds none.
span: SpanImplementations§
Source§impl GenericParam
impl GenericParam
Sourcepub fn unbounded(name: Ident) -> GenericParam
pub fn unbounded(name: Ident) -> GenericParam
An unbounded parameter, which is what every generic was before traits.
Trait Implementations§
Source§impl Clone for GenericParam
impl Clone for GenericParam
Source§fn clone(&self) -> GenericParam
fn clone(&self) -> GenericParam
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GenericParam
impl Debug for GenericParam
Auto Trait Implementations§
impl Freeze for GenericParam
impl RefUnwindSafe for GenericParam
impl Send for GenericParam
impl Sync for GenericParam
impl Unpin for GenericParam
impl UnsafeUnpin for GenericParam
impl UnwindSafe for GenericParam
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