Struct ProcessorOutputs

Source
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>

Source

pub fn new( output_spec: &'a [SignalSpec], outputs: &'a mut [SignalBuffer], mode: ProcessMode, ) -> Self

Creates a new collection of output signals.

Source

pub fn output(&mut self, index: usize) -> ProcessorOutput<'_>

Returns the output signal at the given index.

Source

pub fn output_spec(&self, index: usize) -> &SignalSpec

Returns the specification of the output signal at the given index.

Source

pub fn iter_output_mut( &mut self, index: usize, ) -> impl Iterator<Item = AnySignalMut<'_>>

Returns an iterator over the output signal at the given index.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

pub fn split_at_mut( &mut self, index: usize, ) -> (ProcessorOutputs<'_>, ProcessorOutputs<'_>)

Splits this collection of output signals into two collections at the given index.

Source

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> Downcast for T
where T: Any,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert 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>

Convert 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)

Convert &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)

Convert &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
where T: Any + Send + Sync,

Source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<S> FromSample<S> for S

Source§

fn from_sample_(s: S) -> S

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T, U> ToSample<U> for T
where U: FromSample<T>,

Source§

fn to_sample_(self) -> U

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<S, T> Duplex<S> for T
where T: FromSample<S> + ToSample<S>,