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ยง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ยง
ยงimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
ยงfn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
ยงimpl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
ยงunsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
๐ฌThis is a nightly-only experimental API. (
clone_to_uninit)Sourceยงimpl<T> InitializeFromFunction<T> for T
impl<T> InitializeFromFunction<T> for T
Sourceยงfn initialize_from_function(f: fn() -> T) -> T
fn initialize_from_function(f: fn() -> T) -> T
Create an instance of this type from an initialization function
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<Ret> SpawnIfAsync<(), Ret> for Ret
impl<Ret> SpawnIfAsync<(), Ret> for Ret
Sourceยงimpl<T, O> SuperFrom<T> for Owhere
O: From<T>,
impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
Sourceยงfn super_from(input: T) -> O
fn super_from(input: T) -> O
Convert from a type to another type.
Sourceยงimpl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
Sourceยงfn super_into(self) -> O
fn super_into(self) -> O
Convert from a type to another type.