Struct genpdf::elements::PaddedElement [−][src]
pub struct PaddedElement<E: Element> { /* fields omitted */ }
Expand description
Adds a padding to the wrapped element.
Examples
Direct usage:
use genpdf::elements; let p = elements::PaddedElement::new( elements::Paragraph::new("text"), genpdf::Margins::trbl(5, 2, 5, 10), );
Using Element::padded
:
use genpdf::{elements, Element as _}; let p = elements::Paragraph::new("text") .padded(genpdf::Margins::trbl(5, 2, 5, 10));
Implementations
Creates a new padded element that wraps the given element with the given padding.
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.
Auto Trait Implementations
impl<E> RefUnwindSafe for PaddedElement<E> where
E: RefUnwindSafe,
impl<E> Send for PaddedElement<E> where
E: Send,
impl<E> Sync for PaddedElement<E> where
E: Sync,
impl<E> Unpin for PaddedElement<E> where
E: Unpin,
impl<E> UnwindSafe for PaddedElement<E> where
E: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more