pub struct LayoutSpacing {
pub left: LayoutLength,
pub right: LayoutLength,
pub top: LayoutLength,
pub bottom: LayoutLength,
}Fields§
§left: LayoutLength§right: LayoutLength§top: LayoutLength§bottom: LayoutLengthImplementations§
Source§impl LayoutSpacing
impl LayoutSpacing
pub const ZERO: Self
pub const fn new( left: LayoutLength, right: LayoutLength, top: LayoutLength, bottom: LayoutLength, ) -> Self
pub const fn all(value: LayoutLength) -> Self
pub const fn points(value: f32) -> Self
pub const fn percent(value: f32) -> Self
pub const fn horizontal_vertical( horizontal: LayoutLength, vertical: LayoutLength, ) -> Self
pub const fn left(self, value: LayoutLength) -> Self
pub const fn right(self, value: LayoutLength) -> Self
pub const fn top(self, value: LayoutLength) -> Self
pub const fn bottom(self, value: LayoutLength) -> Self
pub const fn to_taffy_rect(self) -> Rect<LengthPercentage>
pub fn from_taffy(rect: Rect<LengthPercentage>) -> Option<Self>
Trait Implementations§
Source§impl Clone for LayoutSpacing
impl Clone for LayoutSpacing
Source§fn clone(&self) -> LayoutSpacing
fn clone(&self) -> LayoutSpacing
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LayoutSpacing
impl Debug for LayoutSpacing
Source§impl From<LayoutSpacing> for Rect<LengthPercentage>
impl From<LayoutSpacing> for Rect<LengthPercentage>
Source§fn from(value: LayoutSpacing) -> Self
fn from(value: LayoutSpacing) -> Self
Converts to this type from the input type.
Source§impl PartialEq for LayoutSpacing
impl PartialEq for LayoutSpacing
Source§fn eq(&self, other: &LayoutSpacing) -> bool
fn eq(&self, other: &LayoutSpacing) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for LayoutSpacing
impl StructuralPartialEq for LayoutSpacing
Auto Trait Implementations§
impl Freeze for LayoutSpacing
impl RefUnwindSafe for LayoutSpacing
impl Send for LayoutSpacing
impl Sync for LayoutSpacing
impl Unpin for LayoutSpacing
impl UnsafeUnpin for LayoutSpacing
impl UnwindSafe for LayoutSpacing
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
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.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn 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.Source§fn 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.