Skip to main content

Threadable

Trait Threadable 

Source
pub trait Threadable: Send {
    // Required method
    fn install(&self, installer: &Installer);

    // Provided methods
    fn pause(&self) { ... }
    fn resume(&self) { ... }
    fn end(&self) { ... }
}
Expand description

An interface for a entity that has threads managed by the Runtime.

Required Methods§

Source

fn install(&self, installer: &Installer)

Method that installs the threads that the Threadable is responsible for.

Provided Methods§

Source

fn pause(&self)

Called when threads are requested to pause.

§Errors

Returns an error is that thread cannot be paused for any reason.

Source

fn resume(&self)

Called when threads are requested to resume.

§Errors

Returns an error is that thread cannot be resumed for any reason.

Source

fn end(&self)

Called when threads are requested to finish.

§Errors

Returns an error is that thread cannot be ended for any reason.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§