pub trait FrameIntake: Send + Sync {
// Required method
fn push(&self, bytes: Vec<u8>, at: DateTime<Utc>) -> bool;
}Expand description
The push side of a frame pipeline: where Cameras::ingest hands a screen’s frames once
they passed the gate (spec 3.7 §7.13 SurfaceCameraSource).
§Example
use std::sync::Mutex;
use adk_surface::camera::FrameIntake;
#[derive(Default)]
struct Count(Mutex<usize>);
impl FrameIntake for Count {
fn push(&self, _bytes: Vec<u8>, _at: chrono::DateTime<chrono::Utc>) -> bool {
*self.0.lock().unwrap() += 1;
true
}
}Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".