pub struct Sides<T> {
pub before: T,
pub after: T,
pub start: T,
pub end: T,
}Expand description
A value that applies to the four sides of a rectangular container.
Fields§
§before: TThe value before the rectangle, in the block progression direction. In the LTR writing mode, this is the top side.
after: TThe value after the rectangle, in the block progression direction. In the LTR writing mode, this is the bottom side.
start: TThe value at the inline start edge of the rectangle. In the LTR writing mode, this is the left side.
end: TThe value at the inline end edge of the rectangle. In the LTR writing mode, this is the right side.
Implementations§
Source§impl<T> Sides<T>
impl<T> Sides<T>
Sourcepub fn new(before: T, after: T, start: T, end: T) -> Self
pub fn new(before: T, after: T, start: T, end: T) -> Self
Create a new Sides struct with the given values for each side.
Sourcepub fn from_array(array: [T; 4]) -> Self
pub fn from_array(array: [T; 4]) -> Self
Create a new Sides struct with an array ordered as [before, after, start, end], just like in the PDF specification.
Trait Implementations§
impl<T: Copy> Copy for Sides<T>
impl<T: Eq> Eq for Sides<T>
impl<T> StructuralPartialEq for Sides<T>
Auto Trait Implementations§
impl<T> Freeze for Sides<T>where
T: Freeze,
impl<T> RefUnwindSafe for Sides<T>where
T: RefUnwindSafe,
impl<T> Send for Sides<T>where
T: Send,
impl<T> Sync for Sides<T>where
T: Sync,
impl<T> Unpin for Sides<T>where
T: Unpin,
impl<T> UnwindSafe for Sides<T>where
T: UnwindSafe,
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