Struct calloop::Token [−][src]
pub struct Token {
pub sub_id: u32,
// some fields omitted
}
Expand description
A Token for registration
This token is given to you by the event loop, and you should
forward it to the Poll
when registering your file descriptors.
It also contains a publc field that you can change. In case your event
source needs to register more than one FD, you can register each with a
different value of the sub_id
field, to differentiate them. You can then
know which of these FD is ready by reading the sub_id
field of the
token you’ll be given in the process_events
method of your source.
Fields
sub_id: u32
The source-internal ID
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Token
impl UnwindSafe for Token
Blanket Implementations
Mutably borrows from an owned value. Read more