pub enum AnyHandle {
Channel(Channel),
Socket(Socket),
Event(Event),
EventPair(EventPair),
Unknown(Handle, ObjectType),
}
Expand description
Sum type of all the handle types which can be read from a channel. Allows the user to learn the type of a handle after it has been read.
Variants§
Implementations§
Source§impl AnyHandle
impl AnyHandle
Sourcepub fn from_handle(handle: Handle, ty: ObjectType) -> AnyHandle
pub fn from_handle(handle: Handle, ty: ObjectType) -> AnyHandle
Construct an AnyHandle
from a Handle
and an object type.
Sourcepub fn object_type(&self) -> ObjectType
pub fn object_type(&self) -> ObjectType
Get the object type for a handle.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AnyHandle
impl RefUnwindSafe for AnyHandle
impl Send for AnyHandle
impl Sync for AnyHandle
impl Unpin for AnyHandle
impl UnwindSafe for AnyHandle
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