autd3_driver::datagram

Trait Gain

source
pub trait Gain: Debug {
    // Required method
    fn calc<'a>(
        &'a self,
        geometry: &Geometry,
    ) -> Result<GainCalcFn<'a>, AUTDInternalError>;

    // Provided methods
    fn calc_with_filter<'a>(
        &'a self,
        geometry: &Geometry,
        _filter: HashMap<usize, BitVec<u32>>,
    ) -> Result<GainCalcFn<'a>, AUTDInternalError> { ... }
    fn transform<'a, D: Into<Drive>, FT: Fn(&Transducer) -> D + Sync + Send + 'static, F: Fn(&Device) -> FT + 'a>(
        f: F,
    ) -> GainCalcFn<'a>
       where Self: Sized { ... }
}

Required Methods§

source

fn calc<'a>( &'a self, geometry: &Geometry, ) -> Result<GainCalcFn<'a>, AUTDInternalError>

Provided Methods§

source

fn calc_with_filter<'a>( &'a self, geometry: &Geometry, _filter: HashMap<usize, BitVec<u32>>, ) -> Result<GainCalcFn<'a>, AUTDInternalError>

source

fn transform<'a, D: Into<Drive>, FT: Fn(&Transducer) -> D + Sync + Send + 'static, F: Fn(&Device) -> FT + 'a>( f: F, ) -> GainCalcFn<'a>
where Self: Sized,

Implementors§

source§

impl<'a> Gain for BoxedGain<'a>