[−][src]Struct wd_event::context::Context
Implementations
impl Context
[src]
pub fn new_null() -> Self
[src]
pub fn new_add_msg<V: Any>(msg: V) -> Self
[src]
pub fn new_delay(t: Duration, cycle: bool) -> Self
[src]
pub fn get_msg<T: 'static>(&self) -> Option<Arc<T>>
[src]
pub fn get_delay(&self) -> Duration
[src]
pub fn set_value<K: ToString, V: Any>(&self, key: K, value: V)
[src]
pub fn get_value_raw<K: ToString>(&self, key: &K) -> Option<Arc<dyn Any>>
[src]
pub fn get_value<K: ToString, T: Clone + 'static>(&self, key: &K) -> Option<T>
[src]
获取指定类型的数据,该类型需要实现Clone
let value:&str = match ctx.get_value("haha"){ Some(s)=>{s} None=>{"haha"} };
pub fn get_arc_value<K: ToString, T: 'static>(&self, key: &K) -> Option<Arc<T>>
[src]
pub fn set_status(&self, status: bool)
[src]
在顺序执行的事件中,如果检测到状态失败,则不再执行后续回调
pub fn get_status(&self) -> bool
[src]
Trait Implementations
Auto Trait Implementations
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,
pub 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, 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.
pub 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>,