Struct sim_by_fired_event::event::EventScheduler [−][src]
event scheduler
Implementations
impl<E: Event> EventScheduler<E>
[src]
pub fn have_event(&self) -> bool
[src]
judge exist scheduled event
pub fn count(&self) -> usize
[src]
get length of scheduled events
pub fn clear(&mut self)
[src]
clear all scheduled events
pub fn remove_when<P>(&mut self, predicate: P) where
P: FnMut(&(LocalEventTime, Schedule, Priority, E)) -> bool,
[src]
P: FnMut(&(LocalEventTime, Schedule, Priority, E)) -> bool,
remove scheduled events when predicate function is true
pub fn retain<P>(&mut self, predicate: P) where
P: FnMut(&(LocalEventTime, Schedule, Priority, E)) -> bool,
[src]
P: FnMut(&(LocalEventTime, Schedule, Priority, E)) -> bool,
retains only the scheduled events specified by the predicate.
pub fn schedule<R: Rng + ?Sized>(
&mut self,
rng: &mut R,
schedule: Schedule,
priority: Priority,
event: E
) -> Result<(), ScheduleEventError>
[src]
&mut self,
rng: &mut R,
schedule: Schedule,
priority: Priority,
event: E
) -> Result<(), ScheduleEventError>
store event with scheduling
pub fn schedule_when<R: Rng + ?Sized, P>(
&mut self,
rng: &mut R,
schedule: Schedule,
priority: Priority,
event: E,
predicate: P
) -> Result<(), ScheduleEventError> where
P: FnOnce(&Self) -> bool,
[src]
&mut self,
rng: &mut R,
schedule: Schedule,
priority: Priority,
event: E,
predicate: P
) -> Result<(), ScheduleEventError> where
P: FnOnce(&Self) -> bool,
store event with scheduling when user judge ok from all scheduled events
pub fn immediate<R: Rng + ?Sized>(
&mut self,
rng: &mut R,
priority: Priority,
event: E
) -> Result<(), ScheduleEventError>
[src]
&mut self,
rng: &mut R,
priority: Priority,
event: E
) -> Result<(), ScheduleEventError>
store event which fire at immediate timing
pub fn timeout<R: Rng + ?Sized>(
&mut self,
rng: &mut R,
timeout: EventTimer,
priority: Priority,
event: E
) -> Result<(), ScheduleEventError>
[src]
&mut self,
rng: &mut R,
timeout: EventTimer,
priority: Priority,
event: E
) -> Result<(), ScheduleEventError>
store event which fire after timeout
pub fn everytime<R: Rng + ?Sized>(
&mut self,
rng: &mut R,
priority: Priority,
event: E
) -> Result<(), ScheduleEventError>
[src]
&mut self,
rng: &mut R,
priority: Priority,
event: E
) -> Result<(), ScheduleEventError>
store event which fire every time
pub fn every_interval<R: Rng + ?Sized>(
&mut self,
rng: &mut R,
interval: EventTimer,
priority: Priority,
event: E
) -> Result<(), ScheduleEventError>
[src]
&mut self,
rng: &mut R,
interval: EventTimer,
priority: Priority,
event: E
) -> Result<(), ScheduleEventError>
store event which fire every interval
pub fn repeat<R: Rng + ?Sized>(
&mut self,
rng: &mut R,
count: u8,
interval: EventTimer,
priority: Priority,
event: E
) -> Result<(), ScheduleEventError>
[src]
&mut self,
rng: &mut R,
count: u8,
interval: EventTimer,
priority: Priority,
event: E
) -> Result<(), ScheduleEventError>
store event which fire every interval only count
Trait Implementations
impl<E: Clone + Event> Clone for EventScheduler<E>
[src]
fn clone(&self) -> EventScheduler<E>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<E: Debug + Event> Debug for EventScheduler<E>
[src]
Auto Trait Implementations
impl<E> RefUnwindSafe for EventScheduler<E> where
E: RefUnwindSafe,
E: RefUnwindSafe,
impl<E> Send for EventScheduler<E> where
E: Send,
E: Send,
impl<E> Sync for EventScheduler<E> where
E: Sync,
E: Sync,
impl<E> Unpin for EventScheduler<E> where
E: Unpin,
E: Unpin,
impl<E> UnwindSafe for EventScheduler<E> where
E: UnwindSafe,
E: UnwindSafe,
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> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,