Struct actix_http::ResponseHead
source · [−]pub struct ResponseHead {
pub version: Version,
pub status: StatusCode,
pub headers: HeaderMap,
pub reason: Option<&'static str>,
/* private fields */
}
Fields
version: Version
status: StatusCode
headers: HeaderMap
reason: Option<&'static str>
Implementations
sourceimpl ResponseHead
impl ResponseHead
sourcepub fn new(status: StatusCode) -> ResponseHead
pub fn new(status: StatusCode) -> ResponseHead
Create new instance of ResponseHead
type
sourcepub fn extensions(&self) -> Ref<'_, Extensions>
pub fn extensions(&self) -> Ref<'_, Extensions>
Message extensions
sourcepub fn extensions_mut(&self) -> RefMut<'_, Extensions>
pub fn extensions_mut(&self) -> RefMut<'_, Extensions>
Mutable reference to a the message’s extensions
sourcepub fn headers_mut(&mut self) -> &mut HeaderMap
pub fn headers_mut(&mut self) -> &mut HeaderMap
Mutable reference to the message headers.
sourcepub 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
sourcepub fn keep_alive(&self) -> bool
pub fn keep_alive(&self) -> bool
Check if keep-alive is enabled
sourcepub fn no_chunking(&mut self, val: bool)
pub fn no_chunking(&mut self, val: bool)
Set no chunking for payload
Trait Implementations
sourceimpl Debug for ResponseHead
impl Debug for ResponseHead
sourceimpl<'a> From<&'a ResponseHead> for ResponseBuilder
impl<'a> From<&'a ResponseHead> for ResponseBuilder
Convert ResponseHead
to a ResponseBuilder
sourcefn from(head: &'a ResponseHead) -> ResponseBuilder
fn from(head: &'a ResponseHead) -> ResponseBuilder
Converts to this type from the input type.
Auto Trait Implementations
impl !RefUnwindSafe for ResponseHead
impl !Send for ResponseHead
impl !Sync for ResponseHead
impl Unpin for ResponseHead
impl !UnwindSafe for ResponseHead
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more