Struct batch_system::batch::Batch [−][src]
A basic struct for a round of polling.
Fields
normals: Vec<Box<N>>
timers: Vec<Instant>
control: Option<Box<C>>
Implementations
impl<N: Fsm, C: Fsm> Batch<N, C>
[src]
pub fn with_capacity(cap: usize) -> Batch<N, C>
[src]
Create a a batch with given batch size.
fn push(&mut self, fsm: FsmTypes<N, C>) -> bool
[src]
fn is_empty(&self) -> bool
[src]
fn clear(&mut self)
[src]
pub fn release(&mut self, index: usize, checked_len: usize)
[src]
Put back the FSM located at index.
Only when channel length is larger than checked_len
will trigger
further notification. This function may fail if channel length is
larger than the given value before FSM is released.
pub fn remove(&mut self, index: usize)
[src]
Remove the normal FSM located at index
.
This method should only be called when the FSM is stopped. If there are still messages in channel, the FSM is untouched and the function will return false to let caller to keep polling.
pub fn reschedule(&mut self, router: &BatchRouter<N, C>, index: usize)
[src]
Schedule the normal FSM located at index
.
pub fn release_control(
&mut self,
control_box: &BasicMailbox<C>,
checked_len: usize
) -> bool
[src]
&mut self,
control_box: &BasicMailbox<C>,
checked_len: usize
) -> bool
Same as release
, but working on control FSM.
pub fn remove_control(&mut self, control_box: &BasicMailbox<C>)
[src]
Same as remove
, but working on control FSM.
Auto Trait Implementations
impl<N, C> RefUnwindSafe for Batch<N, C> where
C: RefUnwindSafe,
N: RefUnwindSafe,
C: RefUnwindSafe,
N: RefUnwindSafe,
impl<N, C> Send for Batch<N, C> where
C: Send,
N: Send,
C: Send,
N: Send,
impl<N, C> Sync for Batch<N, C> where
C: Sync,
N: Sync,
C: Sync,
N: Sync,
impl<N, C> Unpin for Batch<N, C>
impl<N, C> UnwindSafe for Batch<N, C> where
C: UnwindSafe,
N: UnwindSafe,
C: UnwindSafe,
N: 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> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
[src]
pub const ALIGN: usize
[src]
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
[src]
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
[src]
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
[src]
pub unsafe fn drop(ptr: usize)
[src]
impl<T> Same<T> for T
[src]
type Output = T
Should always be Self
impl<T> Sealed<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> SendSyncUnwindSafe for T where
T: Send + Sync + UnwindSafe + ?Sized,
[src]
T: Send + Sync + UnwindSafe + ?Sized,
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>,
[src]
V: MultiLane<T>,