pub struct ShowProps<W, C>{
pub children: TypedChildrenFn<C>,
pub when: W,
pub fallback: ViewFn,
}Expand description
Props for the Show component.
§Required Props
- children:
TypedChildrenFn<C>- The children will be shown whenever the condition in the
whenclosure returnstrue.
- The children will be shown whenever the condition in the
- when: [
W]- A closure that returns a bool that determines whether this thing runs
§Optional Props
- fallback:
impl Into<ViewFn>- A closure that returns what gets rendered if the when statement is false. By default this is the empty view.
Fields§
§children: TypedChildrenFn<C>The children will be shown whenever the condition in the when closure returns true.
when: WA closure that returns a bool that determines whether this thing runs
fallback: ViewFnA closure that returns what gets rendered if the when statement is false. By default this is the empty view.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<W, C> Freeze for ShowProps<W, C>where
W: Freeze,
impl<W, C> !RefUnwindSafe for ShowProps<W, C>
impl<W, C> Send for ShowProps<W, C>
impl<W, C> Sync for ShowProps<W, C>
impl<W, C> Unpin for ShowProps<W, C>where
W: Unpin,
impl<W, C> !UnwindSafe for ShowProps<W, C>
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
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 moreSource§impl<T> SerializableKey for T
impl<T> SerializableKey for T
Source§impl<T> StorageAccess<T> for T
impl<T> StorageAccess<T> for T
Source§fn as_borrowed(&self) -> &T
fn as_borrowed(&self) -> &T
Borrows the value.
Source§fn into_taken(self) -> T
fn into_taken(self) -> T
Takes the value.