Trait rsvg::parsers::Parse

source ·
pub trait Parse: Sized {
    // Required method
    fn parse<'i>(parser: &mut Parser<'i, '_>) -> Result<Self, ParseError<'i>>;

    // Provided method
    fn parse_str(s: &str) -> Result<Self, ParseError<'_>> { ... }
}
Expand description

Trait to parse values using cssparser::Parser.

Required Methods§

source

fn parse<'i>(parser: &mut Parser<'i, '_>) -> Result<Self, ParseError<'i>>

Parses a value out of the parser.

All value types should implement this for composability.

Provided Methods§

source

fn parse_str(s: &str) -> Result<Self, ParseError<'_>>

Convenience function to parse a value out of a &str.

This is useful mostly for tests which want to avoid creating a cssparser::Parser by hand. Property types do not need to reimplement this.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Parse for bool

source§

fn parse<'i>(parser: &mut Parser<'i, '_>) -> Result<Self, ParseError<'i>>

source§

impl Parse for f64

source§

fn parse<'i>(parser: &mut Parser<'i, '_>) -> Result<Self, ParseError<'i>>

source§

impl Parse for i32

source§

fn parse<'i>(parser: &mut Parser<'i, '_>) -> Result<Self, ParseError<'i>>

source§

impl Parse for u32

source§

fn parse<'i>(parser: &mut Parser<'i, '_>) -> Result<Self, ParseError<'i>>

source§

impl Parse for Color

source§

fn parse<'i>(parser: &mut Parser<'i, '_>) -> Result<Color, ParseError<'i>>

source§

impl<T: Parse> Parse for Option<T>

source§

fn parse<'i>(parser: &mut Parser<'i, '_>) -> Result<Self, ParseError<'i>>

Implementors§

source§

impl Parse for CoordUnits

source§

impl Parse for Dasharray

source§

impl Parse for FilterFunction

source§

impl Parse for Mode

source§

impl Parse for OperationType

source§

impl Parse for FunctionType

source§

impl Parse for rsvg::filters::composite::Operator

source§

impl Parse for ColorChannel

source§

impl Parse for Input

source§

impl Parse for rsvg::filters::morphology::Operator

source§

impl Parse for NoiseType

source§

impl Parse for StitchTiles

source§

impl Parse for Font

source§

impl Parse for FontSize

source§

impl Parse for FontWeight

source§

impl Parse for GlyphOrientationVertical

source§

impl Parse for LetterSpacing

source§

impl Parse for LineHeight

source§

impl Parse for SpreadMethod

source§

impl Parse for Iri

source§

impl Parse for MarkerOrient

source§

impl Parse for MarkerUnits

source§

impl Parse for PaintServer

source§

impl Parse for ClipRule

source§

impl Parse for ColorInterpolationFilters

source§

impl Parse for Direction

source§

impl Parse for Display

source§

impl Parse for EnableBackground

source§

impl Parse for FillRule

source§

impl Parse for Filter

source§

impl Parse for FontStretch

source§

impl Parse for FontStyle

source§

impl Parse for FontVariant

source§

impl Parse for ImageRendering

source§

impl Parse for Isolation

source§

impl Parse for MaskType

source§

impl Parse for MixBlendMode

source§

impl Parse for Overflow

source§

impl Parse for ShapeRendering

source§

impl Parse for StrokeLinecap

source§

impl Parse for StrokeLinejoin

source§

impl Parse for TextAnchor

source§

impl Parse for TextOrientation

source§

impl Parse for TextRendering

source§

impl Parse for UnicodeBidi

source§

impl Parse for VectorEffect

source§

impl Parse for Visibility

source§

impl Parse for WritingMode

source§

impl Parse for XmlSpace

source§

impl Parse for EdgeMode

source§

impl Parse for TransformProperty

source§

impl Parse for Angle

source§

impl Parse for AspectRatio

source§

impl Parse for FilterValueList

source§

impl Parse for FontFamily

source§

impl Parse for GradientUnits

source§

impl Parse for PatternContentUnits

source§

impl Parse for PatternUnits

source§

impl Parse for BaselineShift

source§

impl Parse for CX

source§

impl Parse for CY

source§

impl Parse for ClipPath

source§

impl Parse for rsvg::property_defs::Color

source§

impl Parse for Fill

source§

impl Parse for FillOpacity

source§

impl Parse for FloodColor

source§

impl Parse for FloodOpacity

source§

impl Parse for Height

source§

impl Parse for LightingColor

source§

impl Parse for Marker

source§

impl Parse for MarkerEnd

source§

impl Parse for MarkerMid

source§

impl Parse for MarkerStart

source§

impl Parse for Mask

source§

impl Parse for Opacity

source§

impl Parse for PaintOrder

source§

impl Parse for R

source§

impl Parse for RX

source§

impl Parse for RY

source§

impl Parse for StopColor

source§

impl Parse for StopOpacity

source§

impl Parse for Stroke

source§

impl Parse for StrokeDasharray

source§

impl Parse for StrokeDashoffset

source§

impl Parse for StrokeMiterlimit

source§

impl Parse for StrokeOpacity

source§

impl Parse for StrokeWidth

source§

impl Parse for TextDecoration

source§

impl Parse for Transform

source§

impl Parse for Width

source§

impl Parse for X

source§

impl Parse for XmlLang

source§

impl Parse for Y

source§

impl Parse for Points

source§

impl Parse for ClipPathUnits

source§

impl Parse for MaskContentUnits

source§

impl Parse for MaskUnits

source§

impl Parse for TransformAttribute

source§

impl Parse for UnitInterval

source§

impl Parse for ViewBox

source§

impl Parse for CustomIdent

source§

impl Parse for NonNegative

source§

impl Parse for NumberOrPercentage

source§

impl<N: Normalize> Parse for LengthOrAuto<N>

source§

impl<N: Normalize, V: Validate> Parse for CssLength<N, V>

source§

impl<T: Parse + Copy> Parse for NumberOptionalNumber<T>

source§

impl<T: Parse, const REQUIRED: usize, const MAX: usize> Parse for CommaSeparatedList<T, REQUIRED, MAX>