1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-06-24 22:37:35 +02:00

Impl BodyEncoding for Response (#740)

This commit is contained in:
Douman
2019-03-30 02:29:11 +03:00
committed by Nikolay Kim
parent c126713f40
commit 00526f60dc
3 changed files with 44 additions and 1 deletions

View File

@ -189,6 +189,18 @@ impl<B> Response<B> {
self.head.keep_alive()
}
/// Responses extensions
#[inline]
pub fn extensions(&self) -> Ref<Extensions> {
self.head.extensions.borrow()
}
/// Mutable reference to a the response's extensions
#[inline]
pub fn extensions_mut(&mut self) -> RefMut<Extensions> {
self.head.extensions.borrow_mut()
}
/// Get body os this response
#[inline]
pub fn body(&self) -> &ResponseBody<B> {