Struct genpdf::elements::LinearLayout[][src]

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

Arranges a list of elements sequentially.

Currently, elements can only be arranged vertically.

Examples

With setters:

use genpdf::elements;
let mut layout = elements::LinearLayout::vertical();
layout.push(elements::Paragraph::new("Test1"));
layout.push(elements::Paragraph::new("Test2"));

Chained:

use genpdf::elements;
let layout = elements::LinearLayout::vertical()
    .element(elements::Paragraph::new("Test1"))
    .element(elements::Paragraph::new("Test2"));

Implementations

Creates a new linear layout that arranges its elements vertically.

Adds the given element to this layout.

Adds the given element to this layout and it returns the layout.

Trait Implementations

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.