pub struct ConnectedMask(pub u64);Expand description
An optional hint on which channels are connected to other
nodes in the graph. A bit set to 1 means that channel
is connected to another node, and a bit set to 0 means
that channel is not connected to any node.
The first bit (0x1) is the first channel, the second bit
is the second channel, and so on.
Tuple Fields§
§0: u64Implementations§
Source§impl ConnectedMask
impl ConnectedMask
pub const MONO_CONNECTED: Self
pub const STEREO_CONNECTED: Self
Sourcepub const fn is_channel_connected(&self, i: usize) -> bool
pub const fn is_channel_connected(&self, i: usize) -> bool
Returns true if the channel is connected to another node,
false otherwise.
i must be less than 64.
Sourcepub const fn all_channels_connected(&self, num_channels: usize) -> bool
pub const fn all_channels_connected(&self, num_channels: usize) -> bool
Returns true if all channels are marked as connected, false
otherwise.
num_channels must be less than or equal to 64.
Sourcepub fn set_channel(&mut self, i: usize, connected: bool)
pub fn set_channel(&mut self, i: usize, connected: bool)
Mark/un-mark the given channel as connected.
i must be less than 64.
Trait Implementations§
Source§impl Clone for ConnectedMask
impl Clone for ConnectedMask
Source§fn clone(&self) -> ConnectedMask
fn clone(&self) -> ConnectedMask
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 moreSource§impl Debug for ConnectedMask
impl Debug for ConnectedMask
Source§impl Default for ConnectedMask
impl Default for ConnectedMask
Source§fn default() -> ConnectedMask
fn default() -> ConnectedMask
Returns the “default value” for a type. Read more
Source§impl Hash for ConnectedMask
impl Hash for ConnectedMask
Source§impl PartialEq for ConnectedMask
impl PartialEq for ConnectedMask
impl Copy for ConnectedMask
impl Eq for ConnectedMask
impl StructuralPartialEq for ConnectedMask
Auto Trait Implementations§
impl Freeze for ConnectedMask
impl RefUnwindSafe for ConnectedMask
impl Send for ConnectedMask
impl Sync for ConnectedMask
impl Unpin for ConnectedMask
impl UnwindSafe for ConnectedMask
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,
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>
Converts
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>
Converts
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)
Converts
&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)
Converts
&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
Compare self to
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().