Struct tdesktop_theme::Wallpaper[][src]

pub struct Wallpaper {
    pub wallpaper_type: WallpaperType,
    pub extension: WallpaperExtension,
    pub bytes: Vec<u8>,
}

Represents a theme's wallpaper.

Fields

Represents the type of the wallpaper, e.g. background.* or tiled.*.

Represents the extension of the wallpaper, e.g. *.png or *.jpg.

Holds the wallpaper's original bytes.

Methods

impl Wallpaper
[src]

Generates the name of the wallpaper when the theme is zipped.

Possible return values

wallpaper.wallpaper_type wallpaper.extension Return value
Tiled Png "tiled.png"
Tiled Jpg "tiled.jpg"
Background Png "background.png"
Background Jpg "background.jpg"

Examples

use tdesktop_theme::*;

let wallpaper = Wallpaper {
  wallpaper_type: WallpaperType::Background,
  extension: WallpaperExtension::Jpg,
  bytes: Vec::new(),
};

assert_eq!(wallpaper.get_filename(), "background.jpg");

Trait Implementations

impl Debug for Wallpaper
[src]

Formats the value using the given formatter. Read more

impl PartialEq for Wallpaper
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Clone for Wallpaper
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl Send for Wallpaper

impl Sync for Wallpaper