[−][src]Struct emu_core::device::ParamsBuilder
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]
fn clone(&self) -> ParamsBuilder
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[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]
T: 'static + ?Sized,
impl<T, U> AsDeviceBoxed<T> for U where
T: AsBytes + ?Sized,
U: Borrow<T>,
[src]
T: AsBytes + ?Sized,
U: Borrow<T>,
fn as_device_boxed(&Self) -> Result<DeviceBox<T>, NoDeviceError>
[src]
fn as_device_boxed_mut(&Self) -> Result<DeviceBox<T>, NoDeviceError>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,