Struct dce_router::request::RequestContext
source · pub struct RequestContext<Raw: RawRequest + 'static> { /* private fields */ }Implementations§
source§impl<Raw: RawRequest + 'static> RequestContext<Raw>
impl<Raw: RawRequest + 'static> RequestContext<Raw>
pub fn new(router: Arc<Router<Raw>>, raw: Raw) -> RequestContext<Raw>
pub fn router(&self) -> &Arc<Router<Raw>>
pub fn api(&self) -> DceResult<&'static (dyn ApiTrait<Raw> + Send + Sync)>
pub fn raw(&self) -> &Raw
pub fn params(&self) -> &HashMap<&'static str, PathParam>
pub fn set_api(self, api: &'static (dyn ApiTrait<Raw> + Send + Sync)) -> Self
pub fn set_params(self, params: HashMap<&'static str, PathParam>) -> Self
pub fn set_data(self, data: HashMap<String, Box<dyn Any + Send>>) -> Self
pub fn put_data(self, key: String, value: Box<dyn Any + Send>) -> Self
Trait Implementations§
Auto Trait Implementations§
impl<Raw> !RefUnwindSafe for RequestContext<Raw>
impl<Raw> Send for RequestContext<Raw>where
Raw: Send,
impl<Raw> !Sync for RequestContext<Raw>
impl<Raw> Unpin for RequestContext<Raw>where
Raw: Unpin,
impl<Raw> !UnwindSafe for RequestContext<Raw>
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