pub enum Resolution {
Uhd,
FullHd,
Hd,
Sd,
Unknown,
}Expand description
An item’s picture size class, by its first version’s video height.
Variants§
Uhd
2160 lines or more.
FullHd
1080 lines.
Hd
720 lines.
Sd
Fewer.
Unknown
A class this build does not know: InvalidInput.
Implementations§
Source§impl Resolution
impl Resolution
Sourcepub fn of(width: Option<u32>, height: Option<u32>) -> Option<Resolution>
pub fn of(width: Option<u32>, height: Option<u32>) -> Option<Resolution>
The class of a picture height lines tall. A 1080p film cropped to
2.39:1 is 1920×800, so the classes go by the width when it says
more: what Plex’s own classes do.
Sourcepub fn of_plex(name: &str) -> Option<Resolution>
pub fn of_plex(name: &str) -> Option<Resolution>
The class Plex names videoResolution: 4k, 1080, 720, 576,
480, sd.
Sourcepub fn parse(name: &str) -> Option<Resolution>
pub fn parse(name: &str) -> Option<Resolution>
The class named name on the wire; None for one this build
does not know.
Source§impl Resolution
impl Resolution
Sourcepub const ALL: &'static [Resolution]
pub const ALL: &'static [Resolution]
Every value an app offers, in the order a client lists
them: all but Unknown.
Sourcepub fn from_wire_name(name: &str) -> Option<Self>
pub fn from_wire_name(name: &str) -> Option<Self>
The value named name on the wire; None for a name
this build doesn’t know.
Trait Implementations§
Source§impl Clone for Resolution
impl Clone for Resolution
impl Copy for Resolution
Source§impl Debug for Resolution
impl Debug for Resolution
Source§impl<'de> Deserialize<'de> for Resolution
impl<'de> Deserialize<'de> for Resolution
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Resolution
Source§impl Hash for Resolution
impl Hash for Resolution
Source§impl Ord for Resolution
impl Ord for Resolution
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for Resolution
impl PartialEq for Resolution
Source§impl PartialOrd for Resolution
impl PartialOrd for Resolution
Source§impl Serialize for Resolution
impl Serialize for Resolution
impl StructuralPartialEq for Resolution
Auto Trait Implementations§
impl Freeze for Resolution
impl RefUnwindSafe for Resolution
impl Send for Resolution
impl Sync for Resolution
impl Unpin for Resolution
impl UnsafeUnpin for Resolution
impl UnwindSafe for Resolution
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