Skip to main content

ServerJob

Trait ServerJob 

Source
pub trait ServerJob: Send {
    // Required method
    fn poll(&mut self, context: &mut ServerJobContext) -> JobPoll;

    // Provided method
    fn cancel(&mut self) { ... }
}
Expand description

A unit of server work resumed from a known tick stage.

Required Methods§

Source

fn poll(&mut self, context: &mut ServerJobContext) -> JobPoll

Polls this job.

Provided Methods§

Source

fn cancel(&mut self)

Cancels the job before it finishes.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§