[][src]Struct genpdf::Margins

pub struct Margins { /* fields omitted */ }

The margins of an area, measured in millimeters.

Implementations

impl Margins[src]

pub fn trbl(
    top: impl Into<Mm>,
    right: impl Into<Mm>,
    bottom: impl Into<Mm>,
    left: impl Into<Mm>
) -> Margins
[src]

Creates a new Margins instance from the given top, right, bottom and left margins.

pub fn vh(vertical: impl Into<Mm>, horizontal: impl Into<Mm>) -> Margins[src]

Creates a new Margins instance from the given vertical (top and bottom) and horizontal (left and right) margins.

pub fn all(all: impl Into<Mm>) -> Margins[src]

Creates a new Margins instance with all four margins set to the given value.

Trait Implementations

impl Clone for Margins[src]

impl Copy for Margins[src]

impl Debug for Margins[src]

impl Default for Margins[src]

impl<T: Into<Mm>, R: Into<Mm>, B: Into<Mm>, L: Into<Mm>> From<(T, R, B, L)> for Margins[src]

impl<V: Into<Mm>, H: Into<Mm>> From<(V, H)> for Margins[src]

impl<T: Into<Mm>> From<T> for Margins[src]

impl PartialEq<Margins> for Margins[src]

impl PartialOrd<Margins> for Margins[src]

impl StructuralPartialEq for Margins[src]

Auto Trait Implementations

impl RefUnwindSafe for Margins

impl Send for Margins

impl Sync for Margins

impl Unpin for Margins

impl UnwindSafe for Margins

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.