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: BorderSide
Color and style of the left border.
right: BorderSide
Color and style of the right border.
top: BorderSide
Color and style of the top border.
bottom: BorderSide
Color and style of the bottom border.
Implementations§
source§impl BorderSides
impl BorderSides
sourcepub fn new_all<S>(side: S) -> BorderSideswhere
S: Into<BorderSide>,
pub fn new_all<S>(side: S) -> BorderSideswhere
S: Into<BorderSide>,
All sides equal.
sourcepub fn new_vh<TB, LR>(top_bottom: TB, left_right: LR) -> BorderSides
pub fn new_vh<TB, LR>(top_bottom: TB, left_right: LR) -> BorderSides
Top-bottom and left-right equal.
sourcepub fn new<T, R, B, L>(top: T, right: R, bottom: B, left: L) -> BorderSides
pub fn new<T, R, B, L>(top: T, right: R, bottom: B, left: L) -> BorderSides
New top, right, bottom left.
sourcepub fn new_top<T>(top: T) -> BorderSideswhere
T: Into<BorderSide>,
pub fn new_top<T>(top: T) -> BorderSideswhere
T: Into<BorderSide>,
New top only, other sides hidden.
sourcepub fn new_right<R>(right: R) -> BorderSideswhere
R: Into<BorderSide>,
pub fn new_right<R>(right: R) -> BorderSideswhere
R: Into<BorderSide>,
New right only, other sides hidden.
sourcepub fn new_bottom<B>(bottom: B) -> BorderSideswhere
B: Into<BorderSide>,
pub fn new_bottom<B>(bottom: B) -> BorderSideswhere
B: Into<BorderSide>,
New bottom only, other sides hidden.
sourcepub fn new_left<L>(left: L) -> BorderSideswhere
L: Into<BorderSide>,
pub fn new_left<L>(left: L) -> BorderSideswhere
L: Into<BorderSide>,
New left only, other sides hidden.
sourcepub fn solid<C>(color: C) -> BorderSides
pub fn solid<C>(color: C) -> BorderSides
All sides a solid color.
sourcepub fn double<C>(color: C) -> BorderSides
pub fn double<C>(color: C) -> BorderSides
All sides a double line solid color.
sourcepub fn dotted<C>(color: C) -> BorderSides
pub fn dotted<C>(color: C) -> BorderSides
All sides a dotted color.
sourcepub fn dashed<C>(color: C) -> BorderSides
pub fn dashed<C>(color: C) -> BorderSides
All sides a dashed color.
sourcepub fn groove<C>(color: C) -> BorderSides
pub fn groove<C>(color: C) -> BorderSides
All sides a grooved color.
sourcepub fn ridge<C>(color: C) -> BorderSides
pub fn ridge<C>(color: C) -> BorderSides
All sides a ridged color.
sourcepub fn inset<C>(color: C) -> BorderSides
pub fn inset<C>(color: C) -> BorderSides
All sides a inset color.
sourcepub fn outset<C>(color: C) -> BorderSides
pub fn outset<C>(color: C) -> BorderSides
All sides a outset color.
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 Default for BorderSides
impl Default for BorderSides
source§fn default() -> BorderSides
fn default() -> BorderSides
Returns hidden
.
source§impl<'de> Deserialize<'de> for BorderSides
impl<'de> Deserialize<'de> for BorderSides
source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<BorderSides, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<BorderSides, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
source§impl<C, S> From<(C, S)> for BorderSides
impl<C, S> From<(C, S)> for BorderSides
source§fn from(_: (C, S)) -> BorderSides
fn from(_: (C, S)) -> BorderSides
(color, style) sides.
source§impl<T, R, B, L> From<(T, R, B, L)> for BorderSides
impl<T, R, B, L> From<(T, R, B, L)> for BorderSides
source§fn from(_: (T, R, B, L)) -> BorderSides
fn from(_: (T, R, B, L)) -> BorderSides
(top, right, bottom, left) sides.
source§impl<T, R, B, L, S> From<(T, R, B, L, S)> for BorderSides
impl<T, R, B, L, S> From<(T, R, B, L, S)> for BorderSides
source§fn from(_: (T, R, B, L, S)) -> BorderSides
fn from(_: (T, R, B, L, S)) -> BorderSides
(top-color, right-color, bottom-color, left-color, style) sides.
source§impl<TB, LR, S> From<(TB, LR, S)> for BorderSides
impl<TB, LR, S> From<(TB, LR, S)> for BorderSides
source§fn from(_: (TB, LR, S)) -> BorderSides
fn from(_: (TB, LR, S)) -> BorderSides
(top-bottom-color, left-right-color, style) sides.
source§impl From<BorderStyle> for BorderSides
impl From<BorderStyle> for BorderSides
source§fn from(style: BorderStyle) -> BorderSides
fn from(style: BorderStyle) -> BorderSides
All sides transparent black with the style.
This is only useful with BorderStyle::Hidden
variant.
source§impl From<Hsla> for BorderSides
impl From<Hsla> for BorderSides
source§fn from(color: Hsla) -> BorderSides
fn from(color: Hsla) -> BorderSides
All sides solid color.
source§impl From<Hsva> for BorderSides
impl From<Hsva> for BorderSides
source§fn from(color: Hsva) -> BorderSides
fn from(color: Hsva) -> BorderSides
All sides solid color.
source§impl From<Rgba> for BorderSides
impl From<Rgba> for BorderSides
source§fn from(color: Rgba) -> BorderSides
fn from(color: Rgba) -> BorderSides
All sides solid color.
source§impl<C, S> IntoVar<BorderSides> for (C, S)
impl<C, S> IntoVar<BorderSides> for (C, S)
source§fn into_boxed_var(self) -> Box<dyn VarBoxed<T>>where
Self: Sized,
fn into_boxed_var(self) -> Box<dyn VarBoxed<T>>where
Self: Sized,
BoxedVar<T>
. Read moresource§impl<T, R, B, L> IntoVar<BorderSides> for (T, R, B, L)
impl<T, R, B, L> IntoVar<BorderSides> for (T, R, B, L)
source§fn into_var(self) -> <(T, R, B, L) as IntoVar<BorderSides>>::Var
fn into_var(self) -> <(T, R, B, L) as IntoVar<BorderSides>>::Var
(top, right, bottom, left) sides.
source§fn into_boxed_var(self) -> Box<dyn VarBoxed<T>>where
Self: Sized,
fn into_boxed_var(self) -> Box<dyn VarBoxed<T>>where
Self: Sized,
BoxedVar<T>
. Read moresource§impl<T, R, B, L, S> IntoVar<BorderSides> for (T, R, B, L, S)
impl<T, R, B, L, S> IntoVar<BorderSides> for (T, R, B, L, S)
source§fn into_var(self) -> <(T, R, B, L, S) as IntoVar<BorderSides>>::Var
fn into_var(self) -> <(T, R, B, L, S) as IntoVar<BorderSides>>::Var
(top-color, right-color, bottom-color, left-color, style) sides.
source§fn into_boxed_var(self) -> Box<dyn VarBoxed<T>>where
Self: Sized,
fn into_boxed_var(self) -> Box<dyn VarBoxed<T>>where
Self: Sized,
BoxedVar<T>
. Read moresource§impl<TB, LR, S> IntoVar<BorderSides> for (TB, LR, S)
impl<TB, LR, S> IntoVar<BorderSides> for (TB, LR, S)
source§fn into_var(self) -> <(TB, LR, S) as IntoVar<BorderSides>>::Var
fn into_var(self) -> <(TB, LR, S) as IntoVar<BorderSides>>::Var
(top-bottom-color, left-right-color, style) sides.
source§fn into_boxed_var(self) -> Box<dyn VarBoxed<T>>where
Self: Sized,
fn into_boxed_var(self) -> Box<dyn VarBoxed<T>>where
Self: Sized,
BoxedVar<T>
. Read moresource§impl IntoVar<BorderSides> for BorderStyle
impl IntoVar<BorderSides> for BorderStyle
source§fn into_var(self) -> <BorderStyle as IntoVar<BorderSides>>::Var
fn into_var(self) -> <BorderStyle as IntoVar<BorderSides>>::Var
All sides transparent black with the style.
This is only useful with BorderStyle::Hidden
variant.
source§fn into_boxed_var(self) -> Box<dyn VarBoxed<T>>where
Self: Sized,
fn into_boxed_var(self) -> Box<dyn VarBoxed<T>>where
Self: Sized,
BoxedVar<T>
. Read moresource§impl IntoVar<BorderSides> for Hsla
impl IntoVar<BorderSides> for Hsla
source§fn into_boxed_var(self) -> Box<dyn VarBoxed<T>>where
Self: Sized,
fn into_boxed_var(self) -> Box<dyn VarBoxed<T>>where
Self: Sized,
BoxedVar<T>
. Read moresource§impl IntoVar<BorderSides> for Hsva
impl IntoVar<BorderSides> for Hsva
source§fn into_boxed_var(self) -> Box<dyn VarBoxed<T>>where
Self: Sized,
fn into_boxed_var(self) -> Box<dyn VarBoxed<T>>where
Self: Sized,
BoxedVar<T>
. Read moresource§impl IntoVar<BorderSides> for Rgba
impl IntoVar<BorderSides> for Rgba
source§fn into_boxed_var(self) -> Box<dyn VarBoxed<T>>where
Self: Sized,
fn into_boxed_var(self) -> Box<dyn VarBoxed<T>>where
Self: Sized,
BoxedVar<T>
. Read moresource§impl PartialEq for BorderSides
impl PartialEq for BorderSides
source§impl Serialize for BorderSides
impl Serialize for BorderSides
source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
source§impl Transitionable for BorderSides
impl Transitionable for BorderSides
source§fn lerp(self, to: &BorderSides, step: Factor) -> BorderSides
fn lerp(self, to: &BorderSides, step: Factor) -> BorderSides
self
-> to
by step
.impl Copy for BorderSides
impl<C, S> IntoValue<BorderSides> for (C, S)
impl<T, R, B, L> IntoValue<BorderSides> for (T, R, B, L)
impl<T, R, B, L, S> IntoValue<BorderSides> for (T, R, B, L, S)
impl<TB, LR, S> 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§
§impl<T> AnyEq for T
impl<T> AnyEq for T
source§impl<T> AnyVarValue for Twhere
T: VarValue,
impl<T> AnyVarValue for Twhere
T: VarValue,
source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
dyn Any
methods.source§fn clone_boxed(&self) -> Box<dyn AnyVarValue>
fn clone_boxed(&self) -> Box<dyn AnyVarValue>
source§fn clone_boxed_var(&self) -> Box<dyn AnyVar>
fn clone_boxed_var(&self) -> Box<dyn AnyVar>
LocalVar<Self>
.source§fn eq_any(&self, other: &(dyn AnyVarValue + 'static)) -> bool
fn eq_any(&self, other: &(dyn AnyVarValue + 'static)) -> bool
self
equals other
.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,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
source§impl<T> FsChangeNote for T
impl<T> FsChangeNote for T
§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> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§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§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian()
.