[−][src]Struct roa_core::Context
Fields
app: App<M>Methods
impl<M: Model> Context<M>[src]
pub fn new(request: Request, app: App<M>, stream: AddrStream) -> Self[src]
pub async fn req<'a>(&'a self) -> RwLockReadGuard<'a, Request>[src]
pub async fn resp<'a>(&'a self) -> RwLockReadGuard<'a, Response>[src]
pub async fn state<'a>(&'a self) -> RwLockReadGuard<'a, M::State>[src]
pub async fn storage<'a>(
&'a self
) -> RwLockReadGuard<'a, HashMap<TypeId, Bucket>>[src]
&'a self
) -> RwLockReadGuard<'a, HashMap<TypeId, Bucket>>
pub async fn req_mut<'a>(&'a self) -> RwLockWriteGuard<'a, Request>[src]
pub async fn resp_mut<'a>(&'a self) -> RwLockWriteGuard<'a, Response>[src]
pub async fn state_mut<'a>(&'a self) -> RwLockWriteGuard<'a, M::State>[src]
pub async fn storage_mut<'a>(
&'a self
) -> RwLockWriteGuard<'a, HashMap<TypeId, Bucket>>[src]
&'a self
) -> RwLockWriteGuard<'a, HashMap<TypeId, Bucket>>
pub async fn uri<'_>(&'_ self) -> Uri[src]
pub async fn method<'_>(&'_ self) -> Method[src]
pub async fn header<'_, '_>(
&'_ self,
name: &'_ HeaderName
) -> Option<Result<String, ToStrError>>[src]
&'_ self,
name: &'_ HeaderName
) -> Option<Result<String, ToStrError>>
pub async fn header_value<'_, '_>(
&'_ self,
name: &'_ HeaderName
) -> Option<HeaderValue>[src]
&'_ self,
name: &'_ HeaderName
) -> Option<HeaderValue>
pub async fn status<'_>(&'_ self) -> StatusCode[src]
pub async fn version<'_>(&'_ self) -> Version[src]
pub async fn store<'a, '_, T: 'static>(
&'_ self,
name: &'a str,
value: String
) -> Option<Variable<'a>>[src]
&'_ self,
name: &'a str,
value: String
) -> Option<Variable<'a>>
pub async fn load<'a, '_, T: 'static>(
&'_ self,
name: &'a str
) -> Option<Variable<'a>>[src]
&'_ self,
name: &'a str
) -> Option<Variable<'a>>
pub fn remote_addr(&self) -> SocketAddr[src]
pub fn raw_stream(&self) -> &TcpStream[src]
Trait Implementations
impl<M: Model> Clone for Context<M>[src]
fn clone(&self) -> Self[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]
Auto Trait Implementations
impl<M> !RefUnwindSafe for Context<M>
impl<M> Send for Context<M> where
<M as Model>::State: Send + Sync,
<M as Model>::State: Send + Sync,
impl<M> Sync for Context<M> where
<M as Model>::State: Send + Sync,
<M as Model>::State: Send + Sync,
impl<M> Unpin for Context<M>
impl<M> !UnwindSafe for Context<M>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T[src]
fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,