[][src]Struct dasp_graph::NodeData

pub struct NodeData<T: ?Sized> {
    pub buffers: Vec<Buffer>,
    pub node: T,
}

For use as the node weight within a dasp graph. Contains the node and its buffers.

For a graph to be compatible with a graph Processor, its node weights must be of type NodeData<T>, where T is some type that implements the Node trait.

Fields

buffers: Vec<Buffer>

The buffers to which the node writes audio data during a call to its process method.

Generally, each buffer stored within buffers corresponds to a unique audio channel. E.g. a node processing mono data would store one buffer, a node processing stereo data would store two, and so on.

node: T

Implementations

impl<T> NodeData<T>[src]

pub fn new(node: T, buffers: Vec<Buffer>) -> Self[src]

Construct a new NodeData from an instance of its node type and buffers.

pub fn new1(node: T) -> Self[src]

Creates a new NodeData with a single buffer.

pub fn new2(node: T) -> Self[src]

Creates a new NodeData with two buffers.

impl NodeData<BoxedNode>[src]

pub fn boxed<T>(node: T, buffers: Vec<Buffer>) -> Self where
    T: 'static + Node
[src]

The same as new, but boxes the given node data before storing it.

pub fn boxed1<T>(node: T) -> Self where
    T: 'static + Node
[src]

The same as new1, but boxes the given node data before storing it.

pub fn boxed2<T>(node: T) -> Self where
    T: 'static + Node
[src]

The same as new2, but boxes the given node data before storing it.

Auto Trait Implementations

impl<T: ?Sized> RefUnwindSafe for NodeData<T> where
    T: RefUnwindSafe

impl<T: ?Sized> Send for NodeData<T> where
    T: Send

impl<T: ?Sized> Sync for NodeData<T> where
    T: Sync

impl<T: ?Sized> Unpin for NodeData<T> where
    T: Unpin

impl<T: ?Sized> UnwindSafe for NodeData<T> where
    T: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

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

impl<T> From<T> for T[src]

impl<S> FromSample<S> for S

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

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

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.