pub struct ProcessorOutputs<'a> {
pub output_spec: &'a [SignalSpec],
pub outputs: &'a mut [SignalBuffer],
pub mode: ProcessMode,
}
Expand description
A collection of output signals for a Processor
and their specifications.
Fields§
§output_spec: &'a [SignalSpec]
The specifications of the output signals.
outputs: &'a mut [SignalBuffer]
The output signals.
mode: ProcessMode
The mode in which the processor should process signals.
Implementations§
Source§impl<'a> ProcessorOutputs<'a>
impl<'a> ProcessorOutputs<'a>
Sourcepub fn new(
output_spec: &'a [SignalSpec],
outputs: &'a mut [SignalBuffer],
mode: ProcessMode,
) -> Self
pub fn new( output_spec: &'a [SignalSpec], outputs: &'a mut [SignalBuffer], mode: ProcessMode, ) -> Self
Creates a new collection of output signals.
Sourcepub fn output(&mut self, index: usize) -> ProcessorOutput<'_>
pub fn output(&mut self, index: usize) -> ProcessorOutput<'_>
Returns the output signal at the given index.
Sourcepub fn output_spec(&self, index: usize) -> &SignalSpec
pub fn output_spec(&self, index: usize) -> &SignalSpec
Returns the specification of the output signal at the given index.
Sourcepub fn iter_output_mut(
&mut self,
index: usize,
) -> impl Iterator<Item = AnySignalMut<'_>>
pub fn iter_output_mut( &mut self, index: usize, ) -> impl Iterator<Item = AnySignalMut<'_>>
Returns an iterator over the output signal at the given index.
Sourcepub fn iter_output_mut_as<S: Signal>(
&mut self,
index: usize,
) -> Result<impl Iterator<Item = &mut Option<S>> + '_, ProcessorError>
pub fn iter_output_mut_as<S: Signal>( &mut self, index: usize, ) -> Result<impl Iterator<Item = &mut Option<S>> + '_, ProcessorError>
Returns an iterator over the output signal at the given index, if it is of the given type.
Sourcepub fn iter_output_mut_as_floats(
&mut self,
index: usize,
) -> Result<impl Iterator<Item = &mut Option<Float>> + '_, ProcessorError>
pub fn iter_output_mut_as_floats( &mut self, index: usize, ) -> Result<impl Iterator<Item = &mut Option<Float>> + '_, ProcessorError>
Returns an iterator over the output signal at the given index, if it is a Float
signal.
Sourcepub fn iter_output_mut_as_ints(
&mut self,
index: usize,
) -> Result<impl Iterator<Item = &mut Option<i64>> + '_, ProcessorError>
pub fn iter_output_mut_as_ints( &mut self, index: usize, ) -> Result<impl Iterator<Item = &mut Option<i64>> + '_, ProcessorError>
Returns an iterator over the output signal at the given index, if it is an i64
signal.
Sourcepub fn iter_output_mut_as_bools(
&mut self,
index: usize,
) -> Result<impl Iterator<Item = &mut Option<bool>> + '_, ProcessorError>
pub fn iter_output_mut_as_bools( &mut self, index: usize, ) -> Result<impl Iterator<Item = &mut Option<bool>> + '_, ProcessorError>
Returns an iterator over the output signal at the given index, if it is a bool
signal.
Sourcepub fn iter_output_mut_as_strings(
&mut self,
index: usize,
) -> Result<impl Iterator<Item = &mut Option<String>> + '_, ProcessorError>
pub fn iter_output_mut_as_strings( &mut self, index: usize, ) -> Result<impl Iterator<Item = &mut Option<String>> + '_, ProcessorError>
Returns an iterator over the output signal at the given index, if it is a String
signal.
Sourcepub fn iter_output_mut_as_lists(
&mut self,
index: usize,
) -> Result<impl Iterator<Item = &mut Option<List>> + '_, ProcessorError>
pub fn iter_output_mut_as_lists( &mut self, index: usize, ) -> Result<impl Iterator<Item = &mut Option<List>> + '_, ProcessorError>
Returns an iterator over the output signal at the given index, if it is a list signal.
Sourcepub fn iter_output_mut_as_midi(
&mut self,
index: usize,
) -> Result<impl Iterator<Item = &mut Option<MidiMessage>> + '_, ProcessorError>
pub fn iter_output_mut_as_midi( &mut self, index: usize, ) -> Result<impl Iterator<Item = &mut Option<MidiMessage>> + '_, ProcessorError>
Returns an iterator over the output signal at the given index, if it is a MidiMessage
signal.
Sourcepub fn split_at_mut(
&mut self,
index: usize,
) -> (ProcessorOutputs<'_>, ProcessorOutputs<'_>)
pub fn split_at_mut( &mut self, index: usize, ) -> (ProcessorOutputs<'_>, ProcessorOutputs<'_>)
Splits this collection of output signals into two collections at the given index.
Sourcepub fn split_last_mut(&mut self) -> (ProcessorOutputs<'_>, ProcessorOutputs<'_>)
pub fn split_last_mut(&mut self) -> (ProcessorOutputs<'_>, ProcessorOutputs<'_>)
Splits this collection of output signals into two collections at the last index.
Auto Trait Implementations§
impl<'a> Freeze for ProcessorOutputs<'a>
impl<'a> RefUnwindSafe for ProcessorOutputs<'a>
impl<'a> Send for ProcessorOutputs<'a>
impl<'a> Sync for ProcessorOutputs<'a>
impl<'a> Unpin for ProcessorOutputs<'a>
impl<'a> !UnwindSafe for ProcessorOutputs<'a>
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
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
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>
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>
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