Struct rytm_rs::query::SoundQuery
source · pub struct SoundQuery { /* private fields */ }
Expand description
A query to retrieve a Sound
object from rytm.
Implementations§
source§impl SoundQuery
impl SoundQuery
sourcepub fn new(sound_index: usize) -> Result<Self, RytmError>
pub fn new(sound_index: usize) -> Result<Self, RytmError>
Creates a new sound query for a pool sound.
Accepts a sound index in the range of 0..=127
.
sourcepub fn new_with_device_id(
sound_index: usize,
device_id: u8
) -> Result<Self, RytmError>
pub fn new_with_device_id( sound_index: usize, device_id: u8 ) -> Result<Self, RytmError>
Creates a new sound query for a pool sound.
Accepts a sound index in the range of 0..=127
.
Accepts a device id in the range of 0..=255
.
sourcepub fn new_targeting_work_buffer(track_index: usize) -> Result<Self, RytmError>
pub fn new_targeting_work_buffer(track_index: usize) -> Result<Self, RytmError>
Creates a new sound query for a sound in the work buffer.
Accepts a track index in the range of 0..=11
.
Trait Implementations§
source§impl Clone for SoundQuery
impl Clone for SoundQuery
source§fn clone(&self) -> SoundQuery
fn clone(&self) -> SoundQuery
Returns a copy 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 SoundQuery
impl Debug for SoundQuery
source§impl Default for SoundQuery
impl Default for SoundQuery
source§fn default() -> SoundQuery
fn default() -> SoundQuery
Returns the “default value” for a type. Read more
source§impl Hash for SoundQuery
impl Hash for SoundQuery
source§impl ObjectQuery for SoundQuery
impl ObjectQuery for SoundQuery
source§fn sysex_type(&self) -> AnySysexType
fn sysex_type(&self) -> AnySysexType
Returns the sysex type of the object.
source§fn as_sysex_meta(&self) -> SysexMeta
fn as_sysex_meta(&self) -> SysexMeta
Returns the sysex meta data for the object creating it.
source§fn is_targeting_work_buffer(&self) -> bool
fn is_targeting_work_buffer(&self) -> bool
Returns the information if this query is targeting the work buffer.
source§impl Ord for SoundQuery
impl Ord for SoundQuery
source§fn cmp(&self, other: &SoundQuery) -> Ordering
fn cmp(&self, other: &SoundQuery) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for SoundQuery
impl PartialEq for SoundQuery
source§fn eq(&self, other: &SoundQuery) -> bool
fn eq(&self, other: &SoundQuery) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for SoundQuery
impl PartialOrd for SoundQuery
source§fn partial_cmp(&self, other: &SoundQuery) -> Option<Ordering>
fn partial_cmp(&self, other: &SoundQuery) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for SoundQuery
impl Eq for SoundQuery
impl StructuralEq for SoundQuery
impl StructuralPartialEq for SoundQuery
Auto Trait Implementations§
impl RefUnwindSafe for SoundQuery
impl Send for SoundQuery
impl Sync for SoundQuery
impl Unpin for SoundQuery
impl UnwindSafe for SoundQuery
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