pub struct NoteID { /* private fields */ }Expand description
Represents an identifier for a note
This is an opaque identifier that can be used to refer to a specific note that is playing.
Implementations§
Source§impl NoteID
impl NoteID
Sourcepub const fn from_id(id: i32) -> Self
pub const fn from_id(id: i32) -> Self
Create a new NoteID from a numeric ID.
Note that the NoteIDs will be considered equal if they come from
the same numeric ID, and different if they come from different numeric IDs.
§Examples
use conformal_component::events::NoteID;
assert_eq!(NoteID::from_id(42), NoteID::from_id(42));
assert_ne!(NoteID::from_id(42), NoteID::from_id(43));Trait Implementations§
impl Copy for NoteID
impl Eq for NoteID
impl StructuralPartialEq for NoteID
Auto Trait Implementations§
impl Freeze for NoteID
impl RefUnwindSafe for NoteID
impl Send for NoteID
impl Sync for NoteID
impl Unpin for NoteID
impl UnwindSafe for NoteID
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more