pub struct Border {
pub top: f32,
pub bot: f32,
pub left: f32,
pub right: f32,
}
Expand description
A struct representing a rectangular border around a Widget.
In the theme file, border can be deserialzed as a standard mapping, or
using all: {value}
to specify all four values are the same, or
width
and height
to specify left
and right
and top
and bot
,
respectively.
Fields§
§top: f32
The upper edge border
bot: f32
The lower edge border
left: f32
The left edge border
right: f32
The right edge border
Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for Border
impl<'de> Deserialize<'de> for Border
source§fn deserialize<D: Deserializer<'de>>(
deserializer: D
) -> Result<Border, D::Error>
fn deserialize<D: Deserializer<'de>>( deserializer: D ) -> Result<Border, D::Error>
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq<Border> for Border
impl PartialEq<Border> for Border
impl Copy for Border
impl StructuralPartialEq for Border
Auto Trait Implementations§
impl RefUnwindSafe for Border
impl Send for Border
impl Sync for Border
impl Unpin for Border
impl UnwindSafe for Border
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> Content for Twhere
T: Copy,
impl<T> Content for Twhere T: Copy,
source§unsafe fn read<F, E>(size: usize, f: F) -> Result<T, E>where
F: FnOnce(&mut T) -> Result<(), E>,
unsafe fn read<F, E>(size: usize, f: F) -> Result<T, E>where F: FnOnce(&mut T) -> Result<(), E>,
Prepares an output buffer, then turns this buffer into an
Owned
.
User-provided closure F
must only write to and not read from &mut Self
.source§fn get_elements_size() -> usize
fn get_elements_size() -> usize
Returns the size of each element.
source§fn to_void_ptr(&self) -> *const ()
fn to_void_ptr(&self) -> *const ()
Produces a pointer to the data.
source§fn ref_from_ptr<'a>(ptr: *mut (), size: usize) -> Option<*mut T>
fn ref_from_ptr<'a>(ptr: *mut (), size: usize) -> Option<*mut T>
Builds a pointer to this type from a raw pointer.
source§fn is_size_suitable(size: usize) -> bool
fn is_size_suitable(size: usize) -> bool
Returns true if the size is suitable to store a type like this.