pub struct QualityOption {
pub quality: StreamingQuality,
pub label: String,
pub detail: String,
pub exceeds_source: bool,
pub source_bitrate: Option<u64>,
}Expand description
One rung of the quality picker, as it applies to this media source.
The picker used to be filled from the fixed StreamingQuality::ALL ladder,
which meant offering “20 Mbps” for a 1.1 Mbps podcast — eight rungs, six of
them indistinguishable from Original. exceeds_source is what lets the
frontend render that honestly without knowing anything about bitrates.
TRACES: UR-070, UR-079 | DR-227, DR-121
Fields§
§quality: StreamingQuality§label: StringHuman label (“8 Mbps”). Lives in Rust beside the number it describes.
detail: StringSecondary line (“1080p”).
exceeds_source: boolTrue when this rung’s ceiling is at or above what the source itself
carries, so selecting it yields the same stream as Original.
The frontend renders these differently (or hides them); it does not decide which they are.
source_bitrate: Option<u64>The source’s own bitrate, when the server reported one. Presentation only — the picker shows “Original (6.7 Mbps)” rather than a bare word.
Trait Implementations§
Source§impl Clone for QualityOption
impl Clone for QualityOption
Source§fn clone(&self) -> QualityOption
fn clone(&self) -> QualityOption
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for QualityOption
impl Debug for QualityOption
Source§impl<'de> Deserialize<'de> for QualityOption
impl<'de> Deserialize<'de> for QualityOption
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>,
Source§impl NamedType for QualityOption
impl NamedType for QualityOption
fn sid() -> SpectaID
Source§fn named_data_type(
type_map: &mut TypeCollection,
generics: &[DataType],
) -> NamedDataType
fn named_data_type( type_map: &mut TypeCollection, generics: &[DataType], ) -> NamedDataType
Source§fn definition_named_data_type(type_map: &mut TypeCollection) -> NamedDataType
fn definition_named_data_type(type_map: &mut TypeCollection) -> NamedDataType
Source§impl PartialEq for QualityOption
impl PartialEq for QualityOption
Source§fn eq(&self, other: &QualityOption) -> bool
fn eq(&self, other: &QualityOption) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for QualityOption
impl Serialize for QualityOption
Source§impl Type for QualityOption
impl Type for QualityOption
Source§fn inline(type_map: &mut TypeCollection, generics: Generics<'_>) -> DataType
fn inline(type_map: &mut TypeCollection, generics: Generics<'_>) -> DataType
Source§fn reference(type_map: &mut TypeCollection, generics: &[DataType]) -> Reference
fn reference(type_map: &mut TypeCollection, generics: &[DataType]) -> Reference
definition will be put into the type map.impl Eq for QualityOption
impl Flatten for QualityOption
impl StructuralPartialEq for QualityOption
Auto Trait Implementations§
impl Freeze for QualityOption
impl RefUnwindSafe for QualityOption
impl Send for QualityOption
impl Sync for QualityOption
impl Unpin for QualityOption
impl UnsafeUnpin for QualityOption
impl UnwindSafe for QualityOption
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<'de, D, R> CommandArg<'de, R> for Dwhere
D: Deserialize<'de>,
R: Runtime,
impl<'de, D, R> CommandArg<'de, R> for Dwhere
D: Deserialize<'de>,
R: Runtime,
§fn from_command(command: CommandItem<'de, R>) -> Result<D, InvokeError>
fn from_command(command: CommandItem<'de, R>) -> Result<D, InvokeError>
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> FunctionArg for Twhere
T: Type,
impl<T> FunctionArg for Twhere
T: Type,
§fn to_datatype(type_map: &mut TypeCollection) -> Option<DataType>
fn to_datatype(type_map: &mut TypeCollection) -> Option<DataType>
DataType]. Read more