Skip to main content

Module error

Module error 

Source
Expand description

The capture engine’s typed error surface.

The crate depends on thiserror only — no anyhow in its public API. Conditions a caller may want to react to (present a message, pick a fallback, translate) get their own variant; every lower-level failure (EGL, FFmpeg, PipeWire, Wayland, GL readback, IO) flows through CaptureError::Backend, which keeps a human context and the underlying cause via #[source], so the error chain is preserved. Variant text is plain technical English, deliberately not localised — this is a library, so callers translate by matching the variant.

Enums§

CaptureError
An error from the capture engine.

Traits§

Context
Attach context to a fallible value, mapping its error into CaptureError::Backend while preserving the original cause. Mirrors anyhow::Context, so a call site only has to import crate::error::Context instead of anyhow::Context.

Type Aliases§

Result
The crate’s result type: Result<T, CaptureError>. Mirrors anyhow::Result so a call site keeps its Result<T> signatures and only swaps the import.