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: Side
top: Side
right: Side
bottom: Side
top_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]
fn update_style(self, style: Style) -> Style
[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]
T: Component + Float,
D: AdaptFrom<S, Swp, Dwp, T>,
Swp: WhitePoint,
Dwp: WhitePoint,
pub fn adapt_into_using<M>(self, method: M) -> D where
M: TransformMatrix<Swp, Dwp, T>,
[src]
M: TransformMatrix<Swp, Dwp, T>,
pub fn adapt_into(self) -> D
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> ConvertInto<U> for T where
U: ConvertFrom<T>,
[src]
U: ConvertFrom<T>,
pub fn convert_into(self) -> U
[src]
pub fn convert_unclamped_into(self) -> U
[src]
pub fn try_convert_into(self) -> Result<U, OutOfBounds<U>>
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,