mlx_rs::transforms::compile

Trait CallMutWithState

Source
pub trait CallMutWithState<U, A, O, E> {
    // Required method
    fn call_mut(&mut self, state: &mut U, args: A) -> Result<O, Exception>;
}
Expand description

A trait for functions that can be called with state.

Required Methods§

Source

fn call_mut(&mut self, state: &mut U, args: A) -> Result<O, Exception>

Call the function with the given state and arguments.

Implementors§

Source§

impl<U, F, G> CallMutWithState<U, &Array, Array, ()> for Compiled<F, G>
where F: FnMut(&mut U, &Array) -> Array, G: FnMut(&mut U, &[Array]) -> Vec<Array>, U: Updatable,

Source§

impl<U, F, G> CallMutWithState<U, &Array, Array, Exception> for Compiled<F, G>

Source§

impl<U, F, G> CallMutWithState<U, &[Array], Vec<Array>, ()> for Compiled<F, G>
where F: FnMut(&mut U, &[Array]) -> Vec<Array>, G: FnMut(&mut U, &[Array]) -> Vec<Array>, U: Updatable,

Source§

impl<U, F, G> CallMutWithState<U, &[Array], Vec<Array>, Exception> for Compiled<F, G>

Source§

impl<U, F, G> CallMutWithState<U, (&Array, &Array), Array, ()> for Compiled<F, G>
where F: FnMut(&mut U, (&Array, &Array)) -> Array, G: FnMut(&mut U, &[Array]) -> Vec<Array>, U: Updatable,

Source§

impl<U, F, G> CallMutWithState<U, (&Array, &Array), Array, Exception> for Compiled<F, G>

Source§

impl<U, F, G> CallMutWithState<U, (&Array, &Array, &Array), Array, ()> for Compiled<F, G>
where F: FnMut(&mut U, (&Array, &Array, &Array)) -> Array, G: FnMut(&mut U, &[Array]) -> Vec<Array>, U: Updatable,

Source§

impl<U, F, G> CallMutWithState<U, (&Array, &Array, &Array), Array, Exception> for Compiled<F, G>