pub struct Rhythm<T: Note> {
pub notes: Vec<T>,
/* private fields */
}Fields§
§notes: Vec<T>Implementations§
Source§impl<T: Note> Rhythm<T>
impl<T: Note> Rhythm<T>
pub fn new(notes: Vec<T>) -> Self
pub fn current_time(&self) -> f64
pub fn forward(&mut self, time: impl Into<f64>) -> Vec<T>
pub fn set_time(&mut self, time: impl Into<f64>)
pub fn finished(&self) -> bool
pub fn hit(&mut self, variant: impl Into<u16>) -> Option<(&T, f64)>
Trait Implementations§
Source§impl<'de, T> Deserialize<'de> for Rhythm<T>
impl<'de, T> Deserialize<'de> for Rhythm<T>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl<T: Note> StructuralPartialEq for Rhythm<T>
Auto Trait Implementations§
impl<T> Freeze for Rhythm<T>
impl<T> RefUnwindSafe for Rhythm<T>where
T: RefUnwindSafe,
impl<T> Send for Rhythm<T>where
T: Send,
impl<T> Sync for Rhythm<T>where
T: Sync,
impl<T> Unpin for Rhythm<T>where
T: Unpin,
impl<T> UnsafeUnpin for Rhythm<T>
impl<T> UnwindSafe for Rhythm<T>where
T: 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