pub struct BoxShadow {
pub blur_radius: PxPct,
pub color: Color,
pub spread: PxPct,
pub left_offset: PxPct,
pub right_offset: PxPct,
pub top_offset: PxPct,
pub bottom_offset: PxPct,
}Expand description
Structure holding data about the shadow.
Fields§
§blur_radius: PxPct§color: Color§spread: PxPct§left_offset: PxPct§right_offset: PxPct§top_offset: PxPct§bottom_offset: PxPctImplementations§
Source§impl BoxShadow
impl BoxShadow
Sourcepub fn blur_radius(self, radius: impl Into<PxPct>) -> Self
pub fn blur_radius(self, radius: impl Into<PxPct>) -> Self
Specifies shadow blur. The larger this value, the bigger the blur, so the shadow becomes bigger and lighter.
Sourcepub fn spread(self, spread: impl Into<PxPct>) -> Self
pub fn spread(self, spread: impl Into<PxPct>) -> Self
Specifies shadow blur spread. Positive values will cause the shadow to expand and grow bigger, negative values will cause the shadow to shrink.
Sourcepub fn left_offset(self, left_offset: impl Into<PxPct>) -> Self
pub fn left_offset(self, left_offset: impl Into<PxPct>) -> Self
Specifies the offset of the left edge.
Sourcepub fn right_offset(self, right_offset: impl Into<PxPct>) -> Self
pub fn right_offset(self, right_offset: impl Into<PxPct>) -> Self
Specifies the offset of the right edge.
Sourcepub fn top_offset(self, top_offset: impl Into<PxPct>) -> Self
pub fn top_offset(self, top_offset: impl Into<PxPct>) -> Self
Specifies the offset of the top edge.
Sourcepub fn bottom_offset(self, bottom_offset: impl Into<PxPct>) -> Self
pub fn bottom_offset(self, bottom_offset: impl Into<PxPct>) -> Self
Specifies the offset of the bottom edge.
Trait Implementations§
Source§impl StylePropValue for BoxShadow
impl StylePropValue for BoxShadow
fn debug_view(&self) -> Option<Box<dyn View>>
fn interpolate(&self, other: &Self, value: f64) -> Option<Self>
fn combine(&self, _other: &Self) -> CombineResult<Self>
Source§fn content_hash(&self) -> u64
fn content_hash(&self) -> u64
Compute a content-based hash for this value. Read more
impl Copy for BoxShadow
impl StructuralPartialEq for BoxShadow
Auto Trait Implementations§
impl Freeze for BoxShadow
impl RefUnwindSafe for BoxShadow
impl Send for BoxShadow
impl Sync for BoxShadow
impl Unpin for BoxShadow
impl UnwindSafe for BoxShadow
Blanket Implementations§
§impl<T> AnyEq for T
impl<T> AnyEq for T
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,
§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
§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>
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> 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().