pub struct Subscription {
pub id: u64,
pub pattern: Topic,
pub subscriber: KernelId,
/* private fields */
}Expand description
A subscription to a topic.
Fields§
§id: u64Subscription ID.
pattern: TopicTopic pattern (may include wildcards).
subscriber: KernelIdSubscriber kernel ID.
Implementations§
Source§impl Subscription
impl Subscription
Sourcepub async fn receive(&mut self) -> Option<Publication>
pub async fn receive(&mut self) -> Option<Publication>
Receive the next publication.
Sourcepub fn try_receive(&mut self) -> Option<Publication>
pub fn try_receive(&mut self) -> Option<Publication>
Try to receive a publication (non-blocking).
Sourcepub fn unsubscribe(self)
pub fn unsubscribe(self)
Unsubscribe from the topic.
Auto Trait Implementations§
impl Freeze for Subscription
impl !RefUnwindSafe for Subscription
impl Send for Subscription
impl Sync for Subscription
impl Unpin for Subscription
impl !UnwindSafe for Subscription
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Gets the layout of the type.