Struct binary_util::Trait
source · pub struct Trait { /* private fields */ }
Expand description
Define a trait.
Implementations§
source§impl Trait
impl Trait
sourcepub fn bound<T>(&mut self, name: &str, ty: T) -> &mut Traitwhere
T: Into<Type>,
pub fn bound<T>(&mut self, name: &str, ty: T) -> &mut Traitwhere T: Into<Type>,
Add a where
bound to the trait.
sourcepub fn macro(&mut self, macro: &str) -> &mut Trait
pub fn macro(&mut self, macro: &str) -> &mut Trait
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 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