[][src]Struct emu_core::device::ParamsBuilder

pub struct ParamsBuilder { /* fields omitted */ }

Helps with building a DeviceFnMutParams

ParamsBuilder helps you build a DeviceFnMutParams by specifying whether or not each parameter is mutable.

let data: DeviceBox<[f32]> = vec![0.0; 4096].as_device_boxed_mut()?;
let tau = DeviceBox::new(6.2832)?;
let args = ParamsBuilder::new()
    .param::<[f32]>(Mutability::Mut)
    .param::<f32>(Mutability::Const)
    .build();

Methods

impl ParamsBuilder[src]

pub fn new() -> Self[src]

Starts the building process with no parameters

pub fn param<T: ?Sized>(self, mutability: Mutability) -> Self[src]

Adds on a parameter with given mutability

pub fn build(self) -> DeviceFnMutParams[src]

Builds a DeviceFnMutParams

Trait Implementations

impl Clone for ParamsBuilder[src]

impl Hash for ParamsBuilder[src]

Auto Trait Implementations

impl RefUnwindSafe for ParamsBuilder

impl Send for ParamsBuilder

impl Sync for ParamsBuilder

impl Unpin for ParamsBuilder

impl UnwindSafe for ParamsBuilder

Blanket Implementations

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

impl<T, U> AsDeviceBoxed<T> for U where
    T: AsBytes + ?Sized,
    U: Borrow<T>, 
[src]

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

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

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

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.