Struct css_style::border::Border[][src]

pub struct Border {
    pub left: Side,
    pub top: Side,
    pub right: Side,
    pub bottom: Side,
    pub top_left: Option<Radius>,
    pub top_right: Option<Radius>,
    pub bottom_left: Option<Radius>,
    pub bottom_right: Option<Radius>,
}
use css_style::{Style, unit::px, Color, border::BorderStyle};

Style::default()
    .and_border(|conf| {
        conf.solid() // or .style(BorderStyle::Solid)
            .width(px(2))
            .color(Color::DimGray)
            .radius(px(4))
    });

Fields

left: Sidetop: Sideright: Sidebottom: Sidetop_left: Option<Radius>top_right: Option<Radius>bottom_left: Option<Radius>bottom_right: Option<Radius>

Implementations

impl Border[src]

pub fn left(self, value: impl Into<Side>) -> Self[src]

pub fn and_left(self, set_value: impl FnOnce(Side) -> Side) -> Self[src]

pub fn top(self, value: impl Into<Side>) -> Self[src]

pub fn and_top(self, set_value: impl FnOnce(Side) -> Side) -> Self[src]

pub fn right(self, value: impl Into<Side>) -> Self[src]

pub fn and_right(self, set_value: impl FnOnce(Side) -> Side) -> Self[src]

pub fn bottom(self, value: impl Into<Side>) -> Self[src]

pub fn and_bottom(self, set_value: impl FnOnce(Side) -> Side) -> Self[src]

pub fn top_left(self, value: impl Into<Radius>) -> Self[src]

pub fn try_top_left(self, value: Option<impl Into<Radius>>) -> Self[src]

pub fn top_right(self, value: impl Into<Radius>) -> Self[src]

pub fn try_top_right(self, value: Option<impl Into<Radius>>) -> Self[src]

pub fn bottom_left(self, value: impl Into<Radius>) -> Self[src]

pub fn try_bottom_left(self, value: Option<impl Into<Radius>>) -> Self[src]

pub fn bottom_right(self, value: impl Into<Radius>) -> Self[src]

pub fn try_bottom_right(self, value: Option<impl Into<Radius>>) -> Self[src]

impl Border[src]

pub fn all_side(self, value: impl Fn(Side) -> Side + Clone) -> Self[src]

pub fn style(self, style: impl Into<BorderStyle>) -> Self[src]

pub fn width(self, width: impl Into<Width>) -> Self[src]

pub fn color(self, color: impl Into<Color>) -> Self[src]

pub fn transparent(self) -> Self[src]

pub fn radius(self, rad: impl Into<Radius>) -> Self[src]

pub fn none(self) -> Self[src]

pub fn hidden(self) -> Self[src]

pub fn dotted(self) -> Self[src]

pub fn dashed(self) -> Self[src]

pub fn solid(self) -> Self[src]

pub fn double(self) -> Self[src]

pub fn groove(self) -> Self[src]

pub fn ridge(self) -> Self[src]

pub fn inset(self) -> Self[src]

pub fn outset(self) -> Self[src]

Trait Implementations

impl Clone for Border[src]

impl Debug for Border[src]

impl Default for Border[src]

impl<T: Into<Color>> From<T> for Border[src]

impl PartialEq<Border> for Border[src]

impl StructuralPartialEq for Border[src]

impl StyleUpdater for Border[src]

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

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
    T: Component + Float,
    D: AdaptFrom<S, Swp, Dwp, T>,
    Swp: WhitePoint,
    Dwp: WhitePoint
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T, U> ConvertInto<U> for T where
    U: ConvertFrom<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.