[][src]Enum rtdlib::types::BackgroundType

pub enum BackgroundType {
    Fill(BackgroundTypeFill),
    Pattern(BackgroundTypePattern),
    Wallpaper(BackgroundTypeWallpaper),
    // some variants omitted
}

Describes the type of a background

Variants

A filled background

A PNG or TGV (gzipped subset of SVG with MIME type "application/x-tgwallpattern") pattern to be combined with the background fill chosen by the user

A wallpaper in JPEG format

Implementations

impl BackgroundType[src]

pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self>[src]

pub fn is_fill(&self) -> bool[src]

pub fn is_pattern(&self) -> bool[src]

pub fn is_wallpaper(&self) -> bool[src]

pub fn on_fill<F: FnOnce(&BackgroundTypeFill)>(&self, fnc: F) -> &Self[src]

pub fn on_pattern<F: FnOnce(&BackgroundTypePattern)>(&self, fnc: F) -> &Self[src]

pub fn on_wallpaper<F: FnOnce(&BackgroundTypeWallpaper)>(&self, fnc: F) -> &Self[src]

pub fn as_fill(&self) -> Option<&BackgroundTypeFill>[src]

pub fn as_pattern(&self) -> Option<&BackgroundTypePattern>[src]

pub fn as_wallpaper(&self) -> Option<&BackgroundTypeWallpaper>[src]

pub fn fill<T: AsRef<BackgroundTypeFill>>(t: T) -> Self[src]

pub fn pattern<T: AsRef<BackgroundTypePattern>>(t: T) -> Self[src]

pub fn wallpaper<T: AsRef<BackgroundTypeWallpaper>>(t: T) -> Self[src]

Trait Implementations

impl AsRef<BackgroundType> for BackgroundType[src]

impl Clone for BackgroundType[src]

impl Debug for BackgroundType[src]

impl Default for BackgroundType[src]

impl<'de> Deserialize<'de> for BackgroundType[src]

impl RObject for BackgroundType[src]

impl Serialize for BackgroundType[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.