pub struct SilenceMask(pub u64);Expand description
An optional optimization hint on which channels contain all
zeros (silence). The first bit (0x1) is the first channel,
the second bit is the second channel, and so on.
Tuple Fields§
§0: u64Implementations§
Source§impl SilenceMask
impl SilenceMask
Sourcepub const NONE_SILENT: Self
pub const NONE_SILENT: Self
A mask with no channels marked as silent
Sourcepub const MONO_SILENT: Self
pub const MONO_SILENT: Self
A mask with only the first channel marked as silent
Sourcepub const STEREO_SILENT: Self
pub const STEREO_SILENT: Self
A mask with only the first two channels marked as silent
Sourcepub const fn new_all_silent(num_channels: usize) -> Self
pub const fn new_all_silent(num_channels: usize) -> Self
Construct a new SilenceMask with all channels marked as
silent.
num_channels must be less than or equal to 64.
Sourcepub const fn is_channel_silent(&self, i: usize) -> bool
pub const fn is_channel_silent(&self, i: usize) -> bool
Returns true if the channel is marked as silent, false
otherwise.
i must be less than 64.
Sourcepub const fn any_channel_silent(&self, num_channels: usize) -> bool
pub const fn any_channel_silent(&self, num_channels: usize) -> bool
Returns true if any channel is marked as silent, false
otherwise.
num_channels must be less than or equal to 64.
Sourcepub const fn all_channels_silent(&self, num_channels: usize) -> bool
pub const fn all_channels_silent(&self, num_channels: usize) -> bool
Returns true if all channels are marked as silent, false
otherwise.
num_channels must be less than or equal to 64.
Sourcepub fn set_channel(&mut self, i: usize, silent: bool)
pub fn set_channel(&mut self, i: usize, silent: bool)
Mark/un-mark the given channel as silent.
i must be less than 64.
pub const fn union(self, other: Self) -> Self
pub fn union_with(&mut self, other: Self)
Trait Implementations§
Source§impl Clone for SilenceMask
impl Clone for SilenceMask
Source§fn clone(&self) -> SilenceMask
fn clone(&self) -> SilenceMask
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SilenceMask
impl Debug for SilenceMask
Source§impl Default for SilenceMask
impl Default for SilenceMask
Source§fn default() -> SilenceMask
fn default() -> SilenceMask
Source§impl Hash for SilenceMask
impl Hash for SilenceMask
Source§impl PartialEq for SilenceMask
impl PartialEq for SilenceMask
impl Copy for SilenceMask
impl Eq for SilenceMask
impl StructuralPartialEq for SilenceMask
Auto Trait Implementations§
impl Freeze for SilenceMask
impl RefUnwindSafe for SilenceMask
impl Send for SilenceMask
impl Sync for SilenceMask
impl Unpin for SilenceMask
impl UnwindSafe for SilenceMask
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> FromWorld for Twhere
T: Default,
impl<T> FromWorld for Twhere
T: Default,
Source§fn from_world(_world: &mut World) -> T
fn from_world(_world: &mut World) -> T
Creates Self using default().