pub trait StaticSource {
// Required method
async fn next(&mut self) -> Result<Option<Frame>, G2gError>;
}Expand description
A heap-free source: yields frames until the stream ends (Ok(None) at EOS).
The #[allow(async_fn_in_trait)] is intentional: this model targets a single
executor (an Embassy task on an MCU, block_on on a host), so the auto-trait
(Send) leakage the lint warns about is a non-issue, and avoiding it (a boxed
or -> impl Future + Send return) would reintroduce the allocation this model
exists to remove.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl<S: StaticSource> StaticSource for &mut S
impl<S: StaticSource> StaticSource for &mut S
Implementors§
impl<I: FnMut(), const N: usize, const BYTES: usize> StaticSource for SpscCaptureSrc<'_, I, N, BYTES>
Available on non-
loom only.