pub struct MediaKindSet(/* private fields */);Expand description
A set of MediaKinds, as a port rarely deals in exactly one.
A set rather than a single kind because the two sides mean different things: a producer’s set is everything it may emit, a consumer’s is everything it can accept, and compatibility is the former being a subset of the latter. A demuxer feeding a muxer may emit either encoded kind, while a video decoder accepts only one of them — a distinction a single kind could not express.
Implementations§
Source§impl MediaKindSet
impl MediaKindSet
Sourcepub const PACKETS: Self
pub const PACKETS: Self
Both encoded kinds — what a muxer, a packet counter, or any other element that interleaves or forwards encoded media deals in.
Sourcepub const FRAMES: Self
pub const FRAMES: Self
Both decoded kinds — what an element that handles frames without caring which medium they are deals in.
Sourcepub const fn from_slice(kinds: &[MediaKind]) -> Self
pub const fn from_slice(kinds: &[MediaKind]) -> Self
A set holding every kind in kinds. Duplicates are harmless.
Sourcepub const fn is_subset_of(self, other: Self) -> bool
pub const fn is_subset_of(self, other: Self) -> bool
Returns whether every kind in this set is also in other — the
producer-into-consumer direction the link check asks about.
Trait Implementations§
Source§impl Clone for MediaKindSet
impl Clone for MediaKindSet
Source§fn clone(&self) -> MediaKindSet
fn clone(&self) -> MediaKindSet
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more