Skip to main content

from_fn

Function from_fn 

Source
pub fn from_fn<F>(f: F) -> FnDetector<F>
where F: FnMut(&FrameView<'_>) -> Result<DetectorOutput, DetectorError> + Send + 'static,
Expand description

Build a detector from a closure: from_fn(|view| Ok(DetectorOutput::Bool(true))).