pub trait MsgDataMut: MsgData {
// Required methods
fn clear(&mut self);
fn clear_body_and_headers(&mut self);
fn parts_mut(&mut self) -> (&mut Self::Body, &mut Headers, UriRef<'_>);
// Provided methods
fn body_mut(&mut self) -> &mut Self::Body { ... }
fn headers_mut(&mut self) -> &mut Headers { ... }
}Available on crate feature
http only.Expand description
Mutable version of MsgData.
Required Methods§
Sourcefn clear_body_and_headers(&mut self)
fn clear_body_and_headers(&mut self)
Removes all but URI values.
Provided Methods§
Sourcefn body_mut(&mut self) -> &mut Self::Body
fn body_mut(&mut self) -> &mut Self::Body
Can be a sequence of mutable bytes, a mutable string or any other desired type.
Sourcefn headers_mut(&mut self) -> &mut Headers
fn headers_mut(&mut self) -> &mut Headers
Mutable version of MsgData::headers.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".