Skip to main content

ChainDevice

Struct ChainDevice 

Source
pub struct ChainDevice {
Show 13 fields pub id: PlayerDeviceId, pub player: Symbol, pub mode: PlayerMode, pub order: u32, pub bypass: bool, pub mute: bool, pub solo: bool, pub enabled: bool, pub params: ParamSnapshot, pub generated: Vec<PlayEvent>, pub filter_lanes: Vec<LaneId>, pub route_lane: Option<LaneId>, pub placement: ChainPlacement,
}
Expand description

A single processing stage in a player chain.

Fields§

§id: PlayerDeviceId

Identifier of this device.

§player: Symbol

Symbol of the player backing this device.

§mode: PlayerMode

Mode controlling how the device combines with its input.

§order: u32

Sort order of the device within the chain.

§bypass: bool

Whether the device passes input through untouched.

§mute: bool

Whether the device is muted (excluded from rendering).

§solo: bool

Whether the device is soloed.

§enabled: bool

Whether the device is enabled.

§params: ParamSnapshot

Parameter snapshot for the device.

§generated: Vec<PlayEvent>

Events the device contributes to the chain.

§filter_lanes: Vec<LaneId>

Lane ids the device filters out, kept sorted for binary search.

§route_lane: Option<LaneId>

Optional lane the device reroutes events onto.

§placement: ChainPlacement

Placement of the device on a site.

Implementations§

Source§

impl ChainDevice

Source

pub fn new( id: impl Into<String>, player: Symbol, mode: PlayerMode, order: u32, ) -> Self

Creates an enabled device with default flags and local placement.

Source

pub fn with_generated(self, generated: Vec<PlayEvent>) -> Self

Sets the device’s generated events.

Source

pub fn with_filter_lanes(self, lanes: Vec<LaneId>) -> Self

Sets the filter lanes, keeping them sorted for lookup.

Source

pub fn with_route_lane(self, lane: LaneId) -> Self

Sets the lane that events are rerouted onto.

Source

pub fn with_placement(self, placement: ChainPlacement) -> Self

Sets the device’s placement.

Source

pub fn bypassed(self) -> Self

Marks the device as bypassed.

Trait Implementations§

Source§

impl Clone for ChainDevice

Source§

fn clone(&self) -> ChainDevice

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ChainDevice

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for ChainDevice

Source§

impl PartialEq for ChainDevice

Source§

fn eq(&self, other: &ChainDevice) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for ChainDevice

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.