Struct int_vec_2d::Thickness
source · pub struct Thickness { /* private fields */ }
Implementations§
source§impl Thickness
impl Thickness
pub const fn new(l: i32, t: i32, r: i32, b: i32) -> Self
sourcepub const unsafe fn new_unchecked(l: i32, t: i32, r: i32, b: i32) -> Self
pub const unsafe fn new_unchecked(l: i32, t: i32, r: i32, b: i32) -> Self
§Safety
All passed parameters should be in the -(2¹⁶ - 1) ..= (2¹⁶ - 1)
range.
pub const fn all(a: i32) -> Thickness
pub fn l(self) -> i32
pub fn t(self) -> i32
pub fn r(self) -> i32
pub fn b(self) -> i32
pub fn align( inner: Vector, outer: Vector, h_align: HAlign, v_align: VAlign ) -> Thickness
pub fn shrink_rect(self, rect: Rect) -> Rect
pub fn expand_rect(self, rect: Rect) -> Rect
pub fn shrink_rect_size(self, rect_size: Vector) -> Vector
pub fn expand_rect_size(self, rect_size: Vector) -> Vector
pub fn shrink_band_h(self, band_h: i16) -> i16
pub fn expand_band_h(self, band_h: i16) -> i16
pub fn shrink_band_w(self, band_w: i16) -> i16
pub fn expand_band_w(self, band_w: i16) -> i16
Trait Implementations§
source§impl AddAssign for Thickness
impl AddAssign for Thickness
source§fn add_assign(&mut self, other: Self)
fn add_assign(&mut self, other: Self)
Performs the
+=
operation. Read moresource§impl PartialEq for Thickness
impl PartialEq for Thickness
source§impl SubAssign for Thickness
impl SubAssign for Thickness
source§fn sub_assign(&mut self, other: Self)
fn sub_assign(&mut self, other: Self)
Performs the
-=
operation. Read moreimpl Copy for Thickness
impl Eq for Thickness
impl StructuralPartialEq for Thickness
Auto Trait Implementations§
impl RefUnwindSafe for Thickness
impl Send for Thickness
impl Sync for Thickness
impl Unpin for Thickness
impl UnwindSafe for Thickness
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