Struct ajars_actix_web::actix_web::dev::ResponseHead [−]
pub struct ResponseHead {
pub version: Version,
pub status: StatusCode,
pub headers: HeaderMap,
pub reason: Option<&'static str>,
// some fields omitted
}
Fields
version: Version
status: StatusCode
headers: HeaderMap
reason: Option<&'static str>
Implementations
impl ResponseHead
impl ResponseHead
pub fn new(status: StatusCode) -> ResponseHead
pub fn new(status: StatusCode) -> ResponseHead
Create new instance of ResponseHead
type
pub fn extensions(&self) -> Ref<'_, Extensions>
pub fn extensions(&self) -> Ref<'_, Extensions>
Message extensions
pub fn extensions_mut(&self) -> RefMut<'_, Extensions>
pub fn extensions_mut(&self) -> RefMut<'_, Extensions>
Mutable reference to a the message’s extensions
pub fn headers_mut(&mut self) -> &mut HeaderMap
pub fn headers_mut(&mut self) -> &mut HeaderMap
Mutable reference to the message headers.
pub fn set_connection_type(&mut self, ctype: ConnectionType)
pub fn set_connection_type(&mut self, ctype: ConnectionType)
Set connection type of the message
pub fn connection_type(&self) -> ConnectionType
pub fn keep_alive(&self) -> bool
pub fn keep_alive(&self) -> bool
Check if keep-alive is enabled
pub fn no_chunking(&mut self, val: bool)
pub fn no_chunking(&mut self, val: bool)
Set no chunking for payload
Trait Implementations
impl Debug for ResponseHead
impl Debug for ResponseHead
impl<'a> From<&'a ResponseHead> for ResponseBuilder
impl<'a> From<&'a ResponseHead> for ResponseBuilder
Convert ResponseHead
to a ResponseBuilder
pub fn from(head: &'a ResponseHead) -> ResponseBuilderⓘNotable traits for ResponseBuilderimpl Future for ResponseBuilder type Output = Result<Response<AnyBody>, Error>;
pub fn from(head: &'a ResponseHead) -> ResponseBuilderⓘNotable traits for ResponseBuilderimpl Future for ResponseBuilder type Output = Result<Response<AnyBody>, Error>;
Notable traits for ResponseBuilder
impl Future for ResponseBuilder type Output = Result<Response<AnyBody>, Error>;
Performs the conversion.