Struct fp_rust::handler::HandlerThread[][src]

pub struct HandlerThread { /* fields omitted */ }
Expand description

HandlerThread could receive FnMut and run them on its own thread. It implements Handler trait simply and works well.

This is kind of facade which just handles thread, and bypasses jobs to HandlerThreadInner(private implementations).

Remarks

This is highly inspired by Android Handler concepts.

Implementations

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Returns the “default value” for a type. Read more

Did this Handler start? Return true when it did started (no matter it has stopped or not) Read more

Is this Handler alive? Return true when it has started and not stopped yet. Read more

Start Handler.

Stop Cor. This will make self.is_alive() returns false, and all FnMut posted by self.post() will not be executed. (Because it has stopped :P, that’s reasonable) Read more

Post a job which will run on this Handler. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.