Struct usiagent::event::USIEventDispatcher [−][src]
pub struct USIEventDispatcher<'b, K, E, T, L, UE> where
K: MaxIndex + Debug,
E: MapEventKind<K> + Debug,
L: Logger,
UE: PlayerError,
EventHandlerError<K, UE>: From<UE>,
usize: From<K>, { /* fields omitted */ }
Expand description
EventDispatcher
の実装
Implementations
impl<'b, K, E, T, L, UE> USIEventDispatcher<'b, K, E, T, L, UE> where
K: MaxIndex + Debug,
E: MapEventKind<K> + Debug,
L: Logger,
UE: PlayerError,
EventHandlerError<K, UE>: From<UE>,
usize: From<K>,
impl<'b, K, E, T, L, UE> USIEventDispatcher<'b, K, E, T, L, UE> where
K: MaxIndex + Debug,
E: MapEventKind<K> + Debug,
L: Logger,
UE: PlayerError,
EventHandlerError<K, UE>: From<UE>,
usize: From<K>,
pub fn new(
on_error_handler: &Arc<Mutex<OnErrorHandler<L>>>
) -> USIEventDispatcher<'b, K, E, T, L, UE> where
K: MaxIndex + Debug,
usize: From<K>,
E: MapEventKind<K> + Debug,
L: Logger,
UE: PlayerError,
EventHandlerError<K, UE>: From<UE>,
pub fn new(
on_error_handler: &Arc<Mutex<OnErrorHandler<L>>>
) -> USIEventDispatcher<'b, K, E, T, L, UE> where
K: MaxIndex + Debug,
usize: From<K>,
E: MapEventKind<K> + Debug,
L: Logger,
UE: PlayerError,
EventHandlerError<K, UE>: From<UE>,
Trait Implementations
impl<'b, K, E, T, L, UE> EventDispatcher<'b, K, E, T, UE> for USIEventDispatcher<'b, K, E, T, L, UE> where
K: MaxIndex + Debug,
E: MapEventKind<K> + Debug,
L: Logger,
UE: PlayerError,
EventHandlerError<K, UE>: From<UE>,
usize: From<K>,
impl<'b, K, E, T, L, UE> EventDispatcher<'b, K, E, T, UE> for USIEventDispatcher<'b, K, E, T, L, UE> where
K: MaxIndex + Debug,
E: MapEventKind<K> + Debug,
L: Logger,
UE: PlayerError,
EventHandlerError<K, UE>: From<UE>,
usize: From<K>,
fn add_handler<F>(&mut self, id: K, handler: F) where
F: FnMut(&T, &E) -> Result<(), EventHandlerError<K, UE>> + 'b,
fn add_handler<F>(&mut self, id: K, handler: F) where
F: FnMut(&T, &E) -> Result<(), EventHandlerError<K, UE>> + 'b,
イベントハンドラの追加 Read more
fn add_once_handler<F>(&mut self, id: K, handler: F) where
F: FnMut(&T, &E) -> Result<(), EventHandlerError<K, UE>> + 'b,
fn add_once_handler<F>(&mut self, id: K, handler: F) where
F: FnMut(&T, &E) -> Result<(), EventHandlerError<K, UE>> + 'b,
一度だけ実行されるイベントハンドラの追加 Read more
fn dispatch_events<'a>(
&mut self,
ctx: &T,
event_queue: &'a Mutex<EventQueue<E, K>>
) -> Result<(), EventDispatchError<'a, EventQueue<E, K>, E, UE>> where
E: Debug,
K: Debug,
usize: From<K>,
fn dispatch_events<'a>(
&mut self,
ctx: &T,
event_queue: &'a Mutex<EventQueue<E, K>>
) -> Result<(), EventDispatchError<'a, EventQueue<E, K>, E, UE>> where
E: Debug,
K: Debug,
usize: From<K>,
イベントのディスパッチ Read more