pub struct ServerResponse<'a> { /* private fields */ }Expand description
Middleware-facing view of one outbound server response.
Implementations§
Source§impl<'a> ServerResponse<'a>
impl<'a> ServerResponse<'a>
pub fn new(response: &'a RequestResponse<'a>) -> Self
pub const fn metadata(&self) -> &'a [MetadataEntry<'a>]
pub const fn payload(&self) -> ServerResponsePayload<'a>
pub const fn payload_peek(&self) -> Option<Peek<'a, 'static>>
Trait Implementations§
Source§impl<'a> Clone for ServerResponse<'a>
impl<'a> Clone for ServerResponse<'a>
Source§fn clone(&self) -> ServerResponse<'a>
fn clone(&self) -> ServerResponse<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for ServerResponse<'a>
impl<'a> Debug for ServerResponse<'a>
impl<'a> Copy for ServerResponse<'a>
Auto Trait Implementations§
impl<'a> Freeze for ServerResponse<'a>
impl<'a> RefUnwindSafe for ServerResponse<'a>
impl<'a> !Send for ServerResponse<'a>
impl<'a> !Sync for ServerResponse<'a>
impl<'a> Unpin for ServerResponse<'a>
impl<'a> UnsafeUnpin for ServerResponse<'a>
impl<'a> UnwindSafe for ServerResponse<'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