pub struct Topic<Kind> { /* private fields */ }Expand description
A typed topic: one owned family-rooted key bound to its endpoint and side
via Kind.
The key is owned, not a Cow: a path walk renders one concrete key at
handle construction, and one setup-time allocation is preferable to a
permanent dual representation with a forging constructor on each half.
Implementations§
Source§impl<Kind> Topic<Kind>
impl<Kind> Topic<Kind>
Sourcepub fn publish_key(&self) -> Result<&str, WildcardPublish>
pub fn publish_key(&self) -> Result<&str, WildcardPublish>
The key reusable as the publish key. Wildcard topics (*) are
subscribe-only and rejected here before transport.
§Errors
Returns WildcardPublish when the key holds a wildcard segment.
Trait Implementations§
Auto Trait Implementations§
impl<Kind> Freeze for Topic<Kind>
impl<Kind> RefUnwindSafe for Topic<Kind>where
Kind: RefUnwindSafe,
impl<Kind> Send for Topic<Kind>where
Kind: Send,
impl<Kind> Sync for Topic<Kind>where
Kind: Sync,
impl<Kind> Unpin for Topic<Kind>where
Kind: Unpin,
impl<Kind> UnsafeUnpin for Topic<Kind>
impl<Kind> UnwindSafe for Topic<Kind>where
Kind: UnwindSafe,
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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
Converts
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> ⓘ
Converts
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