pub struct BorderSides {
pub left: BorderSide,
pub right: BorderSide,
pub top: BorderSide,
pub bottom: BorderSide,
}Expand description
The line style and color for each side of a widget’s border.
Fields§
§left: BorderSideColor and style of the left border.
right: BorderSideColor and style of the right border.
top: BorderSideColor and style of the top border.
bottom: BorderSideColor and style of the bottom border.
Implementations§
Source§impl BorderSides
impl BorderSides
Sourcepub fn new_all<S: Into<BorderSide>>(side: S) -> Self
pub fn new_all<S: Into<BorderSide>>(side: S) -> Self
All sides equal.
Sourcepub fn new_vh<TB: Into<BorderSide>, LR: Into<BorderSide>>(
top_bottom: TB,
left_right: LR,
) -> Self
pub fn new_vh<TB: Into<BorderSide>, LR: Into<BorderSide>>( top_bottom: TB, left_right: LR, ) -> Self
Top-bottom and left-right equal.
Sourcepub fn new<T: Into<BorderSide>, R: Into<BorderSide>, B: Into<BorderSide>, L: Into<BorderSide>>(
top: T,
right: R,
bottom: B,
left: L,
) -> Self
pub fn new<T: Into<BorderSide>, R: Into<BorderSide>, B: Into<BorderSide>, L: Into<BorderSide>>( top: T, right: R, bottom: B, left: L, ) -> Self
New top, right, bottom left.
Sourcepub fn new_top<T: Into<BorderSide>>(top: T) -> Self
pub fn new_top<T: Into<BorderSide>>(top: T) -> Self
New top only, other sides hidden.
Sourcepub fn new_right<R: Into<BorderSide>>(right: R) -> Self
pub fn new_right<R: Into<BorderSide>>(right: R) -> Self
New right only, other sides hidden.
Sourcepub fn new_bottom<B: Into<BorderSide>>(bottom: B) -> Self
pub fn new_bottom<B: Into<BorderSide>>(bottom: B) -> Self
New bottom only, other sides hidden.
Sourcepub fn new_left<L: Into<BorderSide>>(left: L) -> Self
pub fn new_left<L: Into<BorderSide>>(left: L) -> Self
New left only, other sides hidden.
All sides hidden.
Sourcepub fn dimensions_eq(&self) -> bool
pub fn dimensions_eq(&self) -> bool
If top and bottom are equal; and left and right are equal.
Trait Implementations§
Source§impl Clone for BorderSides
impl Clone for BorderSides
Source§fn clone(&self) -> BorderSides
fn clone(&self) -> BorderSides
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BorderSides
impl Debug for BorderSides
Source§impl<'de> Deserialize<'de> for BorderSides
impl<'de> Deserialize<'de> for BorderSides
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl<C: Into<Rgba>, S: Into<BorderStyle>> From<(C, S)> for BorderSides
impl<C: Into<Rgba>, S: Into<BorderStyle>> From<(C, S)> for BorderSides
Source§impl<T: Into<BorderSide>, R: Into<BorderSide>, B: Into<BorderSide>, L: Into<BorderSide>> From<(T, R, B, L)> for BorderSides
impl<T: Into<BorderSide>, R: Into<BorderSide>, B: Into<BorderSide>, L: Into<BorderSide>> From<(T, R, B, L)> for BorderSides
Source§fn from((top, right, bottom, left): (T, R, B, L)) -> Self
fn from((top, right, bottom, left): (T, R, B, L)) -> Self
(top, right, bottom, left) sides.
Source§impl<T: Into<Rgba>, R: Into<Rgba>, B: Into<Rgba>, L: Into<Rgba>, S: Into<BorderStyle>> From<(T, R, B, L, S)> for BorderSides
impl<T: Into<Rgba>, R: Into<Rgba>, B: Into<Rgba>, L: Into<Rgba>, S: Into<BorderStyle>> From<(T, R, B, L, S)> for BorderSides
Source§fn from((top, right, bottom, left, style): (T, R, B, L, S)) -> Self
fn from((top, right, bottom, left, style): (T, R, B, L, S)) -> Self
(top-color, right-color, bottom-color, left-color, style) sides.
Source§impl<TB: Into<Rgba>, LR: Into<Rgba>, S: Into<BorderStyle>> From<(TB, LR, S)> for BorderSides
impl<TB: Into<Rgba>, LR: Into<Rgba>, S: Into<BorderStyle>> From<(TB, LR, S)> for BorderSides
Source§fn from((top_bottom, left_right, style): (TB, LR, S)) -> Self
fn from((top_bottom, left_right, style): (TB, LR, S)) -> Self
(top-bottom-color, left-right-color, style) sides.
Source§impl From<BorderStyle> for BorderSides
impl From<BorderStyle> for BorderSides
Source§fn from(style: BorderStyle) -> Self
fn from(style: BorderStyle) -> Self
All sides transparent black with the style.
This is only useful with BorderStyle::Hidden variant.
Source§impl<C: Into<Rgba>, S: Into<BorderStyle>> IntoVar<BorderSides> for (C, S)
impl<C: Into<Rgba>, S: Into<BorderStyle>> IntoVar<BorderSides> for (C, S)
Source§fn into_var(self) -> Var<BorderSides>
fn into_var(self) -> Var<BorderSides>
(color, style) sides.
Source§impl<T: Into<BorderSide>, R: Into<BorderSide>, B: Into<BorderSide>, L: Into<BorderSide>> IntoVar<BorderSides> for (T, R, B, L)
impl<T: Into<BorderSide>, R: Into<BorderSide>, B: Into<BorderSide>, L: Into<BorderSide>> IntoVar<BorderSides> for (T, R, B, L)
Source§fn into_var(self) -> Var<BorderSides>
fn into_var(self) -> Var<BorderSides>
(top, right, bottom, left) sides.
Source§impl<T: Into<Rgba>, R: Into<Rgba>, B: Into<Rgba>, L: Into<Rgba>, S: Into<BorderStyle>> IntoVar<BorderSides> for (T, R, B, L, S)
impl<T: Into<Rgba>, R: Into<Rgba>, B: Into<Rgba>, L: Into<Rgba>, S: Into<BorderStyle>> IntoVar<BorderSides> for (T, R, B, L, S)
Source§fn into_var(self) -> Var<BorderSides>
fn into_var(self) -> Var<BorderSides>
(top-color, right-color, bottom-color, left-color, style) sides.
Source§impl<TB: Into<Rgba>, LR: Into<Rgba>, S: Into<BorderStyle>> IntoVar<BorderSides> for (TB, LR, S)
impl<TB: Into<Rgba>, LR: Into<Rgba>, S: Into<BorderStyle>> IntoVar<BorderSides> for (TB, LR, S)
Source§fn into_var(self) -> Var<BorderSides>
fn into_var(self) -> Var<BorderSides>
(top-bottom-color, left-right-color, style) sides.
Source§impl IntoVar<BorderSides> for BorderStyle
impl IntoVar<BorderSides> for BorderStyle
Source§fn into_var(self) -> Var<BorderSides>
fn into_var(self) -> Var<BorderSides>
All sides transparent black with the style.
This is only useful with BorderStyle::Hidden variant.
Source§impl IntoVar<BorderSides> for Hsla
impl IntoVar<BorderSides> for Hsla
Source§fn into_var(self) -> Var<BorderSides>
fn into_var(self) -> Var<BorderSides>
All sides solid color.
Source§impl IntoVar<BorderSides> for Hsva
impl IntoVar<BorderSides> for Hsva
Source§fn into_var(self) -> Var<BorderSides>
fn into_var(self) -> Var<BorderSides>
All sides solid color.
Source§impl IntoVar<BorderSides> for Rgba
impl IntoVar<BorderSides> for Rgba
Source§fn into_var(self) -> Var<BorderSides>
fn into_var(self) -> Var<BorderSides>
All sides solid color.
Source§impl PartialEq for BorderSides
impl PartialEq for BorderSides
Source§impl Serialize for BorderSides
impl Serialize for BorderSides
Source§impl Transitionable for BorderSides
impl Transitionable for BorderSides
Source§fn lerp(self, to: &Self, step: EasingStep) -> Self
fn lerp(self, to: &Self, step: EasingStep) -> Self
self -> to by step.impl Copy for BorderSides
impl<C: Into<Rgba>, S: Into<BorderStyle>> IntoValue<BorderSides> for (C, S)
impl<T: Into<BorderSide>, R: Into<BorderSide>, B: Into<BorderSide>, L: Into<BorderSide>> IntoValue<BorderSides> for (T, R, B, L)
impl<T: Into<Rgba>, R: Into<Rgba>, B: Into<Rgba>, L: Into<Rgba>, S: Into<BorderStyle>> IntoValue<BorderSides> for (T, R, B, L, S)
impl<TB: Into<Rgba>, LR: Into<Rgba>, S: Into<BorderStyle>> IntoValue<BorderSides> for (TB, LR, S)
impl IntoValue<BorderSides> for BorderStyle
impl IntoValue<BorderSides> for Hsla
impl IntoValue<BorderSides> for Hsva
impl IntoValue<BorderSides> for Rgba
impl StructuralPartialEq for BorderSides
Auto Trait Implementations§
impl Freeze for BorderSides
impl RefUnwindSafe for BorderSides
impl Send for BorderSides
impl Sync for BorderSides
impl Unpin for BorderSides
impl UnwindSafe for BorderSides
Blanket Implementations§
Source§impl<T> AnyVarValue for T
impl<T> AnyVarValue for T
Source§fn clone_boxed(&self) -> BoxAnyVarValue
fn clone_boxed(&self) -> BoxAnyVarValue
Source§fn eq_any(&self, other: &(dyn AnyVarValue + 'static)) -> bool
fn eq_any(&self, other: &(dyn AnyVarValue + 'static)) -> bool
self and other are equal.Source§fn try_swap(&mut self, other: &mut (dyn AnyVarValue + 'static)) -> bool
fn try_swap(&mut self, other: &mut (dyn AnyVarValue + 'static)) -> bool
other if both are of the same type.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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more