[−][src]Enum tdesktop_theme::WallpaperExtension
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
If the wallpaper's extension is .png
, this variant is chosen.
If the wallpaper's extension is .jpg
, this variant is chosen.
Trait Implementations
impl Clone for WallpaperExtension
[src]
pub fn clone(&self) -> WallpaperExtension
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for WallpaperExtension
[src]
impl Debug for WallpaperExtension
[src]
impl PartialEq<WallpaperExtension> for WallpaperExtension
[src]
pub fn eq(&self, other: &WallpaperExtension) -> bool
[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl StructuralPartialEq for WallpaperExtension
[src]
impl ToString for WallpaperExtension
[src]
pub fn to_string(&self) -> String
[src]
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 RefUnwindSafe for WallpaperExtension
[src]
impl Send for WallpaperExtension
[src]
impl Sync for WallpaperExtension
[src]
impl Unpin for WallpaperExtension
[src]
impl UnwindSafe for WallpaperExtension
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,