pub enum ChannelSelection<Channel> {
Current,
Select(Channel),
Silence,
}Variants§
Current
Notify the channel associated with the used Radio.
Select(Channel)
Notify a given Channel.
Silence
No subscriber will be notified.
Implementations§
Source§impl<Channel> ChannelSelection<Channel>
impl<Channel> ChannelSelection<Channel>
Sourcepub fn current(&mut self)
pub fn current(&mut self)
Change to ChannelSelection::Current
Sourcepub fn select(&mut self, channel: Channel)
pub fn select(&mut self, channel: Channel)
Change to ChannelSelection::Select
Sourcepub fn silence(&mut self)
pub fn silence(&mut self)
Change to ChannelSelection::Silence
Sourcepub fn is_current(&self) -> bool
pub fn is_current(&self) -> bool
Check if it is of type ChannelSelection::Current
Sourcepub fn is_select(&self) -> Option<&Channel>
pub fn is_select(&self) -> Option<&Channel>
Check if it is of type ChannelSelection::Select and return the channel.
Sourcepub fn is_silence(&self) -> bool
pub fn is_silence(&self) -> bool
Check if it is of type ChannelSelection::Silence
Trait Implementations§
Source§impl<Channel: Clone> Clone for ChannelSelection<Channel>
impl<Channel: Clone> Clone for ChannelSelection<Channel>
Source§fn clone(&self) -> ChannelSelection<Channel>
fn clone(&self) -> ChannelSelection<Channel>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<Channel> Copy for ChannelSelection<Channel>where
Channel: Copy,
Auto Trait Implementations§
impl<Channel> Freeze for ChannelSelection<Channel>where
Channel: Freeze,
impl<Channel> RefUnwindSafe for ChannelSelection<Channel>where
Channel: RefUnwindSafe,
impl<Channel> Send for ChannelSelection<Channel>where
Channel: Send,
impl<Channel> Sync for ChannelSelection<Channel>where
Channel: Sync,
impl<Channel> Unpin for ChannelSelection<Channel>where
Channel: Unpin,
impl<Channel> UnwindSafe for ChannelSelection<Channel>where
Channel: UnwindSafe,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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