pub struct Decoration { /* private fields */ }Expand description
The layers an application paints into one component’s frame.
Both slots are optional and independent. A decoration never affects the component’s size: the frame measures its content, and these are painted into the space that measurement produced.
Implementations§
Source§impl Decoration
impl Decoration
Sourcepub fn behind(element: impl IntoElement) -> Self
pub fn behind(element: impl IntoElement) -> Self
A layer painted under the component’s content, over its background.
Sourcepub fn above(element: impl IntoElement) -> Self
pub fn above(element: impl IntoElement) -> Self
A layer painted over the component’s content.
Passes pointer input through to the content underneath, so a veil, a scanline, or a vignette never costs the component a click.
Sourcepub fn and_above(self, element: impl IntoElement) -> Self
pub fn and_above(self, element: impl IntoElement) -> Self
Adds the layer painted over the component’s content.
Sourcepub fn and_behind(self, element: impl IntoElement) -> Self
pub fn and_behind(self, element: impl IntoElement) -> Self
Adds the layer painted under the component’s content.
So that either layer can be named first: paint order is fixed by the component, not by which of these was called.
Trait Implementations§
Source§impl Default for Decoration
impl Default for Decoration
Source§fn default() -> Decoration
fn default() -> Decoration
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for Decoration
impl !Send for Decoration
impl !Sync for Decoration
impl !UnwindSafe for Decoration
impl Freeze for Decoration
impl Unpin for Decoration
impl UnsafeUnpin for Decoration
Blanket Implementations§
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Instruments this type with the provided [
Span], returning an
Instrumented wrapper.§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
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
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().§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
Attaches the provided
Subscriber to this type, returning a
[WithDispatch] wrapper.