Enum tdesktop_theme::WallpaperExtension [−][src]
pub enum WallpaperExtension { Png, Jpg, }
Represents possible wallpaper extensions. It is taken from the wallpaper's name.
Notes
This crate does not check the real type of the wallpaper, it is simply taken from the theme's wallpaper filename. If you want to be sure that the wallpaper is either a .jpg or a .png file, do it yourself.
Variants
Png
If the wallpaper's extension is .png
, this variant is chosen.
Jpg
If the wallpaper's extension is .jpg
, this variant is chosen.
Trait Implementations
impl Debug for WallpaperExtension
[src]
impl Debug for WallpaperExtension
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 WallpaperExtension
[src]
impl PartialEq for WallpaperExtension
fn eq(&self, other: &WallpaperExtension) -> bool
[src]
fn eq(&self, other: &WallpaperExtension) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
fn ne(&self, other: &Rhs) -> bool
1.0.0
[src]This method tests for !=
.
impl Clone for WallpaperExtension
[src]
impl Clone for WallpaperExtension
fn clone(&self) -> WallpaperExtension
[src]
fn clone(&self) -> WallpaperExtension
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Copy for WallpaperExtension
[src]
impl Copy for WallpaperExtension
impl ToString for WallpaperExtension
[src]
impl ToString for WallpaperExtension
fn to_string(&self) -> String
[src]
fn to_string(&self) -> String
Returns a string corresponding to WallpaperExtension
's value.
Possible return values
Enum variant | String value |
---|---|
Png | "png" |
Jpg | "jpg" |
Examples
use tdesktop_theme::*; let wallpaper = Wallpaper { wallpaper_type: WallpaperType::Tiled, extension: WallpaperExtension::Jpg, bytes: b"Pretend it's a wallpaper".to_vec(), }; let name = format!( "examples/trash/wallpaper.{}", wallpaper.extension.to_string(), ); // std::fs::write(name, wallpaper.bytes).unwrap();
Auto Trait Implementations
impl Send for WallpaperExtension
impl Send for WallpaperExtension
impl Sync for WallpaperExtension
impl Sync for WallpaperExtension