pub(crate) struct BroadcastChannels {
routers: FxHashMap<BroadcastChannelRouterId, IpcSender<BroadcastChannelMsg>>,
channels: HashMap<ImmutableOrigin, HashMap<String, Vec<BroadcastChannelRouterId>>>,
}Fields§
§routers: FxHashMap<BroadcastChannelRouterId, IpcSender<BroadcastChannelMsg>>A map of broadcast routers to their IPC sender.
channels: HashMap<ImmutableOrigin, HashMap<String, Vec<BroadcastChannelRouterId>>>A map of origin to a map of channel name to a list of relevant routers.
Implementations§
Source§impl BroadcastChannels
impl BroadcastChannels
Sourcepub fn new_broadcast_channel_router(
&mut self,
router_id: BroadcastChannelRouterId,
broadcast_ipc_sender: IpcSender<BroadcastChannelMsg>,
)
pub fn new_broadcast_channel_router( &mut self, router_id: BroadcastChannelRouterId, broadcast_ipc_sender: IpcSender<BroadcastChannelMsg>, )
Add a new broadcast router.
Sourcepub fn remove_broadcast_channel_router(
&mut self,
router_id: BroadcastChannelRouterId,
)
pub fn remove_broadcast_channel_router( &mut self, router_id: BroadcastChannelRouterId, )
Remove a broadcast router.
Sourcepub fn new_broadcast_channel_name_in_router(
&mut self,
router_id: BroadcastChannelRouterId,
channel_name: String,
origin: ImmutableOrigin,
)
pub fn new_broadcast_channel_name_in_router( &mut self, router_id: BroadcastChannelRouterId, channel_name: String, origin: ImmutableOrigin, )
Note a new channel-name relevant to a given broadcast router.
Sourcepub fn remove_broadcast_channel_name_in_router(
&mut self,
router_id: BroadcastChannelRouterId,
channel_name: String,
origin: ImmutableOrigin,
)
pub fn remove_broadcast_channel_name_in_router( &mut self, router_id: BroadcastChannelRouterId, channel_name: String, origin: ImmutableOrigin, )
Remove a channel-name for a given broadcast router.
Sourcepub fn schedule_broadcast(
&self,
router_id: BroadcastChannelRouterId,
message: BroadcastChannelMsg,
)
pub fn schedule_broadcast( &self, router_id: BroadcastChannelRouterId, message: BroadcastChannelMsg, )
Broadcast a message via routers in various event-loops.
Trait Implementations§
Source§impl Default for BroadcastChannels
impl Default for BroadcastChannels
Source§fn default() -> BroadcastChannels
fn default() -> BroadcastChannels
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for BroadcastChannels
impl !RefUnwindSafe for BroadcastChannels
impl Send for BroadcastChannels
impl !Sync for BroadcastChannels
impl Unpin for BroadcastChannels
impl UnwindSafe for BroadcastChannels
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
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 moreSource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
Source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Convert
Source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
Source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert