pub trait CaptureKind: CaptureStrategy + Sized {
type Ref<'rx>;
type Owned;
// Required method
fn ref_to_owned(frame: &Self::Ref<'_>) -> Result<Self::Owned>;
}Expand description
A sealed receiver capture kind with its borrowed and owned frame types.
Implemented for VideoKind, AudioKind, and MetadataKind. Raw SDK
routing and freeing are private implementation details. Generic callers can
use crate::Capture with this trait and convert K::Ref<'_> into
K::Owned through Self::ref_to_owned.
Receiver frame references implement Send + Sync and can move to scoped
worker threads while borrowing their receiver. FrameSync references use
separate private strategies and remain thread-affine.
Required Associated Types§
Required Methods§
Sourcefn ref_to_owned(frame: &Self::Ref<'_>) -> Result<Self::Owned>
fn ref_to_owned(frame: &Self::Ref<'_>) -> Result<Self::Owned>
Copy a borrowed view into an owned frame.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".