pub struct Response<'a> { /* private fields */ }
Expand description
A buffer for constructing an initial response.
This object is created by calling the
create_response()
method on a Request
.
Dropping this object will not send the response; it must be manually sent
with the Response::send()
method.
Implementations§
Source§impl<'a> Response<'a>
impl<'a> Response<'a>
pub fn add_field<N: AsRef<[u8]>, V: AsRef<[u8]>>( &self, name: N, value: V, ) -> UnitResult<()>
pub fn add_content<C: AsRef<[u8]>>(&self, content: C) -> UnitResult<()>
pub fn realloc( &self, max_fields_count: usize, max_fields_size: usize, ) -> UnitResult<()>
pub fn send(&self) -> UnitResult<()>
Auto Trait Implementations§
impl<'a> Freeze for Response<'a>
impl<'a> RefUnwindSafe for Response<'a>
impl<'a> !Send for Response<'a>
impl<'a> !Sync for Response<'a>
impl<'a> Unpin for Response<'a>
impl<'a> UnwindSafe for Response<'a>
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