pub trait HasBody {
type Body;
// Required methods
fn body(&self) -> &Self::Body;
fn body_mut(&mut self) -> &mut Self::Body;
fn set_body(&mut self, body: Self::Body);
// Provided method
fn with_body(self, body: Self::Body) -> Self
where Self: Sized { ... }
}Expand description
This trait is implemented by types that have a distinct body type.
Required Associated Types§
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".