Struct mio::io_source::SelectorId
source · struct SelectorId {
id: AtomicUsize,
}
Expand description
Used to associate an IoSource
with a sys::Selector
.
Fields§
§id: AtomicUsize
Implementations§
source§impl SelectorId
impl SelectorId
sourceconst UNASSOCIATED: usize = 0usize
const UNASSOCIATED: usize = 0usize
Value of id
if SelectorId
is not associated with any
sys::Selector
. Valid selector ids start at 1.
sourceconst fn new() -> SelectorId
const fn new() -> SelectorId
Create a new SelectorId
.
sourcefn associate(&self, registry: &Registry) -> Result<()>
fn associate(&self, registry: &Registry) -> Result<()>
Associate an I/O source with registry
, returning an error if its
already registered.
sourcefn check_association(&self, registry: &Registry) -> Result<()>
fn check_association(&self, registry: &Registry) -> Result<()>
Check the association of an I/O source with registry
, returning an
error if its registered with a different Registry
or not registered at
all.
sourcefn remove_association(&self, registry: &Registry) -> Result<()>
fn remove_association(&self, registry: &Registry) -> Result<()>
Remove a previously made association from registry
, returns an error
if it was not previously associated with registry
.
Trait Implementations§
source§impl Clone for SelectorId
impl Clone for SelectorId
source§fn clone(&self) -> SelectorId
fn clone(&self) -> SelectorId
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl RefUnwindSafe for SelectorId
impl Send for SelectorId
impl Sync for SelectorId
impl Unpin for SelectorId
impl UnwindSafe for SelectorId
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