Enum svgtypes::FilterValue
source · [−]pub enum FilterValue<'a> {
Blur(Length),
DropShadow {
color: Option<Color>,
dx: Length,
dy: Length,
std_dev: Length,
},
Brightness(f64),
Contrast(f64),
Grayscale(f64),
HueRotate(Angle),
Invert(f64),
Opacity(f64),
Sepia(f64),
Saturate(f64),
Url(&'a str),
}Expand description
Representation of the <filter-function> | <url> type.
Note that Length values in this enum do not contain % values.
They are disallowed by the spec.
Variants
Blur(Length)
Cannot be negative and/or have a percentage units.
DropShadow
Fields
color: Option<Color>currentColor will be resolved as None,
because it should be processed in the same way.
dx: LengthCannot have a percentage units.
dy: LengthCannot have a percentage units.
std_dev: LengthCannot be negative and/or have a percentage units.
Brightness(f64)
Normalized value. Cannot be negative.
Contrast(f64)
Normalized value. Cannot be negative.
Grayscale(f64)
Normalized value. Cannot be negative.
HueRotate(Angle)
Invert(f64)
Normalized value. Cannot be negative.
Opacity(f64)
Normalized value. Cannot be negative.
Sepia(f64)
Normalized value. Cannot be negative.
Saturate(f64)
Normalized value. Cannot be negative.
Url(&'a str)
Cannot be empty.
Trait Implementations
sourceimpl<'a> Clone for FilterValue<'a>
impl<'a> Clone for FilterValue<'a>
sourcefn clone(&self) -> FilterValue<'a>
fn clone(&self) -> FilterValue<'a>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl<'a> Debug for FilterValue<'a>
impl<'a> Debug for FilterValue<'a>
sourceimpl<'a> PartialEq<FilterValue<'a>> for FilterValue<'a>
impl<'a> PartialEq<FilterValue<'a>> for FilterValue<'a>
sourcefn eq(&self, other: &FilterValue<'a>) -> bool
fn eq(&self, other: &FilterValue<'a>) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &FilterValue<'a>) -> bool
fn ne(&self, other: &FilterValue<'a>) -> bool
This method tests for !=.
impl<'a> Copy for FilterValue<'a>
impl<'a> StructuralPartialEq for FilterValue<'a>
Auto Trait Implementations
impl<'a> RefUnwindSafe for FilterValue<'a>
impl<'a> Send for FilterValue<'a>
impl<'a> Sync for FilterValue<'a>
impl<'a> Unpin for FilterValue<'a>
impl<'a> UnwindSafe for FilterValue<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more