Struct breadthread::Key [−][src]
pub struct Key<Type> { /* fields omitted */ }
Expand description
A key. This is a wrapper around a non-zero usize
that usually represents a pointer. This object represents
a foreign object, usually managed by the API that the bread thread is managing. This is provided as a utility
so you know that the pointer you have is a pointer to the object you’re talking about. The thread itself is
able to verify that the pointer not only is not dangling, but refers to the type you are talking about.
Implementations
Create a new Key
from a NonZeroUsize
.
Get the NonZeroUsize
from this Key
.
Create a new Key
from a non-null pointer.
Create a new Key
from a pointer. This function returns None
if the pointer is null.
Convert this Key
into a non-null pointer.
Get the type identifier for this key.
Get a bundle between the identifier and the actual pointer.
Trait Implementations
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Auto Trait Implementations
impl<Type> RefUnwindSafe for Key<Type> where
Type: RefUnwindSafe,
impl<Type> UnwindSafe for Key<Type> where
Type: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more