pub struct Trait { /* private fields */ }Expand description
Define a trait.
Implementations
sourceimpl Trait
impl Trait
sourcepub fn bound<T>(&mut self, name: &str, ty: T) -> &mut Selfwhere
T: Into<Type>,
pub fn bound<T>(&mut self, name: &str, ty: T) -> &mut Selfwhere
T: Into<Type>,
Add a where bound to the trait.
sourcepub fn associated_type(&mut self, name: &str) -> &mut AssociatedType
pub fn associated_type(&mut self, name: &str) -> &mut AssociatedType
Add an associated type. Returns a mutable reference to the new associated type for futher configuration.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Trait
impl Send for Trait
impl Sync for Trait
impl Unpin for Trait
impl UnwindSafe for Trait
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