[][src]Struct dasp_graph::BoxedNodeSend

pub struct BoxedNodeSend(pub Box<dyn Node + Send>);

A wrapper around a Box<dyn Node>.

Provides the necessary Sized implementation to allow for compatibility with the graph process function.

Useful when the ability to send nodes from one thread to another is required. E.g. this is common when initialising nodes or the audio graph itself on one thread before sending them to the audio thread.

Implementations

impl BoxedNodeSend[src]

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

Create a new BoxedNode around the given node.

This is short-hand for BoxedNode::from(Box::new(node)).

Methods from Deref<Target = Box<dyn Node + Send>>

Trait Implementations

impl Debug for BoxedNodeSend[src]

impl Deref for BoxedNodeSend[src]

type Target = Box<dyn Node + Send>

The resulting type after dereferencing.

impl DerefMut for BoxedNodeSend[src]

impl<T> From<Box<T>> for BoxedNodeSend where
    T: 'static + Node + Send
[src]

impl Into<Box<dyn Node + 'static + Send>> for BoxedNodeSend[src]

impl Node for BoxedNodeSend[src]

Auto Trait Implementations

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.