pub enum StateLayout {
FillAndCenter,
CenterHorizontal,
Inline,
}Expand description
Determines how the intermediate states (Loading, Error) are positioned within the UI.
Variants§
FillAndCenter
Centers the content and greedily consumes all available space in the parent Ui.
Note: This can cause the UI to snap or shrink abruptly when transitioning
to the Finished state if the successful content does not also fill the space.
CenterHorizontal
Centers the content horizontally, consuming only the vertical space required.
This prevents the surrounding UI from aggressively shifting and is the recommended default.
Inline
Lays out the state content inline, directly following the parent Ui’s standard flow.
Trait Implementations§
Source§impl Clone for StateLayout
impl Clone for StateLayout
Source§fn clone(&self) -> StateLayout
fn clone(&self) -> StateLayout
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for StateLayout
Source§impl Debug for StateLayout
impl Debug for StateLayout
Source§impl Default for StateLayout
impl Default for StateLayout
Source§fn default() -> StateLayout
fn default() -> StateLayout
Returns the “default value” for a type. Read more
impl Eq for StateLayout
Source§impl PartialEq for StateLayout
impl PartialEq for StateLayout
Source§fn eq(&self, other: &StateLayout) -> bool
fn eq(&self, other: &StateLayout) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for StateLayout
Auto Trait Implementations§
impl Freeze for StateLayout
impl RefUnwindSafe for StateLayout
impl Send for StateLayout
impl Sync for StateLayout
impl Unpin for StateLayout
impl UnsafeUnpin for StateLayout
impl UnwindSafe for StateLayout
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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