pub struct RatingSource {
pub provider: RatingProvider,
pub state: Option<RatingState>,
pub image: String,
}Expand description
Whose a rating is, and how it reads: its provider, Rotten Tomatoes’ verdict where it has one, and the catalog’s own name for its image.
Fields§
§provider: RatingProvider§state: Option<RatingState>Rotten Tomatoes’ verdict: fresh or rotten for critics, upright or
spilled for the audience. None for a provider with none.
image: StringThe catalog’s name for its image, as it gave it
(rottentomatoes://image.rating.ripe): for an app to tell a
provider or verdict this build does not know.
Implementations§
Source§impl RatingSource
impl RatingSource
Sourcepub fn from_image(image: &str) -> Option<Self>
pub fn from_image(image: &str) -> Option<Self>
The source an image name says (Plex’s ratingImage or
audienceRatingImage): None for an empty one. A provider or
verdict this build does not know is Unknown, and image keeps
the name as it was.
Sourcepub fn scale(&self) -> RatingScale
pub fn scale(&self) -> RatingScale
How its ratings read.
Trait Implementations§
Source§impl Clone for RatingSource
impl Clone for RatingSource
Source§impl Debug for RatingSource
impl Debug for RatingSource
Source§impl<'de> Deserialize<'de> for RatingSource
impl<'de> Deserialize<'de> for RatingSource
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 RatingSource
Source§impl Hash for RatingSource
impl Hash for RatingSource
Source§impl PartialEq for RatingSource
impl PartialEq for RatingSource
Source§impl Serialize for RatingSource
impl Serialize for RatingSource
impl StructuralPartialEq for RatingSource
Auto Trait Implementations§
impl Forget for RatingSource
impl Freeze for RatingSource
impl Move for RatingSource
impl RefUnwindSafe for RatingSource
impl Send for RatingSource
impl Sync for RatingSource
impl Unpin for RatingSource
impl UnsafeUnpin for RatingSource
impl UnwindSafe for RatingSource
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