pub trait GraphicsCaptureApiHandler: Sized {
type Flags;
type Error: Send + Sync;
// Required methods
fn new(ctx: Context<Self::Flags>) -> Result<Self, Self::Error>;
fn on_frame_arrived(
&mut self,
frame: &mut Frame<'_>,
capture_control: InternalCaptureControl,
) -> Result<(), Self::Error>;
// Provided methods
fn start<T: TryInto<GraphicsCaptureItem>>(
settings: Settings<Self::Flags, T>,
) -> Result<(), GraphicsCaptureApiError<Self::Error>>
where Self: Send + 'static,
<Self as GraphicsCaptureApiHandler>::Flags: Send { ... }
fn start_free_threaded<T: TryInto<GraphicsCaptureItem> + Send + 'static>(
settings: Settings<Self::Flags, T>,
) -> Result<CaptureControl<Self, Self::Error>, GraphicsCaptureApiError<Self::Error>>
where Self: Send + 'static,
<Self as GraphicsCaptureApiHandler>::Flags: Send { ... }
fn on_closed(&mut self) -> Result<(), Self::Error> { ... }
}Expand description
A trait representing a graphics capture handler.
Required Associated Types§
Required Methods§
Sourcefn on_frame_arrived(
&mut self,
frame: &mut Frame<'_>,
capture_control: InternalCaptureControl,
) -> Result<(), Self::Error>
fn on_frame_arrived( &mut self, frame: &mut Frame<'_>, capture_control: InternalCaptureControl, ) -> Result<(), Self::Error>
Provided Methods§
Sourcefn start<T: TryInto<GraphicsCaptureItem>>(
settings: Settings<Self::Flags, T>,
) -> Result<(), GraphicsCaptureApiError<Self::Error>>
fn start<T: TryInto<GraphicsCaptureItem>>( settings: Settings<Self::Flags, T>, ) -> Result<(), GraphicsCaptureApiError<Self::Error>>
Sourcefn start_free_threaded<T: TryInto<GraphicsCaptureItem> + Send + 'static>(
settings: Settings<Self::Flags, T>,
) -> Result<CaptureControl<Self, Self::Error>, GraphicsCaptureApiError<Self::Error>>
fn start_free_threaded<T: TryInto<GraphicsCaptureItem> + Send + 'static>( settings: Settings<Self::Flags, T>, ) -> Result<CaptureControl<Self, Self::Error>, GraphicsCaptureApiError<Self::Error>>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.