pub enum NormalizedBeat {
Playable {
pitches: Vec<String>,
},
Rest,
MeasureBreak,
}Expand description
One beat in the normalized input echoed back from ArrangementSet::normalized_input.
Serialized as a discriminated union tagged by kind, so JS code can switch (b.kind)
instead of comparing strings.
Variants§
Trait Implementations§
Source§impl Clone for NormalizedBeat
impl Clone for NormalizedBeat
Source§fn clone(&self) -> NormalizedBeat
fn clone(&self) -> NormalizedBeat
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 NormalizedBeat
impl Debug for NormalizedBeat
impl Eq for NormalizedBeat
Source§impl From<NormalizedBeat> for JsValuewhere
NormalizedBeat: Serialize,
impl From<NormalizedBeat> for JsValuewhere
NormalizedBeat: Serialize,
Source§fn from(value: NormalizedBeat) -> Self
fn from(value: NormalizedBeat) -> Self
Converts to this type from the input type.
Source§impl IntoWasmAbi for NormalizedBeatwhere
NormalizedBeat: Serialize,
impl IntoWasmAbi for NormalizedBeatwhere
NormalizedBeat: Serialize,
Source§impl OptionIntoWasmAbi for NormalizedBeatwhere
NormalizedBeat: Serialize,
impl OptionIntoWasmAbi for NormalizedBeatwhere
NormalizedBeat: Serialize,
Source§impl PartialEq for NormalizedBeat
impl PartialEq for NormalizedBeat
Source§fn eq(&self, other: &NormalizedBeat) -> bool
fn eq(&self, other: &NormalizedBeat) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for NormalizedBeat
impl Serialize for NormalizedBeat
impl StructuralPartialEq for NormalizedBeat
Source§impl Tsify for NormalizedBeat
impl Tsify for NormalizedBeat
const DECL: &'static str = "/**\n * One beat in the normalized input echoed back from `ArrangementSet::normalized_input`.\n *\n * Serialized as a discriminated union tagged by `kind`, so JS code can `switch (b.kind)`\n * instead of comparing strings.\n */\nexport type NormalizedBeat = { kind: \"playable\"; pitches: string[] } | { kind: \"rest\" } | { kind: \"measureBreak\" };"
const SERIALIZATION_CONFIG: SerializationConfig
type JsType = JsType
fn into_js(&self) -> Result<Self::JsType, Error>where
Self: Serialize,
Source§impl VectorIntoWasmAbi for NormalizedBeatwhere
NormalizedBeat: Serialize,
impl VectorIntoWasmAbi for NormalizedBeatwhere
NormalizedBeat: Serialize,
type Abi = <JsType as VectorIntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[Self]>) -> Self::Abi
Source§impl WasmDescribeVector for NormalizedBeat
impl WasmDescribeVector for NormalizedBeat
Auto Trait Implementations§
impl Freeze for NormalizedBeat
impl RefUnwindSafe for NormalizedBeat
impl Send for NormalizedBeat
impl Sync for NormalizedBeat
impl Unpin for NormalizedBeat
impl UnsafeUnpin for NormalizedBeat
impl UnwindSafe for NormalizedBeat
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<S, T> CastApprox<T> for Swhere
T: ConvApprox<S>,
impl<S, T> CastApprox<T> for Swhere
T: ConvApprox<S>,
Source§fn try_cast_approx(self) -> Result<T, Error>
fn try_cast_approx(self) -> Result<T, Error>
Source§fn cast_approx(self) -> T
fn cast_approx(self) -> T
Source§impl<S, T> CastFloat<T> for Swhere
T: ConvFloat<S>,
impl<S, T> CastFloat<T> for Swhere
T: ConvFloat<S>,
Source§fn cast_trunc(self) -> T
fn cast_trunc(self) -> T
Cast to integer, truncating Read more
Source§fn cast_nearest(self) -> T
fn cast_nearest(self) -> T
Cast to the nearest integer Read more
Source§fn cast_floor(self) -> T
fn cast_floor(self) -> T
Cast the floor to an integer Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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> 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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as
IntoWasmAbi::AbiSource§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi, except that it may throw and never
return in the case of Err.