pub struct AppContext { /* private fields */ }Implementations§
Source§impl AppContext
impl AppContext
pub fn remote_addr(&self) -> String
pub fn command(&self) -> Option<Command>
pub fn user_id(&self) -> Option<String>
pub fn platform(&self) -> Option<i32>
pub fn client_id(&self) -> Option<String>
pub fn language(&self) -> Option<String>
pub fn data(&self) -> &[u8] ⓘ
pub fn set_data(&mut self, data: Vec<u8>)
pub fn get_data_as<T: Message + Default>(&self) -> Result<T>
pub fn msg_id(&self) -> Result<String>
pub fn bool_data(&self) -> Result<bool>
pub fn string_data(&self) -> Result<String>
pub fn int_data(&self) -> Result<i64>
pub fn float_data(&self) -> Result<f64>
pub fn set_val<T: ToString>(&self, key: &str, value: T)
pub fn get_val<T: FromStr>(&self, key: &str) -> Option<T>
pub fn del_val(&self, key: &str) -> Option<String>
pub fn destroy(&mut self)
pub fn values(&self) -> &Arc<Mutex<HashMap<String, String>>>
pub fn conn_id(&self) -> String
pub fn client_msg_id(&self) -> String
Trait Implementations§
Source§impl Clone for AppContext
impl Clone for AppContext
Source§impl Default for AppContext
impl Default for AppContext
Source§fn default() -> AppContext
fn default() -> AppContext
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for AppContext
impl RefUnwindSafe for AppContext
impl Send for AppContext
impl Sync for AppContext
impl Unpin for AppContext
impl UnwindSafe for AppContext
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