#[non_exhaustive]pub struct BoxStyle {
pub background: Color,
pub border_top: BorderSide,
pub border_right: BorderSide,
pub border_bottom: BorderSide,
pub border_left: BorderSide,
pub radius: f32,
pub shadow: Option<ShadowSpec>,
pub inset_shadow: Option<ShadowSpec>,
}Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.background: Color§border_top: BorderSide§border_right: BorderSide§border_bottom: BorderSide§border_left: BorderSide§radius: f32§shadow: Option<ShadowSpec>§inset_shadow: Option<ShadowSpec>Implementations§
Source§impl BoxStyle
impl BoxStyle
pub fn new() -> Self
pub fn border_edges(self) -> Edges
pub fn background(self, color: Color) -> Self
pub fn border(self, width: f32, color: Color) -> Self
pub fn border_left(self, width: f32, color: Color) -> Self
pub fn border_right(self, width: f32, color: Color) -> Self
pub fn border_top(self, width: f32, color: Color) -> Self
pub fn border_bottom(self, width: f32, color: Color) -> Self
pub fn border_x(self, width: f32, color: Color) -> Self
pub fn border_y(self, width: f32, color: Color) -> Self
pub fn radius(self, radius: f32) -> Self
pub fn shadow(self, spec: ShadowSpec) -> Self
pub fn inset_shadow(self, spec: ShadowSpec) -> Self
pub fn is_empty(self) -> bool
pub fn uniform_border(self) -> Option<(f32, Color)>
pub fn paint(self, list: &mut RenderList, rect: Rect)
Trait Implementations§
impl Copy for BoxStyle
impl StructuralPartialEq for BoxStyle
Auto Trait Implementations§
impl Freeze for BoxStyle
impl RefUnwindSafe for BoxStyle
impl Send for BoxStyle
impl Sync for BoxStyle
impl Unpin for BoxStyle
impl UnsafeUnpin for BoxStyle
impl UnwindSafe for BoxStyle
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