pub struct BackgroundTypePatternBuilder {
    pub tg_type: String,
    pub document: BoxWrapper<Unbox<Document>>,
    pub fill: BoxWrapper<Unbox<BackgroundFill>>,
    pub intensity: i64,
    pub is_inverted: Option<bool>,
    pub is_moving: Option<bool>,
}Expand description
The background is a .PNG or .TGV (gzipped subset of SVG with MIME type “application/x-tgwallpattern”) pattern to be combined with the background fill chosen by the user.
Fields§
§tg_type: StringType of the background, always “pattern”
document: BoxWrapper<Unbox<Document>>Document with the pattern
fill: BoxWrapper<Unbox<BackgroundFill>>The background fill that is combined with the pattern
intensity: i64Intensity of the pattern when it is shown above the filled background; 0-100
is_inverted: Option<bool>Optional. True, if the background fill must be applied only to the pattern itself. All other pixels are black in this case. For dark themes only
is_moving: Option<bool>Optional. True, if the background moves slightly when the device is tilted
Implementations§
Source§impl BackgroundTypePatternBuilder
 
impl BackgroundTypePatternBuilder
pub fn new<A: Into<Document>, B: Into<BackgroundFill>>( document: A, fill: B, intensity: i64, ) -> Self
Sourcepub fn set_document(self, document: Document) -> Self
 
pub fn set_document(self, document: Document) -> Self
Document with the pattern
Sourcepub fn set_fill(self, fill: BackgroundFill) -> Self
 
pub fn set_fill(self, fill: BackgroundFill) -> Self
The background fill that is combined with the pattern
Sourcepub fn set_intensity(self, intensity: i64) -> Self
 
pub fn set_intensity(self, intensity: i64) -> Self
Intensity of the pattern when it is shown above the filled background; 0-100
Sourcepub fn set_is_inverted(self, is_inverted: bool) -> Self
 
pub fn set_is_inverted(self, is_inverted: bool) -> Self
Optional. True, if the background fill must be applied only to the pattern itself. All other pixels are black in this case. For dark themes only
Sourcepub fn set_is_moving(self, is_moving: bool) -> Self
 
pub fn set_is_moving(self, is_moving: bool) -> Self
Optional. True, if the background moves slightly when the device is tilted
pub fn build(self) -> BackgroundTypePattern
Trait Implementations§
Source§impl Clone for BackgroundTypePatternBuilder
 
impl Clone for BackgroundTypePatternBuilder
Source§fn clone(&self) -> BackgroundTypePatternBuilder
 
fn clone(&self) -> BackgroundTypePatternBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BackgroundTypePatternBuilder
 
impl Debug for BackgroundTypePatternBuilder
Source§impl Default for BackgroundTypePatternBuilder
 
impl Default for BackgroundTypePatternBuilder
Source§fn default() -> BackgroundTypePatternBuilder
 
fn default() -> BackgroundTypePatternBuilder
Source§impl<'de> Deserialize<'de> for BackgroundTypePatternBuilder
 
impl<'de> Deserialize<'de> for BackgroundTypePatternBuilder
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
    __D: Deserializer<'de>,
 
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
    __D: Deserializer<'de>,
Source§impl Hash for BackgroundTypePatternBuilder
 
impl Hash for BackgroundTypePatternBuilder
Source§impl Ord for BackgroundTypePatternBuilder
 
impl Ord for BackgroundTypePatternBuilder
Source§fn cmp(&self, other: &BackgroundTypePatternBuilder) -> Ordering
 
fn cmp(&self, other: &BackgroundTypePatternBuilder) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
    Self: Sized,
 
fn max(self, other: Self) -> Selfwhere
    Self: Sized,
Source§impl PartialEq for BackgroundTypePatternBuilder
 
impl PartialEq for BackgroundTypePatternBuilder
Source§fn eq(&self, other: &BackgroundTypePatternBuilder) -> bool
 
fn eq(&self, other: &BackgroundTypePatternBuilder) -> bool
self and other values to be equal, and is used by ==.Source§impl PartialOrd for BackgroundTypePatternBuilder
 
impl PartialOrd for BackgroundTypePatternBuilder
impl Eq for BackgroundTypePatternBuilder
impl StructuralPartialEq for BackgroundTypePatternBuilder
Auto Trait Implementations§
impl Freeze for BackgroundTypePatternBuilder
impl RefUnwindSafe for BackgroundTypePatternBuilder
impl Send for BackgroundTypePatternBuilder
impl Sync for BackgroundTypePatternBuilder
impl Unpin for BackgroundTypePatternBuilder
impl UnwindSafe for BackgroundTypePatternBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
 
impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
 
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
    T: Clone,
 
impl<T> CloneToUninit for Twhere
    T: Clone,
Source§impl<Q, K> Comparable<K> for Q
 
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
 
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
 
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
 
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.