pub struct Thickness { /* private fields */ }
Implementations
sourceimpl Thickness
impl Thickness
pub const fn new(l: i32, t: i32, r: i32, b: i32) -> Thickness
sourcepub const unsafe fn new_unchecked(l: i32, t: i32, r: i32, b: i32) -> Thickness
pub const unsafe fn new_unchecked(l: i32, t: i32, r: i32, b: i32) -> Thickness
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
sourceimpl AddAssign<Thickness> for Thickness
impl AddAssign<Thickness> for Thickness
sourcefn add_assign(&mut self, other: Thickness)
fn add_assign(&mut self, other: Thickness)
Performs the +=
operation. Read more
sourceimpl SubAssign<Thickness> for Thickness
impl SubAssign<Thickness> for Thickness
sourcefn sub_assign(&mut self, other: Thickness)
fn sub_assign(&mut self, other: Thickness)
Performs the -=
operation. Read more
impl Copy for Thickness
impl Eq for Thickness
impl StructuralEq 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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any,
sourcefn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
Convert Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read more
sourcefn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read more
sourcefn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read more
sourcefn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more
sourceimpl<T> DowncastSync for T where
T: Any + Send + Sync,
impl<T> DowncastSync for T where
T: Any + Send + Sync,
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more