pub struct SerialExecutor;Expand description
An Executor that runs jobs one at a time on the calling thread.
§Examples
use increparse::{CancelToken, Executor, Job, Outcome, SerialExecutor, Span};
let exec = SerialExecutor;
let jobs = vec![Job { node: increparse::NodeId(0), span: Span::new(0, 1, 0), ctx: (), pass_index: 0 }];
let out = exec.execute(jobs, |_| Outcome::Done, &CancelToken::new());
assert_eq!(out.len(), 1);Trait Implementations§
Source§impl Clone for SerialExecutor
impl Clone for SerialExecutor
Source§fn clone(&self) -> SerialExecutor
fn clone(&self) -> SerialExecutor
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for SerialExecutor
Source§impl Debug for SerialExecutor
impl Debug for SerialExecutor
Source§impl Default for SerialExecutor
impl Default for SerialExecutor
Source§fn default() -> SerialExecutor
fn default() -> SerialExecutor
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SerialExecutor
impl RefUnwindSafe for SerialExecutor
impl Send for SerialExecutor
impl Sync for SerialExecutor
impl Unpin for SerialExecutor
impl UnsafeUnpin for SerialExecutor
impl UnwindSafe for SerialExecutor
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