pub struct Trait { /* private fields */ }
Expand description
Define a trait.
Implementations§
Source§impl Trait
impl Trait
Sourcepub fn macro(&mut self, macro: &str) -> &mut Self
pub fn macro(&mut self, macro: &str) -> &mut Self
Add a macro to the trait def (e.g. "#[async_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 Freeze for Trait
impl RefUnwindSafe for Trait
impl Send for Trait
impl Sync for Trait
impl Unpin for Trait
impl UnwindSafe for Trait
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