pub struct Padding {
pub top: f64,
pub right: f64,
pub bottom: f64,
pub left: f64,
}Expand description
Padding configuration for cells
Fields§
§top: f64Top padding
right: f64Right padding
bottom: f64Bottom padding
left: f64Left padding
Implementations§
Source§impl Padding
impl Padding
Sourcepub fn new(top: f64, right: f64, bottom: f64, left: f64) -> Self
pub fn new(top: f64, right: f64, bottom: f64, left: f64) -> Self
Create padding with individual values (top, right, bottom, left)
Sourcepub fn symmetric(horizontal: f64, vertical: f64) -> Self
pub fn symmetric(horizontal: f64, vertical: f64) -> Self
Create padding with horizontal and vertical values
Sourcepub fn individual(top: f64, right: f64, bottom: f64, left: f64) -> Self
pub fn individual(top: f64, right: f64, bottom: f64, left: f64) -> Self
Create padding with individual values for each side
Sourcepub fn horizontal_total(&self) -> f64
pub fn horizontal_total(&self) -> f64
Get total horizontal padding (left + right)
Sourcepub fn vertical_total(&self) -> f64
pub fn vertical_total(&self) -> f64
Get total vertical padding (top + bottom)
pub fn pad_vertically( &self, coordinate_system: &CoordinateSystem, y: f64, ) -> f64
pub fn pad_horizontally(&self, x: f64) -> f64
Trait Implementations§
impl Copy for Padding
Auto Trait Implementations§
impl Freeze for Padding
impl RefUnwindSafe for Padding
impl Send for Padding
impl Sync for Padding
impl Unpin for Padding
impl UnwindSafe for Padding
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().