Struct genpdf::elements::OrderedList[][src]

pub struct OrderedList { /* fields omitted */ }
Expand description

An ordered list of elements with arabic numbers.

Examples

With setters:

use genpdf::elements;
let mut list = elements::OrderedList::new();
list.push(elements::Paragraph::new("first"));
list.push(elements::Paragraph::new("second"));
list.push(elements::Paragraph::new("third"));

With setters and a custom start number:

use genpdf::elements;
let mut list = elements::OrderedList::with_start(5);
list.push(elements::Paragraph::new("first"));
list.push(elements::Paragraph::new("second"));
list.push(elements::Paragraph::new("third"));

Chained:

use genpdf::elements;
let list = elements::OrderedList::new()
    .element(elements::Paragraph::new("first"))
    .element(elements::Paragraph::new("second"))
    .element(elements::Paragraph::new("third"));

Implementations

Creates a new ordered list starting at 1.

Creates a new ordered list with the given start number.

Adds an element to this list.

Adds an element to this list and returns the list.

Trait Implementations

Returns the “default value” for a type. Read more

Renders this element to the given area using the given style and font cache. Read more

Draws a frame around this element.

Adds a padding to this element.

Sets the default style for this element and its children.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.