pub struct Context(/* private fields */);
Implementations§
Source§impl Context
impl Context
pub async fn get_read_lock(&self) -> RwLockReadContext<'_>
pub async fn get_write_lock(&self) -> RwLockWriteContext<'_>
pub async fn get(&self) -> InnerContext
pub async fn get_request(&self) -> Request
pub async fn get_response(&self) -> Response
pub async fn get_log(&self) -> Log
pub async fn get_socket(&self) -> OptionArcRwLockUdpSocket
pub async fn get_socket_addr(&self) -> OptionSocketAddr
pub async fn get_socket_addr_or_default(&self) -> SocketAddr
pub async fn get_socket_addr_string(&self) -> Option<String>
pub async fn get_socket_addr_or_default_string(&self) -> String
pub async fn get_socket_host(&self) -> OptionSocketHost
pub async fn get_socket_port(&self) -> OptionSocketPort
pub async fn log_info<T, L>(&self, data: T, func: L) -> &Selfwhere
T: ToString,
L: LogFuncTrait<T>,
pub async fn log_debug<T, L>(&self, data: T, func: L) -> &Selfwhere
T: ToString,
L: LogFuncTrait<T>,
pub async fn log_error<T, L>(&self, data: T, func: L) -> &Selfwhere
T: ToString,
L: LogFuncTrait<T>,
pub async fn async_log_info<T, L>(&self, data: T, func: L) -> &Selfwhere
T: ToString,
L: LogFuncTrait<T>,
pub async fn async_log_debug<T, L>(&self, data: T, func: L) -> &Selfwhere
T: ToString,
L: LogFuncTrait<T>,
pub async fn async_log_error<T, L>(&self, data: T, func: L) -> &Selfwhere
T: ToString,
L: LogFuncTrait<T>,
pub async fn send<T: Into<ResponseData>>(&self, data: T) -> ResponseResult
pub async fn set_data_value<T: Any + Send + Sync + Clone>( &self, key: &str, value: &T, ) -> &Self
pub async fn get_data_value<T: Any + Send + Sync + Clone>( &self, key: &str, ) -> Option<T>
pub async fn remove_data_value(&self, key: &str) -> &Self
pub async fn clear_data(&self) -> &Self
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Context
impl !RefUnwindSafe for Context
impl Send for Context
impl Sync for Context
impl Unpin for Context
impl !UnwindSafe for Context
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