Crate mediasan_common

Crate mediasan_common 

Source
Expand description

mediasan-common is a common library shared by the mediasan media format “sanitizers”.

Re-exports§

pub use error::Error;
pub use error::Report;
pub use error::Result;
pub use error::ResultExt;
pub use async_skip::AsyncSkipExt;

Modules§

async_skip
Utility functions for the AsyncSkip trait.
error
Error types returned by the public API.
macros
Common macros used by the mediasan crates.
parse
Unstable API for parsing media files.
sync
Adapter utilities to run carefully designed async code in a sync context.
util
Common utilities used by the mediasan crates.

Macros§

bail_attach
Return an Err containing $err as a Report with optional $attachments.
ensure_attach
Ensure $cond is true, or return an Err containing $err as a Report with optional $attachments.
ensure_matches_attach
Ensure $expr matches $pat, or return an Err containing $err as a Report with optional $attachments.
report_attach
Create a Report contaning $err with optional $attachments.

Structs§

InputSpan
A pointer to a span in the given input.
SeekSkipAdapter
An adapter implementing Skip/AsyncSkip for all types implementing [Seek]/[AsyncSeek].

Traits§

AsyncSkip
A subset of the [AsyncSeek] trait, providing a cursor which can skip forward within a stream of bytes.
Skip
A subset of the [Seek] trait, providing a cursor which can skip forward within a stream of bytes.