pub enum ElementData {
Show 53 variants
Circle(Box<Circle>),
ClipPath(Box<ClipPath>),
Ellipse(Box<Ellipse>),
Filter(Box<Filter>),
Group(Box<Group>),
Image(Box<Image>),
Line(Box<Line>),
LinearGradient(Box<LinearGradient>),
Link(Box<Link>),
Marker(Box<Marker>),
Mask(Box<Mask>),
NonRendering(Box<NonRendering>),
Path(Box<Path>),
Pattern(Box<Pattern>),
Polygon(Box<Polygon>),
Polyline(Box<Polyline>),
RadialGradient(Box<RadialGradient>),
Rect(Box<Rect>),
Stop(Box<Stop>),
Style(Box<Style>),
Svg(Box<Svg>),
Switch(Box<Switch>),
Symbol(Box<Symbol>),
Text(Box<Text>),
Text2(Box<Text2>),
TRef(Box<TRef>),
TSpan(Box<TSpan>),
Use(Box<Use>),
FeBlend(Box<FeBlend>),
FeColorMatrix(Box<FeColorMatrix>),
FeComponentTransfer(Box<FeComponentTransfer>),
FeComposite(Box<FeComposite>),
FeConvolveMatrix(Box<FeConvolveMatrix>),
FeDiffuseLighting(Box<FeDiffuseLighting>),
FeDisplacementMap(Box<FeDisplacementMap>),
FeDistantLight(Box<FeDistantLight>),
FeDropShadow(Box<FeDropShadow>),
FeFlood(Box<FeFlood>),
FeFuncA(Box<FeFuncA>),
FeFuncB(Box<FeFuncB>),
FeFuncG(Box<FeFuncG>),
FeFuncR(Box<FeFuncR>),
FeGaussianBlur(Box<FeGaussianBlur>),
FeImage(Box<FeImage>),
FeMerge(Box<FeMerge>),
FeMergeNode(Box<FeMergeNode>),
FeMorphology(Box<FeMorphology>),
FeOffset(Box<FeOffset>),
FePointLight(Box<FePointLight>),
FeSpecularLighting(Box<FeSpecularLighting>),
FeSpotLight(Box<FeSpotLight>),
FeTile(Box<FeTile>),
FeTurbulence(Box<FeTurbulence>),
}Expand description
Parsed contents of an element node in the DOM.
This enum uses Box<Foo> in order to make each variant the size of
a pointer.
Variants§
Circle(Box<Circle>)
ClipPath(Box<ClipPath>)
Ellipse(Box<Ellipse>)
Filter(Box<Filter>)
Group(Box<Group>)
Image(Box<Image>)
Line(Box<Line>)
LinearGradient(Box<LinearGradient>)
Link(Box<Link>)
Marker(Box<Marker>)
Mask(Box<Mask>)
NonRendering(Box<NonRendering>)
Path(Box<Path>)
Pattern(Box<Pattern>)
Polygon(Box<Polygon>)
Polyline(Box<Polyline>)
RadialGradient(Box<RadialGradient>)
Rect(Box<Rect>)
Stop(Box<Stop>)
Style(Box<Style>)
Svg(Box<Svg>)
Switch(Box<Switch>)
Symbol(Box<Symbol>)
Text(Box<Text>)
Text2(Box<Text2>)
TRef(Box<TRef>)
TSpan(Box<TSpan>)
Use(Box<Use>)
FeBlend(Box<FeBlend>)
FeColorMatrix(Box<FeColorMatrix>)
FeComponentTransfer(Box<FeComponentTransfer>)
FeComposite(Box<FeComposite>)
FeConvolveMatrix(Box<FeConvolveMatrix>)
FeDiffuseLighting(Box<FeDiffuseLighting>)
FeDisplacementMap(Box<FeDisplacementMap>)
FeDistantLight(Box<FeDistantLight>)
FeDropShadow(Box<FeDropShadow>)
FeFlood(Box<FeFlood>)
FeFuncA(Box<FeFuncA>)
FeFuncB(Box<FeFuncB>)
FeFuncG(Box<FeFuncG>)
FeFuncR(Box<FeFuncR>)
FeGaussianBlur(Box<FeGaussianBlur>)
FeImage(Box<FeImage>)
FeMerge(Box<FeMerge>)
FeMergeNode(Box<FeMergeNode>)
FeMorphology(Box<FeMorphology>)
FeOffset(Box<FeOffset>)
FePointLight(Box<FePointLight>)
FeSpecularLighting(Box<FeSpecularLighting>)
FeSpotLight(Box<FeSpotLight>)
FeTile(Box<FeTile>)
FeTurbulence(Box<FeTurbulence>)
Implementations§
Source§impl ElementData
impl ElementData
Sourcefn draw(
&self,
node: &Node<NodeData>,
acquired_nodes: &mut AcquiredNodes<'_>,
cascaded: &CascadedValues<'_>,
viewport: &Viewport,
draw_ctx: &mut DrawingCtx,
clipping: bool,
) -> Result<Box<BoundingBox>, Box<InternalRenderingError>>
fn draw( &self, node: &Node<NodeData>, acquired_nodes: &mut AcquiredNodes<'_>, cascaded: &CascadedValues<'_>, viewport: &Viewport, draw_ctx: &mut DrawingCtx, clipping: bool, ) -> Result<Box<BoundingBox>, Box<InternalRenderingError>>
Dispatcher for the draw method of concrete element implementations.
Sourcefn layout(
&self,
node: &Node<NodeData>,
acquired_nodes: &mut AcquiredNodes<'_>,
cascaded: &CascadedValues<'_>,
viewport: &Viewport,
draw_ctx: &mut DrawingCtx,
clipping: bool,
) -> Result<Option<Layer>, Box<InternalRenderingError>>
fn layout( &self, node: &Node<NodeData>, acquired_nodes: &mut AcquiredNodes<'_>, cascaded: &CascadedValues<'_>, viewport: &Viewport, draw_ctx: &mut DrawingCtx, clipping: bool, ) -> Result<Option<Layer>, Box<InternalRenderingError>>
Dispatcher for the layout method of concrete element implementations.
Auto Trait Implementations§
impl Freeze for ElementData
impl RefUnwindSafe for ElementData
impl !Send for ElementData
impl !Sync for ElementData
impl Unpin for ElementData
impl UnwindSafe for ElementData
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> 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§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.