Skip to main content

Tag

Struct Tag 

Source
pub struct Tag<T> { /* private fields */ }
Expand description

A specific tag which allows accessing attributes specific to this TagKind.

§Example

use std::num::NonZeroU32;
use krilla::tagging::{TagGroup, TagTree, TableHeaderScope, Tag, TagId};

let tag = Tag::TH(TableHeaderScope::Row)
    .with_id(Some(TagId::from(*b"this id")))
    .with_col_span(Some(NonZeroU32::new(3).unwrap()))
    .with_headers(Some([TagId::from(*b"parent id")]))
    .with_width(Some(250.0))
    .with_height(Some(100.0));
let group = TagGroup::new(tag);

let mut tree = TagTree::new();
tree.push(group);

Implementations§

Source§

impl<T> Tag<T>

Source

pub fn id(&self) -> Option<&TagId>

The tag id.

Source

pub fn set_id(&mut self, id: Option<TagId>)

Set the tag id.

Source

pub fn with_id(self, id: Option<TagId>) -> Self

Set the tag id.

Source

pub fn lang(&self) -> Option<&str>

The language of this tag.

Source

pub fn set_lang(&mut self, lang: Option<String>)

Set the language of this tag.

Source

pub fn with_lang(self, lang: Option<String>) -> Self

Set the language of this tag.

Source

pub fn alt_text(&self) -> Option<&str>

The optional alternate text that describes the text (for example, if the text consists of a star symbol, the alt text should describe that in natural language).

Source

pub fn set_alt_text(&mut self, alt_text: Option<String>)

Set the optional alternate text that describes the text (for example, if the text consists of a star symbol, the alt text should describe that in natural language).

Source

pub fn with_alt_text(self, alt_text: Option<String>) -> Self

Set the optional alternate text that describes the text (for example, if the text consists of a star symbol, the alt text should describe that in natural language).

Source

pub fn expanded(&self) -> Option<&str>

The expanded form of an abbreviation. Only applicable if the content of the tag is an abbreviation.

Source

pub fn set_expanded(&mut self, expanded: Option<String>)

Set the expanded form of an abbreviation. Only applicable if the content of the tag is an abbreviation.

Source

pub fn with_expanded(self, expanded: Option<String>) -> Self

Set the expanded form of an abbreviation. Only applicable if the content of the tag is an abbreviation.

Source

pub fn actual_text(&self) -> Option<&str>

The actual text represented by the content of this tag, i.e. if it contained some curves that artistically represent some word. This should be the exact replacement text of the word.

Source

pub fn set_actual_text(&mut self, actual_text: Option<String>)

Set the actual text represented by the content of this tag, i.e. if it contained some curves that artistically represent some word. This should be the exact replacement text of the word.

Source

pub fn with_actual_text(self, actual_text: Option<String>) -> Self

Set the actual text represented by the content of this tag, i.e. if it contained some curves that artistically represent some word. This should be the exact replacement text of the word.

Source

pub fn placement(&self) -> Option<Placement>

The placement.

Source

pub fn set_placement(&mut self, placement: Option<Placement>)

Set the placement.

Source

pub fn with_placement(self, placement: Option<Placement>) -> Self

Set the placement.

Source

pub fn writing_mode(&self) -> Option<WritingMode>

The writing mode.

Source

pub fn set_writing_mode(&mut self, writing_mode: Option<WritingMode>)

Set the writing mode.

Source

pub fn with_writing_mode(self, writing_mode: Option<WritingMode>) -> Self

Set the writing mode.

Source

pub fn background_color(&self) -> Option<NaiveRgbColor>

The background color.

Source

pub fn set_background_color(&mut self, background_color: Option<NaiveRgbColor>)

Set the background color.

Source

pub fn with_background_color( self, background_color: Option<NaiveRgbColor>, ) -> Self

Set the background color.

Source

pub fn border_color(&self) -> Option<Sides<NaiveRgbColor>>

The border color.

Source

pub fn set_border_color(&mut self, border_color: Option<Sides<NaiveRgbColor>>)

Set the border color.

Source

pub fn with_border_color( self, border_color: Option<Sides<NaiveRgbColor>>, ) -> Self

Set the border color.

Source

pub fn border_style(&self) -> Option<Sides<BorderStyle>>

The way the border is drawn.

Source

pub fn set_border_style(&mut self, border_style: Option<Sides<BorderStyle>>)

Set the way the border is drawn.

Source

pub fn with_border_style(self, border_style: Option<Sides<BorderStyle>>) -> Self

Set the way the border is drawn.

Source

pub fn border_thickness(&self) -> Option<Sides<f32>>

The border width.

Source

pub fn set_border_thickness(&mut self, border_thickness: Option<Sides<f32>>)

Set the border width.

Source

pub fn with_border_thickness(self, border_thickness: Option<Sides<f32>>) -> Self

Set the border width.

Source

pub fn padding(&self) -> Option<Sides<f32>>

The padding inside of an element.

Source

pub fn set_padding(&mut self, padding: Option<Sides<f32>>)

Set the padding inside of an element.

Source

pub fn with_padding(self, padding: Option<Sides<f32>>) -> Self

Set the padding inside of an element.

Source

pub fn color(&self) -> Option<NaiveRgbColor>

The color of text, borders, and text decorations.

Source

pub fn set_color(&mut self, color: Option<NaiveRgbColor>)

Set the color of text, borders, and text decorations.

Source

pub fn with_color(self, color: Option<NaiveRgbColor>) -> Self

Set the color of text, borders, and text decorations.

Source

pub fn baseline_shift(&self) -> Option<f32>

The distance by which the baseline shall be shifted from the default position.

Source

pub fn set_baseline_shift(&mut self, baseline_shift: Option<f32>)

Set the distance by which the baseline shall be shifted from the default position.

Source

pub fn with_baseline_shift(self, baseline_shift: Option<f32>) -> Self

Set the distance by which the baseline shall be shifted from the default position.

Source

pub fn line_height(&self) -> Option<LineHeight>

The height of each line in an element on the block axis.

Source

pub fn set_line_height(&mut self, line_height: Option<LineHeight>)

Set the height of each line in an element on the block axis.

Source

pub fn with_line_height(self, line_height: Option<LineHeight>) -> Self

Set the height of each line in an element on the block axis.

Source

pub fn text_decoration_color(&self) -> Option<NaiveRgbColor>

The color of the text decoration, overriding the fill color.

Source

pub fn set_text_decoration_color( &mut self, text_decoration_color: Option<NaiveRgbColor>, )

Set the color of the text decoration, overriding the fill color.

Source

pub fn with_text_decoration_color( self, text_decoration_color: Option<NaiveRgbColor>, ) -> Self

Set the color of the text decoration, overriding the fill color.

Source

pub fn text_decoration_thickness(&self) -> Option<f32>

The width of the text decoration line.

Source

pub fn set_text_decoration_thickness( &mut self, text_decoration_thickness: Option<f32>, )

Set the width of the text decoration line.

Source

pub fn with_text_decoration_thickness( self, text_decoration_thickness: Option<f32>, ) -> Self

Set the width of the text decoration line.

Source

pub fn text_decoration_type(&self) -> Option<TextDecorationType>

The kind of text decoration.

Source

pub fn set_text_decoration_type( &mut self, text_decoration_type: Option<TextDecorationType>, )

Set the kind of text decoration.

Source

pub fn with_text_decoration_type( self, text_decoration_type: Option<TextDecorationType>, ) -> Self

Set the kind of text decoration.

Source

pub fn glyph_orientation_vertical(&self) -> Option<GlyphOrientationVertical>

How the glyphs are rotated in a vertical writing mode.

Source

pub fn set_glyph_orientation_vertical( &mut self, glyph_orientation_vertical: Option<GlyphOrientationVertical>, )

Set how the glyphs are rotated in a vertical writing mode.

Source

pub fn with_glyph_orientation_vertical( self, glyph_orientation_vertical: Option<GlyphOrientationVertical>, ) -> Self

Set how the glyphs are rotated in a vertical writing mode.

Source§

impl Tag<Part>

Source

pub const Part: Tag<Part>

A part of a document that may contain multiple articles or sections.

Source§

impl Tag<Article>

Source

pub const Article: Tag<Article>

An article with largely self-contained content.

Source

pub fn column_count(&self) -> Option<NonZeroU32>

The number of columns in the grouping element.

Source

pub fn set_column_count(&mut self, column_count: Option<NonZeroU32>)

Set the number of columns in the grouping element.

Source

pub fn with_column_count(self, column_count: Option<NonZeroU32>) -> Self

Set the number of columns in the grouping element.

Source

pub fn column_gap(&self) -> Option<&ColumnDimensions>

The width of the gaps between columns in the grouping element.

Source

pub fn set_column_gap(&mut self, column_gap: Option<ColumnDimensions>)

Set the width of the gaps between columns in the grouping element.

Source

pub fn with_column_gap(self, column_gap: Option<ColumnDimensions>) -> Self

Set the width of the gaps between columns in the grouping element.

Source

pub fn column_widths(&self) -> Option<&ColumnDimensions>

The width of the columns in the grouping element.

Source

pub fn set_column_widths(&mut self, column_widths: Option<ColumnDimensions>)

Set the width of the columns in the grouping element.

Source

pub fn with_column_widths(self, column_widths: Option<ColumnDimensions>) -> Self

Set the width of the columns in the grouping element.

Source§

impl Tag<Section>

Source

pub const Section: Tag<Section>

Section of a larger document.

Source

pub fn column_count(&self) -> Option<NonZeroU32>

The number of columns in the grouping element.

Source

pub fn set_column_count(&mut self, column_count: Option<NonZeroU32>)

Set the number of columns in the grouping element.

Source

pub fn with_column_count(self, column_count: Option<NonZeroU32>) -> Self

Set the number of columns in the grouping element.

Source

pub fn column_gap(&self) -> Option<&ColumnDimensions>

The width of the gaps between columns in the grouping element.

Source

pub fn set_column_gap(&mut self, column_gap: Option<ColumnDimensions>)

Set the width of the gaps between columns in the grouping element.

Source

pub fn with_column_gap(self, column_gap: Option<ColumnDimensions>) -> Self

Set the width of the gaps between columns in the grouping element.

Source

pub fn column_widths(&self) -> Option<&ColumnDimensions>

The width of the columns in the grouping element.

Source

pub fn set_column_widths(&mut self, column_widths: Option<ColumnDimensions>)

Set the width of the columns in the grouping element.

Source

pub fn with_column_widths(self, column_widths: Option<ColumnDimensions>) -> Self

Set the width of the columns in the grouping element.

Source§

impl Tag<Div>

Source

pub const Div: Tag<Div>

A generic block-level grouping element.

Source

pub fn column_count(&self) -> Option<NonZeroU32>

The number of columns in the grouping element.

Source

pub fn set_column_count(&mut self, column_count: Option<NonZeroU32>)

Set the number of columns in the grouping element.

Source

pub fn with_column_count(self, column_count: Option<NonZeroU32>) -> Self

Set the number of columns in the grouping element.

Source

pub fn column_gap(&self) -> Option<&ColumnDimensions>

The width of the gaps between columns in the grouping element.

Source

pub fn set_column_gap(&mut self, column_gap: Option<ColumnDimensions>)

Set the width of the gaps between columns in the grouping element.

Source

pub fn with_column_gap(self, column_gap: Option<ColumnDimensions>) -> Self

Set the width of the gaps between columns in the grouping element.

Source

pub fn column_widths(&self) -> Option<&ColumnDimensions>

The width of the columns in the grouping element.

Source

pub fn set_column_widths(&mut self, column_widths: Option<ColumnDimensions>)

Set the width of the columns in the grouping element.

Source

pub fn with_column_widths(self, column_widths: Option<ColumnDimensions>) -> Self

Set the width of the columns in the grouping element.

Source§

impl Tag<BlockQuote>

Source

pub const BlockQuote: Tag<BlockQuote>

A paragraph-level quote.

Source§

impl Tag<Caption>

Source

pub const Caption: Tag<Caption>

An image or figure caption.

Best Practice: In the tag tree, this should appear as a sibling after the image (or other) content it describes.

Source§

impl Tag<TOC>

Source

pub const TOC: Tag<TOC>

Table of contents.

Best Practice: Should consist of TOCIs or other nested TOCs.

Source§

impl Tag<TOCI>

Source

pub const TOCI: Tag<TOCI>

Item in the table of contents.

Best Practice: Should only appear within a TOC. Should only consist of labels, references, paragraphs and TOCs.

Source§

impl Tag<Index>

Source

pub const Index: Tag<Index>

Index of the key terms in the document.

Best Practice: Should contain a sequence of text accompanied by reference elements pointing to their occurrence in the text.

Source§

impl Tag<P>

Source

pub const P: Tag<P>

A paragraph.

Source

pub fn space_before(&self) -> Option<f32>

The spacing before the block-level element.

Source

pub fn set_space_before(&mut self, space_before: Option<f32>)

Set the spacing before the block-level element.

Source

pub fn with_space_before(self, space_before: Option<f32>) -> Self

Set the spacing before the block-level element.

Source

pub fn space_after(&self) -> Option<f32>

The spacing after the block-level element.

Source

pub fn set_space_after(&mut self, space_after: Option<f32>)

Set the spacing after the block-level element.

Source

pub fn with_space_after(self, space_after: Option<f32>) -> Self

Set the spacing after the block-level element.

Source

pub fn start_indent(&self) -> Option<f32>

The spacing between the start inline edge of the element and the parent.

Source

pub fn set_start_indent(&mut self, start_indent: Option<f32>)

Set the spacing between the start inline edge of the element and the parent.

Source

pub fn with_start_indent(self, start_indent: Option<f32>) -> Self

Set the spacing between the start inline edge of the element and the parent.

Source

pub fn end_indent(&self) -> Option<f32>

The spacing between the end inline edge of the element and the parent.

Source

pub fn set_end_indent(&mut self, end_indent: Option<f32>)

Set the spacing between the end inline edge of the element and the parent.

Source

pub fn with_end_indent(self, end_indent: Option<f32>) -> Self

Set the spacing between the end inline edge of the element and the parent.

Source

pub fn text_indent(&self) -> Option<f32>

The amount the first line of text in a block-level element is indented. Only applicable to paragraph-like elements with non-block-level elements.

Source

pub fn set_text_indent(&mut self, text_indent: Option<f32>)

Set the amount the first line of text in a block-level element is indented. Only applicable to paragraph-like elements with non-block-level elements.

Source

pub fn with_text_indent(self, text_indent: Option<f32>) -> Self

Set the amount the first line of text in a block-level element is indented. Only applicable to paragraph-like elements with non-block-level elements.

Source

pub fn text_align(&self) -> Option<TextAlign>

The text alignment.

Source

pub fn set_text_align(&mut self, text_align: Option<TextAlign>)

Set the text alignment.

Source

pub fn with_text_align(self, text_align: Option<TextAlign>) -> Self

Set the text alignment.

Source§

impl Tag<Hn>

Source

pub fn Hn(level: NonZeroU16, title: Option<String>) -> Tag<Hn>

Heading level n, including an optional title of the heading.

The title is required for some export modes, like for example PDF/UA.

Source

pub fn level(&self) -> NonZeroU16

The heading level

Source

pub fn set_level(&mut self, level: NonZeroU16)

Set the heading level

Source

pub fn with_level(self, level: NonZeroU16) -> Self

Set the heading level

Source

pub fn title(&self) -> Option<&str>

The title, characterizing a specific tag such as "Chapter 1".

Source

pub fn set_title(&mut self, title: Option<String>)

Set the title, characterizing a specific tag such as "Chapter 1".

Source

pub fn with_title(self, title: Option<String>) -> Self

Set the title, characterizing a specific tag such as "Chapter 1".

Source

pub fn space_before(&self) -> Option<f32>

The spacing before the block-level element.

Source

pub fn set_space_before(&mut self, space_before: Option<f32>)

Set the spacing before the block-level element.

Source

pub fn with_space_before(self, space_before: Option<f32>) -> Self

Set the spacing before the block-level element.

Source

pub fn space_after(&self) -> Option<f32>

The spacing after the block-level element.

Source

pub fn set_space_after(&mut self, space_after: Option<f32>)

Set the spacing after the block-level element.

Source

pub fn with_space_after(self, space_after: Option<f32>) -> Self

Set the spacing after the block-level element.

Source

pub fn start_indent(&self) -> Option<f32>

The spacing between the start inline edge of the element and the parent.

Source

pub fn set_start_indent(&mut self, start_indent: Option<f32>)

Set the spacing between the start inline edge of the element and the parent.

Source

pub fn with_start_indent(self, start_indent: Option<f32>) -> Self

Set the spacing between the start inline edge of the element and the parent.

Source

pub fn end_indent(&self) -> Option<f32>

The spacing between the end inline edge of the element and the parent.

Source

pub fn set_end_indent(&mut self, end_indent: Option<f32>)

Set the spacing between the end inline edge of the element and the parent.

Source

pub fn with_end_indent(self, end_indent: Option<f32>) -> Self

Set the spacing between the end inline edge of the element and the parent.

Source

pub fn text_indent(&self) -> Option<f32>

The amount the first line of text in a block-level element is indented. Only applicable to paragraph-like elements with non-block-level elements.

Source

pub fn set_text_indent(&mut self, text_indent: Option<f32>)

Set the amount the first line of text in a block-level element is indented. Only applicable to paragraph-like elements with non-block-level elements.

Source

pub fn with_text_indent(self, text_indent: Option<f32>) -> Self

Set the amount the first line of text in a block-level element is indented. Only applicable to paragraph-like elements with non-block-level elements.

Source

pub fn text_align(&self) -> Option<TextAlign>

The text alignment.

Source

pub fn set_text_align(&mut self, text_align: Option<TextAlign>)

Set the text alignment.

Source

pub fn with_text_align(self, text_align: Option<TextAlign>) -> Self

Set the text alignment.

Source§

impl Tag<L>

Source

pub fn L(numbering: ListNumbering) -> Tag<L>

A list.

Best practice: Should consist of an optional caption followed by list items. List numbering is only required for PDF/UA, but we just enforce it for always.

Source

pub fn numbering(&self) -> ListNumbering

The list numbering.

Source

pub fn set_numbering(&mut self, numbering: ListNumbering)

Set the list numbering.

Source

pub fn with_numbering(self, numbering: ListNumbering) -> Self

Set the list numbering.

Source

pub fn space_before(&self) -> Option<f32>

The spacing before the block-level element.

Source

pub fn set_space_before(&mut self, space_before: Option<f32>)

Set the spacing before the block-level element.

Source

pub fn with_space_before(self, space_before: Option<f32>) -> Self

Set the spacing before the block-level element.

Source

pub fn space_after(&self) -> Option<f32>

The spacing after the block-level element.

Source

pub fn set_space_after(&mut self, space_after: Option<f32>)

Set the spacing after the block-level element.

Source

pub fn with_space_after(self, space_after: Option<f32>) -> Self

Set the spacing after the block-level element.

Source

pub fn start_indent(&self) -> Option<f32>

The spacing between the start inline edge of the element and the parent.

Source

pub fn set_start_indent(&mut self, start_indent: Option<f32>)

Set the spacing between the start inline edge of the element and the parent.

Source

pub fn with_start_indent(self, start_indent: Option<f32>) -> Self

Set the spacing between the start inline edge of the element and the parent.

Source

pub fn end_indent(&self) -> Option<f32>

The spacing between the end inline edge of the element and the parent.

Source

pub fn set_end_indent(&mut self, end_indent: Option<f32>)

Set the spacing between the end inline edge of the element and the parent.

Source

pub fn with_end_indent(self, end_indent: Option<f32>) -> Self

Set the spacing between the end inline edge of the element and the parent.

Source

pub fn text_indent(&self) -> Option<f32>

The amount the first line of text in a block-level element is indented. Only applicable to paragraph-like elements with non-block-level elements.

Source

pub fn set_text_indent(&mut self, text_indent: Option<f32>)

Set the amount the first line of text in a block-level element is indented. Only applicable to paragraph-like elements with non-block-level elements.

Source

pub fn with_text_indent(self, text_indent: Option<f32>) -> Self

Set the amount the first line of text in a block-level element is indented. Only applicable to paragraph-like elements with non-block-level elements.

Source

pub fn text_align(&self) -> Option<TextAlign>

The text alignment.

Source

pub fn set_text_align(&mut self, text_align: Option<TextAlign>)

Set the text alignment.

Source

pub fn with_text_align(self, text_align: Option<TextAlign>) -> Self

Set the text alignment.

Source§

impl Tag<LI>

Source

pub const LI: Tag<LI>

A list item.

Best practice: Should consist of one or more list labels and/or list bodies.

Source

pub fn space_before(&self) -> Option<f32>

The spacing before the block-level element.

Source

pub fn set_space_before(&mut self, space_before: Option<f32>)

Set the spacing before the block-level element.

Source

pub fn with_space_before(self, space_before: Option<f32>) -> Self

Set the spacing before the block-level element.

Source

pub fn space_after(&self) -> Option<f32>

The spacing after the block-level element.

Source

pub fn set_space_after(&mut self, space_after: Option<f32>)

Set the spacing after the block-level element.

Source

pub fn with_space_after(self, space_after: Option<f32>) -> Self

Set the spacing after the block-level element.

Source

pub fn start_indent(&self) -> Option<f32>

The spacing between the start inline edge of the element and the parent.

Source

pub fn set_start_indent(&mut self, start_indent: Option<f32>)

Set the spacing between the start inline edge of the element and the parent.

Source

pub fn with_start_indent(self, start_indent: Option<f32>) -> Self

Set the spacing between the start inline edge of the element and the parent.

Source

pub fn end_indent(&self) -> Option<f32>

The spacing between the end inline edge of the element and the parent.

Source

pub fn set_end_indent(&mut self, end_indent: Option<f32>)

Set the spacing between the end inline edge of the element and the parent.

Source

pub fn with_end_indent(self, end_indent: Option<f32>) -> Self

Set the spacing between the end inline edge of the element and the parent.

Source

pub fn text_indent(&self) -> Option<f32>

The amount the first line of text in a block-level element is indented. Only applicable to paragraph-like elements with non-block-level elements.

Source

pub fn set_text_indent(&mut self, text_indent: Option<f32>)

Set the amount the first line of text in a block-level element is indented. Only applicable to paragraph-like elements with non-block-level elements.

Source

pub fn with_text_indent(self, text_indent: Option<f32>) -> Self

Set the amount the first line of text in a block-level element is indented. Only applicable to paragraph-like elements with non-block-level elements.

Source

pub fn text_align(&self) -> Option<TextAlign>

The text alignment.

Source

pub fn set_text_align(&mut self, text_align: Option<TextAlign>)

Set the text alignment.

Source

pub fn with_text_align(self, text_align: Option<TextAlign>) -> Self

Set the text alignment.

Source§

impl Tag<Lbl>

Source

pub const Lbl: Tag<Lbl>

Label for a list item.

Source

pub fn space_before(&self) -> Option<f32>

The spacing before the block-level element.

Source

pub fn set_space_before(&mut self, space_before: Option<f32>)

Set the spacing before the block-level element.

Source

pub fn with_space_before(self, space_before: Option<f32>) -> Self

Set the spacing before the block-level element.

Source

pub fn space_after(&self) -> Option<f32>

The spacing after the block-level element.

Source

pub fn set_space_after(&mut self, space_after: Option<f32>)

Set the spacing after the block-level element.

Source

pub fn with_space_after(self, space_after: Option<f32>) -> Self

Set the spacing after the block-level element.

Source

pub fn start_indent(&self) -> Option<f32>

The spacing between the start inline edge of the element and the parent.

Source

pub fn set_start_indent(&mut self, start_indent: Option<f32>)

Set the spacing between the start inline edge of the element and the parent.

Source

pub fn with_start_indent(self, start_indent: Option<f32>) -> Self

Set the spacing between the start inline edge of the element and the parent.

Source

pub fn end_indent(&self) -> Option<f32>

The spacing between the end inline edge of the element and the parent.

Source

pub fn set_end_indent(&mut self, end_indent: Option<f32>)

Set the spacing between the end inline edge of the element and the parent.

Source

pub fn with_end_indent(self, end_indent: Option<f32>) -> Self

Set the spacing between the end inline edge of the element and the parent.

Source

pub fn text_indent(&self) -> Option<f32>

The amount the first line of text in a block-level element is indented. Only applicable to paragraph-like elements with non-block-level elements.

Source

pub fn set_text_indent(&mut self, text_indent: Option<f32>)

Set the amount the first line of text in a block-level element is indented. Only applicable to paragraph-like elements with non-block-level elements.

Source

pub fn with_text_indent(self, text_indent: Option<f32>) -> Self

Set the amount the first line of text in a block-level element is indented. Only applicable to paragraph-like elements with non-block-level elements.

Source

pub fn text_align(&self) -> Option<TextAlign>

The text alignment.

Source

pub fn set_text_align(&mut self, text_align: Option<TextAlign>)

Set the text alignment.

Source

pub fn with_text_align(self, text_align: Option<TextAlign>) -> Self

Set the text alignment.

Source§

impl Tag<LBody>

Source

pub const LBody: Tag<LBody>

Description of the list item.

Source

pub fn space_before(&self) -> Option<f32>

The spacing before the block-level element.

Source

pub fn set_space_before(&mut self, space_before: Option<f32>)

Set the spacing before the block-level element.

Source

pub fn with_space_before(self, space_before: Option<f32>) -> Self

Set the spacing before the block-level element.

Source

pub fn space_after(&self) -> Option<f32>

The spacing after the block-level element.

Source

pub fn set_space_after(&mut self, space_after: Option<f32>)

Set the spacing after the block-level element.

Source

pub fn with_space_after(self, space_after: Option<f32>) -> Self

Set the spacing after the block-level element.

Source

pub fn start_indent(&self) -> Option<f32>

The spacing between the start inline edge of the element and the parent.

Source

pub fn set_start_indent(&mut self, start_indent: Option<f32>)

Set the spacing between the start inline edge of the element and the parent.

Source

pub fn with_start_indent(self, start_indent: Option<f32>) -> Self

Set the spacing between the start inline edge of the element and the parent.

Source

pub fn end_indent(&self) -> Option<f32>

The spacing between the end inline edge of the element and the parent.

Source

pub fn set_end_indent(&mut self, end_indent: Option<f32>)

Set the spacing between the end inline edge of the element and the parent.

Source

pub fn with_end_indent(self, end_indent: Option<f32>) -> Self

Set the spacing between the end inline edge of the element and the parent.

Source

pub fn text_indent(&self) -> Option<f32>

The amount the first line of text in a block-level element is indented. Only applicable to paragraph-like elements with non-block-level elements.

Source

pub fn set_text_indent(&mut self, text_indent: Option<f32>)

Set the amount the first line of text in a block-level element is indented. Only applicable to paragraph-like elements with non-block-level elements.

Source

pub fn with_text_indent(self, text_indent: Option<f32>) -> Self

Set the amount the first line of text in a block-level element is indented. Only applicable to paragraph-like elements with non-block-level elements.

Source

pub fn text_align(&self) -> Option<TextAlign>

The text alignment.

Source

pub fn set_text_align(&mut self, text_align: Option<TextAlign>)

Set the text alignment.

Source

pub fn with_text_align(self, text_align: Option<TextAlign>) -> Self

Set the text alignment.

Source§

impl Tag<Table>

Source

pub const Table: Tag<Table>

A table, with an optional summary describing the purpose and structure.

Best practice: Should consist of an optional table header row, one or more table body elements and an optional table footer. Can have caption as the first or last child.

Source

pub fn summary(&self) -> Option<&str>

The table summary.

Source

pub fn set_summary(&mut self, summary: Option<String>)

Set the table summary.

Source

pub fn with_summary(self, summary: Option<String>) -> Self

Set the table summary.

Source

pub fn bbox(&self) -> Option<BBox>

The bounding box of a tag that encloses its visible content. If the content spans multiple pages, this should be omitted.

Source

pub fn set_bbox(&mut self, bbox: Option<BBox>)

Set the bounding box of a tag that encloses its visible content. If the content spans multiple pages, this should be omitted.

Source

pub fn with_bbox(self, bbox: Option<BBox>) -> Self

Set the bounding box of a tag that encloses its visible content. If the content spans multiple pages, this should be omitted.

Source

pub fn width(&self) -> Option<f32>

The width.

Source

pub fn set_width(&mut self, width: Option<f32>)

Set the width.

Source

pub fn with_width(self, width: Option<f32>) -> Self

Set the width.

Source

pub fn height(&self) -> Option<f32>

The height.

Source

pub fn set_height(&mut self, height: Option<f32>)

Set the height.

Source

pub fn with_height(self, height: Option<f32>) -> Self

Set the height.

Source

pub fn space_before(&self) -> Option<f32>

The spacing before the block-level element.

Source

pub fn set_space_before(&mut self, space_before: Option<f32>)

Set the spacing before the block-level element.

Source

pub fn with_space_before(self, space_before: Option<f32>) -> Self

Set the spacing before the block-level element.

Source

pub fn space_after(&self) -> Option<f32>

The spacing after the block-level element.

Source

pub fn set_space_after(&mut self, space_after: Option<f32>)

Set the spacing after the block-level element.

Source

pub fn with_space_after(self, space_after: Option<f32>) -> Self

Set the spacing after the block-level element.

Source

pub fn start_indent(&self) -> Option<f32>

The spacing between the start inline edge of the element and the parent.

Source

pub fn set_start_indent(&mut self, start_indent: Option<f32>)

Set the spacing between the start inline edge of the element and the parent.

Source

pub fn with_start_indent(self, start_indent: Option<f32>) -> Self

Set the spacing between the start inline edge of the element and the parent.

Source

pub fn end_indent(&self) -> Option<f32>

The spacing between the end inline edge of the element and the parent.

Source

pub fn set_end_indent(&mut self, end_indent: Option<f32>)

Set the spacing between the end inline edge of the element and the parent.

Source

pub fn with_end_indent(self, end_indent: Option<f32>) -> Self

Set the spacing between the end inline edge of the element and the parent.

Source

pub fn text_indent(&self) -> Option<f32>

The amount the first line of text in a block-level element is indented. Only applicable to paragraph-like elements with non-block-level elements.

Source

pub fn set_text_indent(&mut self, text_indent: Option<f32>)

Set the amount the first line of text in a block-level element is indented. Only applicable to paragraph-like elements with non-block-level elements.

Source

pub fn with_text_indent(self, text_indent: Option<f32>) -> Self

Set the amount the first line of text in a block-level element is indented. Only applicable to paragraph-like elements with non-block-level elements.

Source

pub fn text_align(&self) -> Option<TextAlign>

The text alignment.

Source

pub fn set_text_align(&mut self, text_align: Option<TextAlign>)

Set the text alignment.

Source

pub fn with_text_align(self, text_align: Option<TextAlign>) -> Self

Set the text alignment.

Source§

impl Tag<TR>

Source

pub const TR: Tag<TR>

A table row.

Best practice: May contain table headers cells and table data cells.

Source§

impl Tag<TH>

Source

pub fn TH(scope: TableHeaderScope) -> Tag<TH>

A table header cell.

Source

pub fn scope(&self) -> TableHeaderScope

The table header scope.

Source

pub fn set_scope(&mut self, scope: TableHeaderScope)

Set the table header scope.

Source

pub fn with_scope(self, scope: TableHeaderScope) -> Self

Set the table header scope.

Source

pub fn headers(&self) -> Option<&[TagId]>

The list of headers associated with a table cell. Table data cells (TD) may specify a list of table headers (TH), which can also specify a list of parent header cells (TH), and so on. To determine the list of associated headers this list is recursively evaluated.

This allows specifying header hierarchies inside tables.

Source

pub fn set_headers(&mut self, headers: Option<impl IntoIterator<Item = TagId>>)

Set the list of headers associated with a table cell. Table data cells (TD) may specify a list of table headers (TH), which can also specify a list of parent header cells (TH), and so on. To determine the list of associated headers this list is recursively evaluated.

This allows specifying header hierarchies inside tables.

Source

pub fn with_headers( self, headers: Option<impl IntoIterator<Item = TagId>>, ) -> Self

Set the list of headers associated with a table cell. Table data cells (TD) may specify a list of table headers (TH), which can also specify a list of parent header cells (TH), and so on. To determine the list of associated headers this list is recursively evaluated.

This allows specifying header hierarchies inside tables.

Source

pub fn row_span(&self) -> Option<NonZeroU32>

The row span of this table cell.

Source

pub fn set_row_span(&mut self, row_span: Option<NonZeroU32>)

Set the row span of this table cell.

Source

pub fn with_row_span(self, row_span: Option<NonZeroU32>) -> Self

Set the row span of this table cell.

Source

pub fn col_span(&self) -> Option<NonZeroU32>

The column span of this table cell.

Source

pub fn set_col_span(&mut self, col_span: Option<NonZeroU32>)

Set the column span of this table cell.

Source

pub fn with_col_span(self, col_span: Option<NonZeroU32>) -> Self

Set the column span of this table cell.

Source

pub fn width(&self) -> Option<f32>

The width.

Source

pub fn set_width(&mut self, width: Option<f32>)

Set the width.

Source

pub fn with_width(self, width: Option<f32>) -> Self

Set the width.

Source

pub fn height(&self) -> Option<f32>

The height.

Source

pub fn set_height(&mut self, height: Option<f32>)

Set the height.

Source

pub fn with_height(self, height: Option<f32>) -> Self

Set the height.

Source

pub fn table_border_style(&self) -> Option<Sides<BorderStyle>>

The border style of table cells, overriding BorderStyle.

Source

pub fn set_table_border_style( &mut self, table_border_style: Option<Sides<BorderStyle>>, )

Set the border style of table cells, overriding BorderStyle.

Source

pub fn with_table_border_style( self, table_border_style: Option<Sides<BorderStyle>>, ) -> Self

Set the border style of table cells, overriding BorderStyle.

Source

pub fn table_padding(&self) -> Option<Sides<f32>>

The padding inside of table cells, overriding Padding.

Source

pub fn set_table_padding(&mut self, table_padding: Option<Sides<f32>>)

Set the padding inside of table cells, overriding Padding.

Source

pub fn with_table_padding(self, table_padding: Option<Sides<f32>>) -> Self

Set the padding inside of table cells, overriding Padding.

Source

pub fn block_align(&self) -> Option<BlockAlign>

The alignment of block-level elements inside of this block-level element.

Source

pub fn set_block_align(&mut self, block_align: Option<BlockAlign>)

Set the alignment of block-level elements inside of this block-level element.

Source

pub fn with_block_align(self, block_align: Option<BlockAlign>) -> Self

Set the alignment of block-level elements inside of this block-level element.

Source

pub fn inline_align(&self) -> Option<InlineAlign>

The alignment of inline-level elements inside of this block-level element.

Source

pub fn set_inline_align(&mut self, inline_align: Option<InlineAlign>)

Set the alignment of inline-level elements inside of this block-level element.

Source

pub fn with_inline_align(self, inline_align: Option<InlineAlign>) -> Self

Set the alignment of inline-level elements inside of this block-level element.

Source§

impl Tag<TD>

Source

pub const TD: Tag<TD>

A table data cell.

Source

pub fn headers(&self) -> Option<&[TagId]>

The list of headers associated with a table cell. Table data cells (TD) may specify a list of table headers (TH), which can also specify a list of parent header cells (TH), and so on. To determine the list of associated headers this list is recursively evaluated.

This allows specifying header hierarchies inside tables.

Source

pub fn set_headers(&mut self, headers: Option<impl IntoIterator<Item = TagId>>)

Set the list of headers associated with a table cell. Table data cells (TD) may specify a list of table headers (TH), which can also specify a list of parent header cells (TH), and so on. To determine the list of associated headers this list is recursively evaluated.

This allows specifying header hierarchies inside tables.

Source

pub fn with_headers( self, headers: Option<impl IntoIterator<Item = TagId>>, ) -> Self

Set the list of headers associated with a table cell. Table data cells (TD) may specify a list of table headers (TH), which can also specify a list of parent header cells (TH), and so on. To determine the list of associated headers this list is recursively evaluated.

This allows specifying header hierarchies inside tables.

Source

pub fn row_span(&self) -> Option<NonZeroU32>

The row span of this table cell.

Source

pub fn set_row_span(&mut self, row_span: Option<NonZeroU32>)

Set the row span of this table cell.

Source

pub fn with_row_span(self, row_span: Option<NonZeroU32>) -> Self

Set the row span of this table cell.

Source

pub fn col_span(&self) -> Option<NonZeroU32>

The column span of this table cell.

Source

pub fn set_col_span(&mut self, col_span: Option<NonZeroU32>)

Set the column span of this table cell.

Source

pub fn with_col_span(self, col_span: Option<NonZeroU32>) -> Self

Set the column span of this table cell.

Source

pub fn width(&self) -> Option<f32>

The width.

Source

pub fn set_width(&mut self, width: Option<f32>)

Set the width.

Source

pub fn with_width(self, width: Option<f32>) -> Self

Set the width.

Source

pub fn height(&self) -> Option<f32>

The height.

Source

pub fn set_height(&mut self, height: Option<f32>)

Set the height.

Source

pub fn with_height(self, height: Option<f32>) -> Self

Set the height.

Source

pub fn table_border_style(&self) -> Option<Sides<BorderStyle>>

The border style of table cells, overriding BorderStyle.

Source

pub fn set_table_border_style( &mut self, table_border_style: Option<Sides<BorderStyle>>, )

Set the border style of table cells, overriding BorderStyle.

Source

pub fn with_table_border_style( self, table_border_style: Option<Sides<BorderStyle>>, ) -> Self

Set the border style of table cells, overriding BorderStyle.

Source

pub fn table_padding(&self) -> Option<Sides<f32>>

The padding inside of table cells, overriding Padding.

Source

pub fn set_table_padding(&mut self, table_padding: Option<Sides<f32>>)

Set the padding inside of table cells, overriding Padding.

Source

pub fn with_table_padding(self, table_padding: Option<Sides<f32>>) -> Self

Set the padding inside of table cells, overriding Padding.

Source

pub fn block_align(&self) -> Option<BlockAlign>

The alignment of block-level elements inside of this block-level element.

Source

pub fn set_block_align(&mut self, block_align: Option<BlockAlign>)

Set the alignment of block-level elements inside of this block-level element.

Source

pub fn with_block_align(self, block_align: Option<BlockAlign>) -> Self

Set the alignment of block-level elements inside of this block-level element.

Source

pub fn inline_align(&self) -> Option<InlineAlign>

The alignment of inline-level elements inside of this block-level element.

Source

pub fn set_inline_align(&mut self, inline_align: Option<InlineAlign>)

Set the alignment of inline-level elements inside of this block-level element.

Source

pub fn with_inline_align(self, inline_align: Option<InlineAlign>) -> Self

Set the alignment of inline-level elements inside of this block-level element.

Source§

impl Tag<THead>

Source

pub const THead: Tag<THead>

A table header row group.

Source§

impl Tag<TBody>

Source

pub const TBody: Tag<TBody>

A table data row group.

Source§

impl Tag<TFoot>

Source

pub const TFoot: Tag<TFoot>

A table footer row group.

Source§

impl Tag<Span>

Source

pub const Span: Tag<Span>

An inline-level element that does not have a specific meaning.

Source

pub fn space_before(&self) -> Option<f32>

The spacing before the block-level element.

Source

pub fn set_space_before(&mut self, space_before: Option<f32>)

Set the spacing before the block-level element.

Source

pub fn with_space_before(self, space_before: Option<f32>) -> Self

Set the spacing before the block-level element.

Source

pub fn space_after(&self) -> Option<f32>

The spacing after the block-level element.

Source

pub fn set_space_after(&mut self, space_after: Option<f32>)

Set the spacing after the block-level element.

Source

pub fn with_space_after(self, space_after: Option<f32>) -> Self

Set the spacing after the block-level element.

Source

pub fn start_indent(&self) -> Option<f32>

The spacing between the start inline edge of the element and the parent.

Source

pub fn set_start_indent(&mut self, start_indent: Option<f32>)

Set the spacing between the start inline edge of the element and the parent.

Source

pub fn with_start_indent(self, start_indent: Option<f32>) -> Self

Set the spacing between the start inline edge of the element and the parent.

Source

pub fn end_indent(&self) -> Option<f32>

The spacing between the end inline edge of the element and the parent.

Source

pub fn set_end_indent(&mut self, end_indent: Option<f32>)

Set the spacing between the end inline edge of the element and the parent.

Source

pub fn with_end_indent(self, end_indent: Option<f32>) -> Self

Set the spacing between the end inline edge of the element and the parent.

Source§

impl Tag<InlineQuote>

Source

pub const InlineQuote: Tag<InlineQuote>

An inline quotation.

Source

pub fn space_before(&self) -> Option<f32>

The spacing before the block-level element.

Source

pub fn set_space_before(&mut self, space_before: Option<f32>)

Set the spacing before the block-level element.

Source

pub fn with_space_before(self, space_before: Option<f32>) -> Self

Set the spacing before the block-level element.

Source

pub fn space_after(&self) -> Option<f32>

The spacing after the block-level element.

Source

pub fn set_space_after(&mut self, space_after: Option<f32>)

Set the spacing after the block-level element.

Source

pub fn with_space_after(self, space_after: Option<f32>) -> Self

Set the spacing after the block-level element.

Source

pub fn start_indent(&self) -> Option<f32>

The spacing between the start inline edge of the element and the parent.

Source

pub fn set_start_indent(&mut self, start_indent: Option<f32>)

Set the spacing between the start inline edge of the element and the parent.

Source

pub fn with_start_indent(self, start_indent: Option<f32>) -> Self

Set the spacing between the start inline edge of the element and the parent.

Source

pub fn end_indent(&self) -> Option<f32>

The spacing between the end inline edge of the element and the parent.

Source

pub fn set_end_indent(&mut self, end_indent: Option<f32>)

Set the spacing between the end inline edge of the element and the parent.

Source

pub fn with_end_indent(self, end_indent: Option<f32>) -> Self

Set the spacing between the end inline edge of the element and the parent.

Source§

impl Tag<Note>

Source

pub const Note: Tag<Note>

A foot- or endnote, potentially referred to from within the text.

Best practice: It may have a label as a child.

Source

pub fn space_before(&self) -> Option<f32>

The spacing before the block-level element.

Source

pub fn set_space_before(&mut self, space_before: Option<f32>)

Set the spacing before the block-level element.

Source

pub fn with_space_before(self, space_before: Option<f32>) -> Self

Set the spacing before the block-level element.

Source

pub fn space_after(&self) -> Option<f32>

The spacing after the block-level element.

Source

pub fn set_space_after(&mut self, space_after: Option<f32>)

Set the spacing after the block-level element.

Source

pub fn with_space_after(self, space_after: Option<f32>) -> Self

Set the spacing after the block-level element.

Source

pub fn start_indent(&self) -> Option<f32>

The spacing between the start inline edge of the element and the parent.

Source

pub fn set_start_indent(&mut self, start_indent: Option<f32>)

Set the spacing between the start inline edge of the element and the parent.

Source

pub fn with_start_indent(self, start_indent: Option<f32>) -> Self

Set the spacing between the start inline edge of the element and the parent.

Source

pub fn end_indent(&self) -> Option<f32>

The spacing between the end inline edge of the element and the parent.

Source

pub fn set_end_indent(&mut self, end_indent: Option<f32>)

Set the spacing between the end inline edge of the element and the parent.

Source

pub fn with_end_indent(self, end_indent: Option<f32>) -> Self

Set the spacing between the end inline edge of the element and the parent.

Source§

impl Tag<Reference>

Source

pub const Reference: Tag<Reference>

A reference to elsewhere in the document.

Best practice: The first child of a tag group with this tag should be a link annotation linking to a destination in the document, and the second child should consist of the children that should be associated with that reference.

Source

pub fn space_before(&self) -> Option<f32>

The spacing before the block-level element.

Source

pub fn set_space_before(&mut self, space_before: Option<f32>)

Set the spacing before the block-level element.

Source

pub fn with_space_before(self, space_before: Option<f32>) -> Self

Set the spacing before the block-level element.

Source

pub fn space_after(&self) -> Option<f32>

The spacing after the block-level element.

Source

pub fn set_space_after(&mut self, space_after: Option<f32>)

Set the spacing after the block-level element.

Source

pub fn with_space_after(self, space_after: Option<f32>) -> Self

Set the spacing after the block-level element.

Source

pub fn start_indent(&self) -> Option<f32>

The spacing between the start inline edge of the element and the parent.

Source

pub fn set_start_indent(&mut self, start_indent: Option<f32>)

Set the spacing between the start inline edge of the element and the parent.

Source

pub fn with_start_indent(self, start_indent: Option<f32>) -> Self

Set the spacing between the start inline edge of the element and the parent.

Source

pub fn end_indent(&self) -> Option<f32>

The spacing between the end inline edge of the element and the parent.

Source

pub fn set_end_indent(&mut self, end_indent: Option<f32>)

Set the spacing between the end inline edge of the element and the parent.

Source

pub fn with_end_indent(self, end_indent: Option<f32>) -> Self

Set the spacing between the end inline edge of the element and the parent.

Source§

impl Tag<BibEntry>

Source

pub const BibEntry: Tag<BibEntry>

A reference to the external source of some cited document.

Best practice: It may have a label as a child.

Source

pub fn space_before(&self) -> Option<f32>

The spacing before the block-level element.

Source

pub fn set_space_before(&mut self, space_before: Option<f32>)

Set the spacing before the block-level element.

Source

pub fn with_space_before(self, space_before: Option<f32>) -> Self

Set the spacing before the block-level element.

Source

pub fn space_after(&self) -> Option<f32>

The spacing after the block-level element.

Source

pub fn set_space_after(&mut self, space_after: Option<f32>)

Set the spacing after the block-level element.

Source

pub fn with_space_after(self, space_after: Option<f32>) -> Self

Set the spacing after the block-level element.

Source

pub fn start_indent(&self) -> Option<f32>

The spacing between the start inline edge of the element and the parent.

Source

pub fn set_start_indent(&mut self, start_indent: Option<f32>)

Set the spacing between the start inline edge of the element and the parent.

Source

pub fn with_start_indent(self, start_indent: Option<f32>) -> Self

Set the spacing between the start inline edge of the element and the parent.

Source

pub fn end_indent(&self) -> Option<f32>

The spacing between the end inline edge of the element and the parent.

Source

pub fn set_end_indent(&mut self, end_indent: Option<f32>)

Set the spacing between the end inline edge of the element and the parent.

Source

pub fn with_end_indent(self, end_indent: Option<f32>) -> Self

Set the spacing between the end inline edge of the element and the parent.

Source§

impl Tag<Code>

Source

pub const Code: Tag<Code>

Computer code.

Source

pub fn space_before(&self) -> Option<f32>

The spacing before the block-level element.

Source

pub fn set_space_before(&mut self, space_before: Option<f32>)

Set the spacing before the block-level element.

Source

pub fn with_space_before(self, space_before: Option<f32>) -> Self

Set the spacing before the block-level element.

Source

pub fn space_after(&self) -> Option<f32>

The spacing after the block-level element.

Source

pub fn set_space_after(&mut self, space_after: Option<f32>)

Set the spacing after the block-level element.

Source

pub fn with_space_after(self, space_after: Option<f32>) -> Self

Set the spacing after the block-level element.

Source

pub fn start_indent(&self) -> Option<f32>

The spacing between the start inline edge of the element and the parent.

Source

pub fn set_start_indent(&mut self, start_indent: Option<f32>)

Set the spacing between the start inline edge of the element and the parent.

Source

pub fn with_start_indent(self, start_indent: Option<f32>) -> Self

Set the spacing between the start inline edge of the element and the parent.

Source

pub fn end_indent(&self) -> Option<f32>

The spacing between the end inline edge of the element and the parent.

Source

pub fn set_end_indent(&mut self, end_indent: Option<f32>)

Set the spacing between the end inline edge of the element and the parent.

Source

pub fn with_end_indent(self, end_indent: Option<f32>) -> Self

Set the spacing between the end inline edge of the element and the parent.

Source§

impl Tag<Link>

A link.

Best practice: The first child of a tag group with this tag should be a link annotation linking to an URL, and the second child should consist of the children that should be associated with that link.

Source

pub fn space_before(&self) -> Option<f32>

The spacing before the block-level element.

Source

pub fn set_space_before(&mut self, space_before: Option<f32>)

Set the spacing before the block-level element.

Source

pub fn with_space_before(self, space_before: Option<f32>) -> Self

Set the spacing before the block-level element.

Source

pub fn space_after(&self) -> Option<f32>

The spacing after the block-level element.

Source

pub fn set_space_after(&mut self, space_after: Option<f32>)

Set the spacing after the block-level element.

Source

pub fn with_space_after(self, space_after: Option<f32>) -> Self

Set the spacing after the block-level element.

Source

pub fn start_indent(&self) -> Option<f32>

The spacing between the start inline edge of the element and the parent.

Source

pub fn set_start_indent(&mut self, start_indent: Option<f32>)

Set the spacing between the start inline edge of the element and the parent.

Source

pub fn with_start_indent(self, start_indent: Option<f32>) -> Self

Set the spacing between the start inline edge of the element and the parent.

Source

pub fn end_indent(&self) -> Option<f32>

The spacing between the end inline edge of the element and the parent.

Source

pub fn set_end_indent(&mut self, end_indent: Option<f32>)

Set the spacing between the end inline edge of the element and the parent.

Source

pub fn with_end_indent(self, end_indent: Option<f32>) -> Self

Set the spacing between the end inline edge of the element and the parent.

Source§

impl Tag<Annot>

Source

pub const Annot: Tag<Annot>

An association between an annotation and the content it belongs to. PDF

Best practice: Should be used for all annotations, except for link annotations and widget annotations. The first child should be the identifier of a non-link annotation, and all other subsequent children should be content identifiers associated with that annotation.

Source

pub fn space_before(&self) -> Option<f32>

The spacing before the block-level element.

Source

pub fn set_space_before(&mut self, space_before: Option<f32>)

Set the spacing before the block-level element.

Source

pub fn with_space_before(self, space_before: Option<f32>) -> Self

Set the spacing before the block-level element.

Source

pub fn space_after(&self) -> Option<f32>

The spacing after the block-level element.

Source

pub fn set_space_after(&mut self, space_after: Option<f32>)

Set the spacing after the block-level element.

Source

pub fn with_space_after(self, space_after: Option<f32>) -> Self

Set the spacing after the block-level element.

Source

pub fn start_indent(&self) -> Option<f32>

The spacing between the start inline edge of the element and the parent.

Source

pub fn set_start_indent(&mut self, start_indent: Option<f32>)

Set the spacing between the start inline edge of the element and the parent.

Source

pub fn with_start_indent(self, start_indent: Option<f32>) -> Self

Set the spacing between the start inline edge of the element and the parent.

Source

pub fn end_indent(&self) -> Option<f32>

The spacing between the end inline edge of the element and the parent.

Source

pub fn set_end_indent(&mut self, end_indent: Option<f32>)

Set the spacing between the end inline edge of the element and the parent.

Source

pub fn with_end_indent(self, end_indent: Option<f32>) -> Self

Set the spacing between the end inline edge of the element and the parent.

Source§

impl Tag<Figure>

Source

pub fn Figure(alt_text: Option<String>) -> Tag<Figure>

Item of graphical content.

Providing alt_text is required in some export modes, like for example PDF/UA-1.

Source

pub fn bbox(&self) -> Option<BBox>

The bounding box of a tag that encloses its visible content. If the content spans multiple pages, this should be omitted.

Source

pub fn set_bbox(&mut self, bbox: Option<BBox>)

Set the bounding box of a tag that encloses its visible content. If the content spans multiple pages, this should be omitted.

Source

pub fn with_bbox(self, bbox: Option<BBox>) -> Self

Set the bounding box of a tag that encloses its visible content. If the content spans multiple pages, this should be omitted.

Source

pub fn width(&self) -> Option<f32>

The width.

Source

pub fn set_width(&mut self, width: Option<f32>)

Set the width.

Source

pub fn with_width(self, width: Option<f32>) -> Self

Set the width.

Source

pub fn height(&self) -> Option<f32>

The height.

Source

pub fn set_height(&mut self, height: Option<f32>)

Set the height.

Source

pub fn with_height(self, height: Option<f32>) -> Self

Set the height.

Source§

impl Tag<Formula>

Source

pub fn Formula(alt_text: Option<String>) -> Tag<Formula>

A mathematical formula.

Providing alt_text is required in some export modes, like for example PDF/UA-1.

Source

pub fn bbox(&self) -> Option<BBox>

The bounding box of a tag that encloses its visible content. If the content spans multiple pages, this should be omitted.

Source

pub fn set_bbox(&mut self, bbox: Option<BBox>)

Set the bounding box of a tag that encloses its visible content. If the content spans multiple pages, this should be omitted.

Source

pub fn with_bbox(self, bbox: Option<BBox>) -> Self

Set the bounding box of a tag that encloses its visible content. If the content spans multiple pages, this should be omitted.

Source

pub fn width(&self) -> Option<f32>

The width.

Source

pub fn set_width(&mut self, width: Option<f32>)

Set the width.

Source

pub fn with_width(self, width: Option<f32>) -> Self

Set the width.

Source

pub fn height(&self) -> Option<f32>

The height.

Source

pub fn set_height(&mut self, height: Option<f32>)

Set the height.

Source

pub fn with_height(self, height: Option<f32>) -> Self

Set the height.

Source§

impl Tag<Form>

Source

pub const Form: Tag<Form>

An interactive form field.

Source§

impl Tag<NonStruct>

Source

pub const NonStruct: Tag<NonStruct>

Non-structural element. A grouping element having no inherent structural significance; it serves solely for grouping purposes.

Source§

impl Tag<Datetime>

Source

pub const Datetime: Tag<Datetime>

A date or time.

Source§

impl Tag<Terms>

Source

pub const Terms: Tag<Terms>

A list of terms.

Source§

impl Tag<Title>

Source

pub const Title: Tag<Title>

A title.

Source§

impl Tag<Strong>

Source

pub const Strong: Tag<Strong>

Encloses content with strong importance, most commonly bold text.

Source§

impl Tag<Em>

Source

pub const Em: Tag<Em>

Encloses content that is emphasized, most commonly italic text.

Source§

impl<T> Tag<T>

Source

pub fn as_any(&self) -> &AnyTag

A raw tag, which allows reading all attributes.

Source

pub fn as_any_mut(&mut self) -> &mut AnyTag

A raw tag, which allows reading all attributes and additionally writing all global ones.

Source

pub fn location(&self) -> Option<Location>

Get the location.

Source

pub fn set_location(&mut self, location: Option<Location>)

Set the location.

Source

pub fn with_location(self, location: Option<Location>) -> Self

Set the location.

Trait Implementations§

Source§

impl<T: Clone> Clone for Tag<T>

Source§

fn clone(&self) -> Tag<T>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<T: Debug> Debug for Tag<T>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<Tag<Annot>> for TagKind

Source§

fn from(value: Tag<Annot>) -> Self

Converts to this type from the input type.
Source§

impl From<Tag<Article>> for TagKind

Source§

fn from(value: Tag<Article>) -> Self

Converts to this type from the input type.
Source§

impl From<Tag<BibEntry>> for TagKind

Source§

fn from(value: Tag<BibEntry>) -> Self

Converts to this type from the input type.
Source§

impl From<Tag<BlockQuote>> for TagKind

Source§

fn from(value: Tag<BlockQuote>) -> Self

Converts to this type from the input type.
Source§

impl From<Tag<Caption>> for TagKind

Source§

fn from(value: Tag<Caption>) -> Self

Converts to this type from the input type.
Source§

impl From<Tag<Code>> for TagKind

Source§

fn from(value: Tag<Code>) -> Self

Converts to this type from the input type.
Source§

impl From<Tag<Datetime>> for TagKind

Source§

fn from(value: Tag<Datetime>) -> Self

Converts to this type from the input type.
Source§

impl From<Tag<Div>> for TagKind

Source§

fn from(value: Tag<Div>) -> Self

Converts to this type from the input type.
Source§

impl From<Tag<Em>> for TagKind

Source§

fn from(value: Tag<Em>) -> Self

Converts to this type from the input type.
Source§

impl From<Tag<Figure>> for TagKind

Source§

fn from(value: Tag<Figure>) -> Self

Converts to this type from the input type.
Source§

impl From<Tag<Form>> for TagKind

Source§

fn from(value: Tag<Form>) -> Self

Converts to this type from the input type.
Source§

impl From<Tag<Formula>> for TagKind

Source§

fn from(value: Tag<Formula>) -> Self

Converts to this type from the input type.
Source§

impl From<Tag<Hn>> for TagKind

Source§

fn from(value: Tag<Hn>) -> Self

Converts to this type from the input type.
Source§

impl From<Tag<Index>> for TagKind

Source§

fn from(value: Tag<Index>) -> Self

Converts to this type from the input type.
Source§

impl From<Tag<InlineQuote>> for TagKind

Source§

fn from(value: Tag<InlineQuote>) -> Self

Converts to this type from the input type.
Source§

impl From<Tag<L>> for TagKind

Source§

fn from(value: Tag<L>) -> Self

Converts to this type from the input type.
Source§

impl From<Tag<LBody>> for TagKind

Source§

fn from(value: Tag<LBody>) -> Self

Converts to this type from the input type.
Source§

impl From<Tag<LI>> for TagKind

Source§

fn from(value: Tag<LI>) -> Self

Converts to this type from the input type.
Source§

impl From<Tag<Lbl>> for TagKind

Source§

fn from(value: Tag<Lbl>) -> Self

Converts to this type from the input type.
Source§

impl From<Tag<Link>> for TagKind

Source§

fn from(value: Tag<Link>) -> Self

Converts to this type from the input type.
Source§

impl From<Tag<NonStruct>> for TagKind

Source§

fn from(value: Tag<NonStruct>) -> Self

Converts to this type from the input type.
Source§

impl From<Tag<Note>> for TagKind

Source§

fn from(value: Tag<Note>) -> Self

Converts to this type from the input type.
Source§

impl From<Tag<P>> for TagKind

Source§

fn from(value: Tag<P>) -> Self

Converts to this type from the input type.
Source§

impl From<Tag<Part>> for TagKind

Source§

fn from(value: Tag<Part>) -> Self

Converts to this type from the input type.
Source§

impl From<Tag<Reference>> for TagKind

Source§

fn from(value: Tag<Reference>) -> Self

Converts to this type from the input type.
Source§

impl From<Tag<Section>> for TagKind

Source§

fn from(value: Tag<Section>) -> Self

Converts to this type from the input type.
Source§

impl From<Tag<Span>> for TagKind

Source§

fn from(value: Tag<Span>) -> Self

Converts to this type from the input type.
Source§

impl From<Tag<Strong>> for TagKind

Source§

fn from(value: Tag<Strong>) -> Self

Converts to this type from the input type.
Source§

impl From<Tag<TBody>> for TagKind

Source§

fn from(value: Tag<TBody>) -> Self

Converts to this type from the input type.
Source§

impl From<Tag<TD>> for TagKind

Source§

fn from(value: Tag<TD>) -> Self

Converts to this type from the input type.
Source§

impl From<Tag<TFoot>> for TagKind

Source§

fn from(value: Tag<TFoot>) -> Self

Converts to this type from the input type.
Source§

impl From<Tag<TH>> for TagKind

Source§

fn from(value: Tag<TH>) -> Self

Converts to this type from the input type.
Source§

impl From<Tag<THead>> for TagKind

Source§

fn from(value: Tag<THead>) -> Self

Converts to this type from the input type.
Source§

impl From<Tag<TOC>> for TagKind

Source§

fn from(value: Tag<TOC>) -> Self

Converts to this type from the input type.
Source§

impl From<Tag<TOCI>> for TagKind

Source§

fn from(value: Tag<TOCI>) -> Self

Converts to this type from the input type.
Source§

impl From<Tag<TR>> for TagKind

Source§

fn from(value: Tag<TR>) -> Self

Converts to this type from the input type.
Source§

impl From<Tag<Table>> for TagKind

Source§

fn from(value: Tag<Table>) -> Self

Converts to this type from the input type.
Source§

impl From<Tag<Terms>> for TagKind

Source§

fn from(value: Tag<Terms>) -> Self

Converts to this type from the input type.
Source§

impl From<Tag<Title>> for TagKind

Source§

fn from(value: Tag<Title>) -> Self

Converts to this type from the input type.
Source§

impl<T: PartialEq> PartialEq for Tag<T>

Source§

fn eq(&self, other: &Tag<T>) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl<T: PartialEq> StructuralPartialEq for Tag<T>

Auto Trait Implementations§

§

impl<T> Freeze for Tag<T>

§

impl<T> RefUnwindSafe for Tag<T>
where T: RefUnwindSafe,

§

impl<T> Send for Tag<T>
where T: Send,

§

impl<T> Sync for Tag<T>
where T: Sync,

§

impl<T> Unpin for Tag<T>
where T: Unpin,

§

impl<T> UnsafeUnpin for Tag<T>

§

impl<T> UnwindSafe for Tag<T>
where T: UnwindSafe,

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> Finish for T

Source§

fn finish(self)

Does nothing but move self, equivalent to drop.
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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<U, T> ToOwnedObj<U> for T
where U: FromObjRef<T>,

Source§

fn to_owned_obj(&self, data: FontData<'_>) -> U

Convert this type into T, using the provided data to resolve any offsets.
Source§

impl<U, T> ToOwnedTable<U> for T
where U: FromTableRef<T>,

Source§

fn to_owned_table(&self) -> U

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.