Enum svgtypes::Paint [−][src]
pub enum Paint<'a> {
None,
Inherit,
CurrentColor,
Color(Color),
FuncIRI(&'a str, Option<PaintFallback>),
}Expand description
Representation of the <paint> type.
Doesn’t own the data. Use only for parsing.
<icccolor> isn’t supported.
Examples
use svgtypes::{Paint, PaintFallback, Color};
let paint = Paint::from_str("url(#gradient) red").unwrap();
assert_eq!(paint, Paint::FuncIRI("gradient",
Some(PaintFallback::Color(Color::red()))));
let paint = Paint::from_str("inherit").unwrap();
assert_eq!(paint, Paint::Inherit);Variants
The none value.
The inherit value.
The currentColor value.
Color(Color)<color> value.
Tuple Fields of Color
0: ColorFuncIRI(&'a str, Option<PaintFallback>)<FuncIRI> value with an optional fallback.
Tuple Fields of FuncIRI
0: &'a str1: Option<PaintFallback>Implementations
Trait Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for Paint<'a>
impl<'a> UnwindSafe for Paint<'a>
Blanket Implementations
Mutably borrows from an owned value. Read more