Struct imap_client::tasks::Scheduler
source · pub struct Scheduler {
pub client_next: Client,
pub tag_generator: TagGenerator,
/* private fields */
}Expand description
Scheduler managing enqueued tasks and routing incoming responses to active tasks.
Fields§
§client_next: Client§tag_generator: TagGeneratorImplementations§
source§impl Scheduler
impl Scheduler
sourcepub fn new(client_next: ClientNext) -> Self
pub fn new(client_next: ClientNext) -> Self
Create a new scheduler.
sourcepub fn enqueue_task<T>(&mut self, task: T) -> TaskHandle<T>where
T: Task,
pub fn enqueue_task<T>(&mut self, task: T) -> TaskHandle<T>where
T: Task,
Enqueue a Task.
pub fn enqueue_input(&mut self, bytes: &[u8])
sourcepub fn progress(&mut self) -> Result<SchedulerEvent, Interrupt<SchedulerError>>
pub fn progress(&mut self) -> Result<SchedulerEvent, Interrupt<SchedulerError>>
Progress the connection returning the next event.
Trait Implementations§
source§impl State for Scheduler
impl State for Scheduler
§type Event = SchedulerEvent
type Event = SchedulerEvent
Event emitted while progressing the state.
§type Error = SchedulerError
type Error = SchedulerError
Error emitted while progressing the state.
source§fn enqueue_input(&mut self, bytes: &[u8])
fn enqueue_input(&mut self, bytes: &[u8])
Enqueue input bytes. Read more
Auto Trait Implementations§
impl Freeze for Scheduler
impl !RefUnwindSafe for Scheduler
impl Send for Scheduler
impl !Sync for Scheduler
impl Unpin for Scheduler
impl !UnwindSafe for Scheduler
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