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: TagGenerator
Implementations§
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§
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