pub struct Ladder { /* private fields */ }Expand description
The output ladder, in canonical order: strictly ascending maximum bitrate, and strictly ascending height with it.
Construction validates the order; Ladder::rungs exposes a read-only slice. The
rungs are still filtered against the source at runtime (nothing above it
survives), which drops rungs but never reorders them.
Implementations§
Source§impl Ladder
impl Ladder
Sourcepub fn new(rungs: impl IntoIterator<Item = Rung>) -> Result<Self, Error>
pub fn new(rungs: impl IntoIterator<Item = Rung>) -> Result<Self, Error>
Resolve rungs into a ladder, in any order.
Heights round down to even, and the result is sorted by maximum bitrate.
An ambiguous ladder is an Error rather than a guess: two rungs at the
same maximum have no lower one, and a rung that costs more without being
taller means bitrate and picture disagree about which rendition is lower.
An empty ladder is fine; it just offers nothing.
Trait Implementations§
impl Eq for Ladder
impl StructuralPartialEq for Ladder
Auto Trait Implementations§
impl Freeze for Ladder
impl RefUnwindSafe for Ladder
impl Send for Ladder
impl Sync for Ladder
impl Unpin for Ladder
impl UnsafeUnpin for Ladder
impl UnwindSafe for Ladder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more