pub enum EnumBufferState<I> {
Constant(u32),
Varying(TimedEnumValues<I>),
}Expand description
Represents the state of an enum value across a buffer
Here we refer to the enum by the index of the value,
that is, the index of the value in the values array of the parameter.
Variants§
Constant(u32)
The value is constant across the buffer.
Varying(TimedEnumValues<I>)
The value changes over the course of the buffer, represented by a
TimedEnumValues.
Implementations§
Source§impl<I: IntoIterator<Item = TimedValue<u32>>> EnumBufferState<I>
impl<I: IntoIterator<Item = TimedValue<u32>>> EnumBufferState<I>
Sourcepub fn value_at_start_of_buffer(self) -> u32
pub fn value_at_start_of_buffer(self) -> u32
Get the value of the parameter at the start of the buffer,
represented by the index of the value in the values array of the parameter.
§Examples
assert_eq!(EnumBufferState::Varying(TimedEnumValues::new(
vec![TimedValue { sample_offset: 0, value: 1 },
TimedValue { sample_offset: 100, value: 2 }],
128,
0..3
).unwrap()).value_at_start_of_buffer(), 1);Trait Implementations§
Source§impl<I: Clone> Clone for EnumBufferState<I>
impl<I: Clone> Clone for EnumBufferState<I>
Source§fn clone(&self) -> EnumBufferState<I>
fn clone(&self) -> EnumBufferState<I>
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 moreAuto Trait Implementations§
impl<I> Freeze for EnumBufferState<I>where
I: Freeze,
impl<I> RefUnwindSafe for EnumBufferState<I>where
I: RefUnwindSafe,
impl<I> Send for EnumBufferState<I>where
I: Send,
impl<I> Sync for EnumBufferState<I>where
I: Sync,
impl<I> Unpin for EnumBufferState<I>where
I: Unpin,
impl<I> UnwindSafe for EnumBufferState<I>where
I: 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
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