[−][src]Struct tdesktop_theme::Wallpaper
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.
Implementations
impl Wallpaper
[src]
pub fn get_filename(&self) -> String
[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 Clone for Wallpaper
[src]
impl Debug for Wallpaper
[src]
impl PartialEq<Wallpaper> for Wallpaper
[src]
impl StructuralPartialEq for Wallpaper
[src]
Auto Trait Implementations
impl RefUnwindSafe for Wallpaper
[src]
impl Send for Wallpaper
[src]
impl Sync for Wallpaper
[src]
impl Unpin for Wallpaper
[src]
impl UnwindSafe for Wallpaper
[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>,