pub enum RainDensity {
Absolute {
num_drops: usize,
},
Relative {
sparseness: usize,
},
Dense,
Normal,
Sparse,
}Expand description
A configuration for the density of the rain effect.
Variants§
Absolute
An absolute target number of drops to have in the frame.
Relative
Compute the number of drops based on the frame size. Lower value is denser.
Is converted to an absolute value, with 1 drop per sparseness pixels.
Dense
A dense rain. Equivalent to Relative { sparseness: 20 }.
Normal
A normal rain. Equivalent to Relative { sparseness: 50 }.
Sparse
A sparse rain. Equivalent to Relative { sparseness: 100 }.
Trait Implementations§
Source§impl Clone for RainDensity
impl Clone for RainDensity
Source§fn clone(&self) -> RainDensity
fn clone(&self) -> RainDensity
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RainDensity
impl Debug for RainDensity
Source§impl Hash for RainDensity
impl Hash for RainDensity
Source§impl Ord for RainDensity
impl Ord for RainDensity
Source§fn cmp(&self, other: &RainDensity) -> Ordering
fn cmp(&self, other: &RainDensity) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for RainDensity
impl PartialEq for RainDensity
Source§impl PartialOrd for RainDensity
impl PartialOrd for RainDensity
impl Copy for RainDensity
impl Eq for RainDensity
impl StructuralPartialEq for RainDensity
Auto Trait Implementations§
impl Freeze for RainDensity
impl RefUnwindSafe for RainDensity
impl Send for RainDensity
impl Sync for RainDensity
impl Unpin for RainDensity
impl UnwindSafe for RainDensity
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
Mutably borrows from an owned value. Read more
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more