#[repr(C)]pub struct BorderSide {
pub color: Rgba,
pub style: BorderStyle,
}
Expand description
The line style and color for the sides of a widget’s border.
Fields§
§color: Rgba
Line color.
style: BorderStyle
Line style.
Implementations§
source§impl BorderSide
impl BorderSide
sourcepub fn new<C, S>(color: C, style: S) -> BorderSide
pub fn new<C, S>(color: C, style: S) -> BorderSide
New border side from color and style value.
sourcepub fn double<C>(color: C) -> BorderSide
pub fn double<C>(color: C) -> BorderSide
New border side with Double
style.
sourcepub fn dotted<C>(color: C) -> BorderSide
pub fn dotted<C>(color: C) -> BorderSide
New border side with Dotted
style.
sourcepub fn dashed<C>(color: C) -> BorderSide
pub fn dashed<C>(color: C) -> BorderSide
New border side with Dashed
style.
sourcepub fn groove<C>(color: C) -> BorderSide
pub fn groove<C>(color: C) -> BorderSide
New border side with Groove
style.
sourcepub fn outset<C>(color: C) -> BorderSide
pub fn outset<C>(color: C) -> BorderSide
New border side with Outset
style.
New border side with Hidden
style and transparent color.
Trait Implementations§
source§impl Clone for BorderSide
impl Clone for BorderSide
source§fn clone(&self) -> BorderSide
fn clone(&self) -> BorderSide
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for BorderSide
impl Debug for BorderSide
source§impl Default for BorderSide
impl Default for BorderSide
source§fn default() -> BorderSide
fn default() -> BorderSide
Returns hidden
.
source§impl<'de> Deserialize<'de> for BorderSide
impl<'de> Deserialize<'de> for BorderSide
source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<BorderSide, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<BorderSide, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<C, S> From<(C, S)> for BorderSide
impl<C, S> From<(C, S)> for BorderSide
source§fn from(_: (C, S)) -> BorderSide
fn from(_: (C, S)) -> BorderSide
(color, style) side.
source§impl From<BorderStyle> for BorderSide
impl From<BorderStyle> for BorderSide
source§fn from(style: BorderStyle) -> BorderSide
fn from(style: BorderStyle) -> BorderSide
Side transparent black with the style.
This is only useful with BorderStyle::Hidden
variant.
source§impl From<Hsla> for BorderSide
impl From<Hsla> for BorderSide
source§fn from(color: Hsla) -> BorderSide
fn from(color: Hsla) -> BorderSide
Solid color.
source§impl From<Hsva> for BorderSide
impl From<Hsva> for BorderSide
source§fn from(color: Hsva) -> BorderSide
fn from(color: Hsva) -> BorderSide
Solid color.
source§impl From<Rgba> for BorderSide
impl From<Rgba> for BorderSide
source§fn from(color: Rgba) -> BorderSide
fn from(color: Rgba) -> BorderSide
Solid color.
source§impl<C, S> IntoVar<BorderSide> for (C, S)
impl<C, S> IntoVar<BorderSide> 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,
Converts into
BoxedVar<T>
. Read moresource§impl IntoVar<BorderSide> for BorderStyle
impl IntoVar<BorderSide> for BorderStyle
source§fn into_var(self) -> <BorderStyle as IntoVar<BorderSide>>::Var
fn into_var(self) -> <BorderStyle as IntoVar<BorderSide>>::Var
Side 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,
Converts into
BoxedVar<T>
. Read moresource§impl IntoVar<BorderSide> for Hsla
impl IntoVar<BorderSide> 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,
Converts into
BoxedVar<T>
. Read moresource§impl IntoVar<BorderSide> for Hsva
impl IntoVar<BorderSide> 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,
Converts into
BoxedVar<T>
. Read moresource§impl IntoVar<BorderSide> for Rgba
impl IntoVar<BorderSide> 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,
Converts into
BoxedVar<T>
. Read moresource§impl PartialEq for BorderSide
impl PartialEq for BorderSide
source§impl Serialize for BorderSide
impl Serialize for BorderSide
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,
Serialize this value into the given Serde serializer. Read more
source§impl Transitionable for BorderSide
impl Transitionable for BorderSide
source§fn lerp(self, to: &BorderSide, step: Factor) -> BorderSide
fn lerp(self, to: &BorderSide, step: Factor) -> BorderSide
Sample the linear interpolation from
self
-> to
by step
.impl Copy for BorderSide
impl<C, S> IntoValue<BorderSide> for (C, S)
impl IntoValue<BorderSide> for BorderStyle
impl IntoValue<BorderSide> for Hsla
impl IntoValue<BorderSide> for Hsva
impl IntoValue<BorderSide> for Rgba
impl StructuralPartialEq for BorderSide
Auto Trait Implementations§
impl Freeze for BorderSide
impl RefUnwindSafe for BorderSide
impl Send for BorderSide
impl Sync for BorderSide
impl Unpin for BorderSide
impl UnwindSafe for BorderSide
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)
Access to mut
dyn Any
methods.source§fn clone_boxed(&self) -> Box<dyn AnyVarValue>
fn clone_boxed(&self) -> Box<dyn AnyVarValue>
Clone the value.
source§fn clone_boxed_var(&self) -> Box<dyn AnyVar>
fn clone_boxed_var(&self) -> Box<dyn AnyVar>
Clone the value into a new boxed
LocalVar<Self>
.source§fn eq_any(&self, other: &(dyn AnyVarValue + 'static)) -> bool
fn eq_any(&self, other: &(dyn AnyVarValue + 'static)) -> bool
Gets if
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
Mutably borrows from an owned value. Read more
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)
🔬This is a nightly-only experimental API. (
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>
Convert
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>
Convert
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)
Convert
&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)
Convert
&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>
Converts
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>
Converts
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
The none-equivalent value.
§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
The none-equivalent value.
§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>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian()
.