pub struct Message { /* private fields */ }Implementations§
Source§impl Message
impl Message
pub fn request( method: Vec<u8>, scheme: Vec<u8>, authority: Vec<u8>, path: Vec<u8>, ) -> Self
pub fn response(status: StatusCode) -> Self
pub fn put_header( &mut self, name: impl Into<Vec<u8>>, value: impl Into<Vec<u8>>, )
pub fn put_trailer( &mut self, name: impl Into<Vec<u8>>, value: impl Into<Vec<u8>>, )
pub fn write_content(&mut self, d: impl AsRef<[u8]>)
pub fn informational(&self) -> &[InformationalResponse]
pub fn control(&self) -> &ControlData
pub fn header(&self) -> &FieldSection
pub fn content(&self) -> &[u8] ⓘ
pub fn trailer(&self) -> &FieldSection
Sourcepub fn read_bhttp<T, R>(r: &mut T) -> Result<Self, Error>
pub fn read_bhttp<T, R>(r: &mut T) -> Result<Self, Error>
Read a BHTTP message.
pub fn write_bhttp(&self, mode: Mode, w: &mut impl Write) -> Result<(), Error>
Auto Trait Implementations§
impl Freeze for Message
impl RefUnwindSafe for Message
impl Send for Message
impl Sync for Message
impl Unpin for Message
impl UnwindSafe for Message
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