pub struct Publication { /* private fields */ }Expand description
A declared publisher with its QoS profile applied — the only publish path.
Implementations§
Source§impl Publication
impl Publication
Sourcepub async fn send(
&self,
payload: Vec<u8>,
attachment: Option<Vec<u8>>,
) -> Result<()>
pub async fn send( &self, payload: Vec<u8>, attachment: Option<Vec<u8>>, ) -> Result<()>
Publish one payload, with an optional attachment riding beside it
(#117 — attachments are outside the registry’s vocabulary and are
never schema-encoded). Sets the wire Encoding when one was declared
(RFC 04 v1.5’s recommendation: publishers say what they carry).
Sourcepub async fn send_stamped(
&self,
payload: Vec<u8>,
attachment: Option<Vec<u8>>,
timestamp: Option<Timestamp>,
) -> Result<()>
pub async fn send_stamped( &self, payload: Vec<u8>, attachment: Option<Vec<u8>>, timestamp: Option<Timestamp>, ) -> Result<()>
send, with an explicit HLC timestamp when the caller
mints one (session.new_timestamp()). None leaves stamping to the
deployment’s config — the default put behaviour. The generator uses
this to stamp state samples for LWW (RFC 04 §4) and, for its
unstamped fault (#163), to deliberately omit the stamp.
Sourcepub async fn retire(&self) -> Result<()>
pub async fn retire(&self) -> Result<()>
Publish a tombstone — an authoritative retirement (RFC 04 §1.2),
never a payload marker. The only delete path: it rides the declared
publisher, and Session::delete stays unexposed for the same reason
there is no bare-put helper. Gate dynamic keys through
check_retire first — the class semantics live there.
Sourcepub async fn matching_status(&self) -> Result<bool>
pub async fn matching_status(&self) -> Result<bool>
Whether any subscriber currently matches this publication — a
routing fact about the publisher this process declared (RFC 12 §9’s
allowed half). It says nothing about other publishers on the key, and
false is not a fleet verdict (“no subscriber matched our
publication”, never “nobody listens here” — RFC 05 §3.1 applied to a
badge).
Sourcepub async fn matching_events(&self) -> Result<MatchingEvents>
pub async fn matching_events(&self) -> Result<MatchingEvents>
Event-driven matching changes for this publication — the badge feed.
Same honesty bounds as matching_status.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Publication
impl !UnwindSafe for Publication
impl Freeze for Publication
impl Send for Publication
impl Sync for Publication
impl Unpin for Publication
impl UnsafeUnpin for Publication
Blanket Implementations§
Source§impl<Source> AccessAs for Source
impl<Source> AccessAs for Source
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more