pub struct Rung {
pub width: u32,
pub height: u32,
pub label: String,
pub quality: Quality,
}Expand description
One rendition of the output ladder.
Fields§
§width: u32Target width in pixels (even).
height: u32Target height in pixels (even).
label: StringHuman label, e.g. "720p" (short side). Auto-derived by Rung::new.
quality: QualityPer-rung encoder quality.
Implementations§
Source§impl Rung
impl Rung
Sourcepub fn new(width: u32, height: u32) -> Self
pub fn new(width: u32, height: u32) -> Self
A rung at width × height with default quality and an auto label
("<short-side>p").
Sourcepub fn with_quality(self, quality: Quality) -> Self
pub fn with_quality(self, quality: Quality) -> Self
Override the per-rung quality.
Sourcepub fn with_label(self, label: impl Into<String>) -> Self
pub fn with_label(self, label: impl Into<String>) -> Self
Override the label.
Sourcepub fn short_side(&self) -> u32
pub fn short_side(&self) -> u32
Short side (the “p” number).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Rung
impl RefUnwindSafe for Rung
impl Send for Rung
impl Sync for Rung
impl Unpin for Rung
impl UnsafeUnpin for Rung
impl UnwindSafe for Rung
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