Skip to main content

CustomNodeTrait

Trait CustomNodeTrait 

Source
pub trait CustomNodeTrait<ET: EngineTypes>: NodeTrait<ET>
where Self: Into<ET::CustomNode>,
{ // Provided methods fn into_v(self) -> VNode<ET> { ... } fn into_h(self) -> HNode<ET> { ... } fn into_math(self) -> MathNode<ET, UnresolvedMathFontStyle<ET>> { ... } }
Expand description

Trait to implement for engine-specific new node types. Needs to implement NodeTrait and Into<ET::CustomNode>. Is implemented by () for engines that do not have additional node types beyond the default ones.

Provided Methods§

Source

fn into_v(self) -> VNode<ET>

Return this node as a VNode.

Source

fn into_h(self) -> HNode<ET>

Return this node as an HNode.

Source

fn into_math(self) -> MathNode<ET, UnresolvedMathFontStyle<ET>>

Return this node as a MathNode.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<ET: EngineTypes<CustomNode = Infallible>> CustomNodeTrait<ET> for Infallible

Implementors§

Source§

impl<ET: EngineTypes> CustomNodeTrait<ET> for PDFNode<ET>
where ET::CustomNode: From<PDFNode<ET>>,