pub struct Batcher { /* private fields */ }
Expand description
The batching process begins when the batcher receives a job. It will then accept additional jobs, adding them to a batch with the first job, until a max batching time or max batch size is reached - whichever comes first. If the simultaneous arrival of multiple jobs causes the max batch size to be exceeded, then the excess jobs will spillover into the next batching period. In this case of excess jobs, the next batching period begins immediately after the release of the preceding batch. If there are no excess jobs, the batcher will become passive, and wait for a job arrival to initiate the batching process.
Implementations
sourceimpl Batcher
impl Batcher
pub fn from_value(value: Value) -> Option<Box<dyn ReportableModel>>
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Batcher
impl<'de> Deserialize<'de> for Batcher
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl DevsModel for Batcher
impl DevsModel for Batcher
fn events_ext(
&mut self,
incoming_message: &ModelMessage,
services: &mut Services
) -> Result<(), SimulationError>
fn events_int(
&mut self,
services: &mut Services
) -> Result<Vec<ModelMessage>, SimulationError>
fn time_advance(&mut self, time_delta: f64)
fn until_next_event(&self) -> f64
sourceimpl Reportable for Batcher
impl Reportable for Batcher
sourceimpl SerializableModel for Batcher
impl SerializableModel for Batcher
impl ReportableModel for Batcher
Auto Trait Implementations
impl RefUnwindSafe for Batcher
impl Send for Batcher
impl Sync for Batcher
impl Unpin for Batcher
impl UnwindSafe for Batcher
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ModelClone for T where
T: 'static + ReportableModel + Clone,
impl<T> ModelClone for T where
T: 'static + ReportableModel + Clone,
fn clone_box(&self) -> Box<dyn ReportableModel>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more