pub struct Margins {
pub(crate) top: Mm,
pub(crate) right: Mm,
pub(crate) bottom: Mm,
pub(crate) left: Mm,
}Expand description
The margins of an area, measured in millimeters.
Fields§
§top: MmThe top margin of the area.
right: MmThe right margin of the area.
bottom: MmThe bottom margin of the area.
left: MmThe left margin of the area.
Implementations§
Source§impl Margins
impl Margins
Sourcepub fn trbl(
top: impl Into<Mm>,
right: impl Into<Mm>,
bottom: impl Into<Mm>,
left: impl Into<Mm>,
) -> Margins
pub fn trbl( top: impl Into<Mm>, right: impl Into<Mm>, bottom: impl Into<Mm>, left: impl Into<Mm>, ) -> Margins
Creates a new Margins instance from the given top, right, bottom and left margins.
Trait Implementations§
Source§impl<T: Into<Mm>, R: Into<Mm>, B: Into<Mm>, L: Into<Mm>> From<(T, R, B, L)> for Margins
impl<T: Into<Mm>, R: Into<Mm>, B: Into<Mm>, L: Into<Mm>> From<(T, R, B, L)> for Margins
Source§fn from(values: (T, R, B, L)) -> Margins
fn from(values: (T, R, B, L)) -> Margins
Converts to this type from the input type.
Source§impl PartialOrd for Margins
impl PartialOrd for Margins
impl Copy for Margins
impl StructuralPartialEq for Margins
Auto Trait Implementations§
impl Freeze for Margins
impl RefUnwindSafe for Margins
impl Send for Margins
impl Sync for Margins
impl Unpin for Margins
impl UnwindSafe for Margins
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
Convert this type into
T, using the provided data to resolve any offsets.