pub enum Content<'a> {
Box,
Fragment(FragmentRef, &'a [f32]),
Cells(&'a CellGrid<'a>),
Line(&'a [Vec2], Stroke),
Polygon(&'a [Vec2]),
Path(&'a [PathOp], FillRule, Option<Stroke>, Option<Turn>),
PathD(&'a str, FillRule, Option<Stroke>, Option<Turn>),
PathFlat(&'a [f32], FillRule, Option<Stroke>, Option<Turn>),
}Expand description
What a node opened through Core::open_from holds: a box (left open
for its children), a fragment (likewise), a cells grid or a stroke
(leaves, closed by the door).
Variants§
Box
Fragment(FragmentRef, &'a [f32])
A fragment: the function (and its image, if any) and the params.
Cells(&'a CellGrid<'a>)
Line(&'a [Vec2], Stroke)
Polygon(&'a [Vec2])
A filled polygon; the fill is the spec’s bg.
Path(&'a [PathOp], FillRule, Option<Stroke>, Option<Turn>)
A path: its ops, the fill rule, and a stroke if it has one. The
fill is the spec’s bg.
PathD(&'a str, FillRule, Option<Stroke>, Option<Turn>)
The same from a d string, parsed here by the one parser; one
that does not parse raises path-malformed under the node’s key.
PathFlat(&'a [f32], FillRule, Option<Stroke>, Option<Turn>)
The same from the flat op form (Path::to_floats), read here; one
that is not the form raises path-malformed under the node’s key
as a d that does not parse does.
Auto Trait Implementations§
impl<'a> Freeze for Content<'a>
impl<'a> RefUnwindSafe for Content<'a>
impl<'a> Send for Content<'a>
impl<'a> Sync for Content<'a>
impl<'a> Unpin for Content<'a>
impl<'a> UnsafeUnpin for Content<'a>
impl<'a> UnwindSafe for Content<'a>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.