pub struct Publication {
pub topic: Topic,
pub publisher: KernelId,
pub envelope: MessageEnvelope,
pub timestamp: HlcTimestamp,
pub qos: QoS,
pub sequence: u64,
pub retained: bool,
}Expand description
A published message on a topic.
Fields§
§topic: TopicTopic the message was published to.
publisher: KernelIdPublisher kernel ID.
envelope: MessageEnvelopeThe message envelope.
timestamp: HlcTimestampPublication timestamp.
qos: QoSQoS level.
sequence: u64Sequence number (for ordering).
retained: boolWhether this is a retained message.
Implementations§
Source§impl Publication
impl Publication
Sourcepub fn new(
topic: Topic,
publisher: KernelId,
envelope: MessageEnvelope,
timestamp: HlcTimestamp,
) -> Self
pub fn new( topic: Topic, publisher: KernelId, envelope: MessageEnvelope, timestamp: HlcTimestamp, ) -> Self
Create a new publication.
Sourcepub fn with_retained(self, retained: bool) -> Self
pub fn with_retained(self, retained: bool) -> Self
Mark as retained.
Trait Implementations§
Source§impl Clone for Publication
impl Clone for Publication
Source§fn clone(&self) -> Publication
fn clone(&self) -> Publication
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for Publication
impl RefUnwindSafe for Publication
impl Send for Publication
impl Sync for Publication
impl Unpin for Publication
impl UnwindSafe for Publication
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
§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
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
§fn deserialize(
&self,
deserializer: &mut D,
) -> Result<With<T, W>, <D as Fallible>::Error>
fn deserialize( &self, deserializer: &mut D, ) -> Result<With<T, W>, <D as Fallible>::Error>
Deserializes using the given deserializer
§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
§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.