pub struct TypeParameter<'a> {
pub name: &'a str,
pub class_bound: Option<ReferenceType<'a>>,
pub iface_bounds: Vec<ReferenceType<'a>>,
}
Expand description
Represents type variables in declaration position, e.g. as part of a class or method declaration which introduces variable types.
Examples of type parameters X, Y, Z
:
class Foo<X, Y, Z> {...}
<X, Y, Z> void foo(...) { ... }
Fields§
§name: &'a str
§class_bound: Option<ReferenceType<'a>>
§iface_bounds: Vec<ReferenceType<'a>>
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for TypeParameter<'a>
impl<'a> RefUnwindSafe for TypeParameter<'a>
impl<'a> Send for TypeParameter<'a>
impl<'a> Sync for TypeParameter<'a>
impl<'a> Unpin for TypeParameter<'a>
impl<'a> UnwindSafe for TypeParameter<'a>
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