pub struct Batch<T: 'static> {
pub size: usize,
pub functions: Vec<Arc<dyn Fn() -> T + Send + Sync>>,
pub stats: bool,
pub batch_wait_dur: u64,
}Fields§
§size: usize§functions: Vec<Arc<dyn Fn() -> T + Send + Sync>>§stats: bool§batch_wait_dur: u64Implementations§
Source§impl<T: 'static> Batch<T>
impl<T: 'static> Batch<T>
pub fn new() -> Self
pub fn set_size(&mut self, s: usize)
pub fn set_stats(&mut self, s: bool)
pub fn set_batch_wait_dur(&mut self, s: u64)
pub fn add_func(&mut self, func: impl Fn() -> T + Send + Sync + 'static)
pub fn length(&self) -> usize
pub fn itr_fn(&self, arr: Vec<Arc<dyn Fn() -> T + Send + Sync>>)
pub fn execute_linear(&self)
pub fn execute(&self)
pub fn get_time_in_ms(&self) -> u64
Auto Trait Implementations§
impl<T> Freeze for Batch<T>
impl<T> !RefUnwindSafe for Batch<T>
impl<T> Send for Batch<T>
impl<T> Sync for Batch<T>
impl<T> Unpin for Batch<T>
impl<T> !UnwindSafe for Batch<T>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more