Skip to main content

FoNodeData

Enum FoNodeData 

Source
pub enum FoNodeData<'a> {
Show 61 variants Root, LayoutMasterSet, SimplePageMaster { master_name: String, properties: PropertyList<'a>, }, RepeatablePageMasterAlternatives { maximum_repeats: Option<i32>, }, ConditionalPageMasterReference { master_reference: String, page_position: PagePosition, odd_or_even: OddOrEven, blank_or_not_blank: BlankOrNotBlank, }, RegionBody { properties: PropertyList<'a>, }, RegionBefore { properties: PropertyList<'a>, }, RegionAfter { properties: PropertyList<'a>, }, RegionStart { properties: PropertyList<'a>, }, RegionEnd { properties: PropertyList<'a>, }, PageSequence { master_reference: String, format: String, grouping_separator: Option<char>, grouping_size: Option<usize>, properties: PropertyList<'a>, }, Flow { flow_name: String, properties: PropertyList<'a>, }, StaticContent { flow_name: String, properties: PropertyList<'a>, }, Block { properties: PropertyList<'a>, }, Inline { properties: PropertyList<'a>, }, ListBlock { properties: PropertyList<'a>, }, ListItem { properties: PropertyList<'a>, }, ListItemLabel { properties: PropertyList<'a>, }, ListItemBody { properties: PropertyList<'a>, }, Table { properties: PropertyList<'a>, }, TableColumn { properties: PropertyList<'a>, }, TableHeader { properties: PropertyList<'a>, }, TableFooter { properties: PropertyList<'a>, }, TableBody { properties: PropertyList<'a>, }, TableRow { properties: PropertyList<'a>, }, TableCell { properties: PropertyList<'a>, }, ExternalGraphic { src: String, content_width: Option<String>, content_height: Option<String>, scaling: Option<String>, properties: PropertyList<'a>, }, InstreamForeignObject { content_width: Option<String>, content_height: Option<String>, scaling: Option<String>, foreign_xml: String, properties: PropertyList<'a>, }, BasicLink { internal_destination: Option<String>, external_destination: Option<String>, properties: PropertyList<'a>, }, BookmarkTree { properties: PropertyList<'a>, }, Bookmark { internal_destination: Option<String>, external_destination: Option<String>, properties: PropertyList<'a>, }, BookmarkTitle { properties: PropertyList<'a>, }, PageNumberCitation { ref_id: String, properties: PropertyList<'a>, }, PageNumberCitationLast { ref_id: String, properties: PropertyList<'a>, }, Leader { properties: PropertyList<'a>, }, Marker { marker_class_name: String, properties: PropertyList<'a>, }, RetrieveMarker { retrieve_class_name: String, retrieve_position: RetrievePosition, properties: PropertyList<'a>, }, Footnote { properties: PropertyList<'a>, }, FootnoteBody { properties: PropertyList<'a>, }, Float { properties: PropertyList<'a>, }, PageNumber { properties: PropertyList<'a>, }, BlockContainer { properties: PropertyList<'a>, }, InlineContainer { properties: PropertyList<'a>, }, TableAndCaption { properties: PropertyList<'a>, }, TableCaption { properties: PropertyList<'a>, }, PageSequenceMaster { master_name: String, }, Declarations, ColorProfile { src: String, color_profile_name: String, }, UnsupportedElement { element_name: String, }, MultiSwitch { properties: PropertyList<'a>, }, MultiCase { starting_state: String, properties: PropertyList<'a>, }, MultiToggle { properties: PropertyList<'a>, }, MultiProperties { properties: PropertyList<'a>, }, MultiPropertySet { properties: PropertyList<'a>, }, Wrapper { properties: PropertyList<'a>, }, Character { character: char, properties: PropertyList<'a>, }, BidiOverride { direction: String, properties: PropertyList<'a>, }, InitialPropertySet { properties: PropertyList<'a>, }, ChangeBarBegin { change_bar_class: String, properties: PropertyList<'a>, }, ChangeBarEnd { change_bar_class: String, }, Text(String),
}
Expand description

FO node data - the actual formatting object information

Variants§

§

Root

fo:root - document root

§

LayoutMasterSet

fo:layout-master-set - page layout definitions

§

SimplePageMaster

fo:simple-page-master - single page layout

Fields

§master_name: String
§properties: PropertyList<'a>
§

RepeatablePageMasterAlternatives

fo:repeatable-page-master-alternatives - conditional page master selection

Fields

§maximum_repeats: Option<i32>

Maximum number of times this can be used (None = unlimited)

§

ConditionalPageMasterReference

fo:conditional-page-master-reference - conditional reference to page master

Fields

§master_reference: String

Reference to the simple-page-master to use

§page_position: PagePosition

Page position constraint (first, last, rest, any)

§odd_or_even: OddOrEven

Odd or even constraint (odd, even, any)

§blank_or_not_blank: BlankOrNotBlank

Blank or not blank constraint (blank, not-blank, any)

§

RegionBody

fo:region-body - main content region

Fields

§properties: PropertyList<'a>
§

RegionBefore

fo:region-before - header region

Fields

§properties: PropertyList<'a>
§

RegionAfter

fo:region-after - footer region

Fields

§properties: PropertyList<'a>
§

RegionStart

fo:region-start - left sidebar region

Fields

§properties: PropertyList<'a>
§

RegionEnd

fo:region-end - right sidebar region

Fields

§properties: PropertyList<'a>
§

PageSequence

fo:page-sequence - sequence of pages

Fields

§master_reference: String
§format: String
§grouping_separator: Option<char>
§grouping_size: Option<usize>
§properties: PropertyList<'a>
§

Flow

fo:flow - flowing content

Fields

§flow_name: String
§properties: PropertyList<'a>
§

StaticContent

fo:static-content - static content (headers/footers)

Fields

§flow_name: String
§properties: PropertyList<'a>
§

Block

fo:block - block-level element

Fields

§properties: PropertyList<'a>
§

Inline

fo:inline - inline-level element

Fields

§properties: PropertyList<'a>
§

ListBlock

fo:list-block - list container

Fields

§properties: PropertyList<'a>
§

ListItem

fo:list-item - list item

Fields

§properties: PropertyList<'a>
§

ListItemLabel

fo:list-item-label - list item label (bullet/number)

Fields

§properties: PropertyList<'a>
§

ListItemBody

fo:list-item-body - list item content

Fields

§properties: PropertyList<'a>
§

Table

fo:table - table container

Fields

§properties: PropertyList<'a>
§

TableColumn

fo:table-column - table column definition

Fields

§properties: PropertyList<'a>
§

TableHeader

fo:table-header - table header

Fields

§properties: PropertyList<'a>
§

TableFooter

fo:table-footer - table footer

Fields

§properties: PropertyList<'a>
§

TableBody

fo:table-body - table body

Fields

§properties: PropertyList<'a>
§

TableRow

fo:table-row - table row

Fields

§properties: PropertyList<'a>
§

TableCell

fo:table-cell - table cell

Fields

§properties: PropertyList<'a>
§

ExternalGraphic

fo:external-graphic - image reference

Fields

§content_width: Option<String>

content-width: explicit length, “scale-to-fit”, “scale-down-to-fit”, “scale-up-to-fit”, or “auto”

§content_height: Option<String>

content-height: explicit length, “scale-to-fit”, “scale-down-to-fit”, “scale-up-to-fit”, or “auto”

§scaling: Option<String>

scaling: “uniform” or “non-uniform”

§properties: PropertyList<'a>
§

InstreamForeignObject

fo:instream-foreign-object - embedded content (SVG, etc.)

Fields

§content_width: Option<String>
§content_height: Option<String>
§scaling: Option<String>
§foreign_xml: String
§properties: PropertyList<'a>

fo:basic-link - hyperlink

Fields

§internal_destination: Option<String>
§external_destination: Option<String>
§properties: PropertyList<'a>
§

BookmarkTree

fo:bookmark-tree - document outline root

Fields

§properties: PropertyList<'a>
§

Bookmark

fo:bookmark - bookmark entry

Fields

§internal_destination: Option<String>
§external_destination: Option<String>
§properties: PropertyList<'a>
§

BookmarkTitle

fo:bookmark-title - bookmark title text

Fields

§properties: PropertyList<'a>
§

PageNumberCitation

fo:page-number-citation - reference to page number of an element

Fields

§ref_id: String
§properties: PropertyList<'a>
§

PageNumberCitationLast

fo:page-number-citation-last - reference to last page of an element (Section 8.10)

Fields

§ref_id: String
§properties: PropertyList<'a>
§

Leader

fo:leader - visual separator (dots, lines, etc.)

Fields

§properties: PropertyList<'a>
§

Marker

fo:marker - content for running headers/footers

Fields

§marker_class_name: String
§properties: PropertyList<'a>
§

RetrieveMarker

fo:retrieve-marker - retrieves marker content

Fields

§retrieve_class_name: String
§retrieve_position: RetrievePosition
§properties: PropertyList<'a>
§

Footnote

fo:footnote - footnote container

Fields

§properties: PropertyList<'a>
§

FootnoteBody

fo:footnote-body - footnote content

Fields

§properties: PropertyList<'a>
§

Float

fo:float - floating element (like CSS floats)

Fields

§properties: PropertyList<'a>
§

PageNumber

fo:page-number - inline element inserting the current page number

Fields

§properties: PropertyList<'a>
§

BlockContainer

fo:block-container - block-level container with absolute/fixed positioning

Fields

§properties: PropertyList<'a>
§

InlineContainer

fo:inline-container - inline-level block container (Section 8.13)

Fields

§properties: PropertyList<'a>
§

TableAndCaption

fo:table-and-caption - table with an associated caption (Section 9.3.3)

Fields

§properties: PropertyList<'a>
§

TableCaption

fo:table-caption - caption for a table (Section 9.4)

Fields

§properties: PropertyList<'a>
§

PageSequenceMaster

fo:page-sequence-master - sequence of page master alternatives

Fields

§master_name: String
§

Declarations

fo:declarations - document-level declarations (color profiles, etc.)

§

ColorProfile

fo:color-profile - ICC color profile declaration

Fields

§color_profile_name: String
§

UnsupportedElement

Placeholder for recognized but unsupported XSL-FO elements

Fields

§element_name: String

The element name, for diagnostic purposes

§

MultiSwitch

fo:multi-switch - container for multiple alternatives (Section 11.1)

Fields

§properties: PropertyList<'a>
§

MultiCase

fo:multi-case - one alternative within a multi-switch (Section 11.2)

Fields

§starting_state: String

Whether this case is visible (“visible” or “hidden”)

§properties: PropertyList<'a>
§

MultiToggle

fo:multi-toggle - interactive trigger within multi-case (Section 11.3)

Fields

§properties: PropertyList<'a>
§

MultiProperties

fo:multi-properties - property-switching element (Section 11.4)

Fields

§properties: PropertyList<'a>
§

MultiPropertySet

fo:multi-property-set - one set of properties within multi-properties (Section 11.5)

Fields

§properties: PropertyList<'a>
§

Wrapper

fo:wrapper - transparent property-setting container (Section 8.12)

Fields

§properties: PropertyList<'a>
§

Character

fo:character - single character with full property control (Section 8.5)

Fields

§character: char

The character to render

§properties: PropertyList<'a>
§

BidiOverride

fo:bidi-override - bidirectional text override (Section 8.11)

Fields

§direction: String

Direction: “ltr” or “rtl”

§properties: PropertyList<'a>
§

InitialPropertySet

fo:initial-property-set - first line property overrides (Section 8.6)

Fields

§properties: PropertyList<'a>
§

ChangeBarBegin

fo:change-bar-begin - marks start of changed region (Section 12.1)

Fields

§change_bar_class: String

Unique identifier linking begin/end pair

§properties: PropertyList<'a>
§

ChangeBarEnd

fo:change-bar-end - marks end of changed region (Section 12.2)

Fields

§change_bar_class: String

Unique identifier linking begin/end pair

§

Text(String)

Text content

Implementations§

Source§

impl<'a> FoNodeData<'a>

Source

pub fn element_name(&self) -> &str

Get the element name for this node

Source

pub fn properties_mut(&mut self) -> Option<&mut PropertyList<'a>>

Get mutable property list if this node has one

Source

pub fn properties(&self) -> Option<&PropertyList<'a>>

Get immutable property list if this node has one

Source

pub fn can_contain_text(&self) -> bool

Check if this node type can contain text

Source

pub fn is_layout_master(&self) -> bool

Check if this node type is a layout master

Source

pub fn is_region(&self) -> bool

Check if this node type is a region

Auto Trait Implementations§

§

impl<'a> !Freeze for FoNodeData<'a>

§

impl<'a> !RefUnwindSafe for FoNodeData<'a>

§

impl<'a> !Send for FoNodeData<'a>

§

impl<'a> !Sync for FoNodeData<'a>

§

impl<'a> Unpin for FoNodeData<'a>

§

impl<'a> UnsafeUnpin for FoNodeData<'a>

§

impl<'a> !UnwindSafe for FoNodeData<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.