Struct OutboundAliases
pub(super) struct OutboundAliases {
map: HashMap<TopicBuf, NonZeroU16>,
max: Option<NonZeroU16>,
}Available on crate feature
tokio only.Expand description
Outbound topic alias map: the alloc-backed OutboundAliasTable for the
tokio driver.
Fields§
§map: HashMap<TopicBuf, NonZeroU16>Assigned alias of each topic.
max: Option<NonZeroU16>Topic Alias Maximum of the server.
Implementations§
§impl OutboundAliases
impl OutboundAliases
pub(super) fn new(max: Option<NonZeroU16>) -> Self
Trait Implementations§
§impl OutboundAliasTable for OutboundAliases
impl OutboundAliasTable for OutboundAliases
§type Error = TryReserveError
type Error = TryReserveError
Error returned when the table cannot store a mapping.
§fn decide(&self, topic: &Topic) -> AliasDecision
fn decide(&self, topic: &Topic) -> AliasDecision
Decides the alias for
topic without changing the table. Read more§fn establish(
&mut self,
topic: &Topic,
alias: NonZeroU16,
) -> Result<(), TryReserveError>
fn establish( &mut self, topic: &Topic, alias: NonZeroU16, ) -> Result<(), TryReserveError>
§fn release(&mut self, topic: &Topic, _alias: NonZeroU16)
fn release(&mut self, topic: &Topic, _alias: NonZeroU16)
Removes an alias whose establishing PUBLISH could not be written.
Auto Trait Implementations§
impl Freeze for OutboundAliases
impl RefUnwindSafe for OutboundAliases
impl Send for OutboundAliases
impl Sync for OutboundAliases
impl Unpin for OutboundAliases
impl UnsafeUnpin for OutboundAliases
impl UnwindSafe for OutboundAliases
Blanket Implementations§
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
impl<T> ErasedDestructor for Twhere
T: 'static,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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