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
wallpaper_type: WallpaperType
Represents the type of the wallpaper, e.g. background.*
or tiled.*
.
extension: WallpaperExtension
Represents the extension of the wallpaper, e.g. *.png
or *.jpg
.
bytes: Vec<u8>
Holds the wallpaper's original bytes.
Methods
impl Wallpaper
[src]
impl Wallpaper
pub fn get_filename(&self) -> String
[src]
pub fn get_filename(&self) -> String
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]
impl Debug for Wallpaper
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl PartialEq for Wallpaper
[src]
impl PartialEq for Wallpaper
fn eq(&self, other: &Wallpaper) -> bool
[src]
fn eq(&self, other: &Wallpaper) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Wallpaper) -> bool
[src]
fn ne(&self, other: &Wallpaper) -> bool
This method tests for !=
.
impl Clone for Wallpaper
[src]
impl Clone for Wallpaper