pub struct SimqBuilder<A, B> { /* private fields */ }Expand description
Job Builder
Implementations§
Source§impl<A: Send + 'static, B: Send + 'static> SimqBuilder<A, B>
impl<A: Send + 'static, B: Send + 'static> SimqBuilder<A, B>
Sourcepub fn register(max_threads: usize, func: fn(A) -> B) -> Self
pub fn register(max_threads: usize, func: fn(A) -> B) -> Self
Register a job, designating the maximum number of parallel threads you wish to run the task
Sourcepub fn and_then(self, and_then: fn(&B)) -> Self
pub fn and_then(self, and_then: fn(&B)) -> Self
§CANNOT BE USED IN CONJUNCTION WITH and_then_mut
After producing a result, do something with the result This is good for additional work, like logging or storing to a database
Sourcepub fn and_then_mut(self, and_then_mut: fn(&mut B)) -> Self
pub fn and_then_mut(self, and_then_mut: fn(&mut B)) -> Self
§CANNOT BE USED IN CONJUNCTION WITH and_then
After producing a result, do something with the result (mutable) Same as the and_then callback, but if you need a mutable reference for some reason
Auto Trait Implementations§
impl<A, B> Freeze for SimqBuilder<A, B>
impl<A, B> RefUnwindSafe for SimqBuilder<A, B>
impl<A, B> Send for SimqBuilder<A, B>
impl<A, B> Sync for SimqBuilder<A, B>
impl<A, B> Unpin for SimqBuilder<A, B>
impl<A, B> UnwindSafe for SimqBuilder<A, B>
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