pub struct ToastClose { /* private fields */ }Expand description
A normal Button whose activation safely dismisses this notification.
Implementations§
Trait Implementations§
Source§impl IntoElement for ToastClose
impl IntoElement for ToastClose
Source§type Element = ViewElement<ToastClose>
type Element = ViewElement<ToastClose>
The specific type of element into which the implementing type is converted.
Useful for converting other types into elements automatically, like Strings
Source§fn into_element(self) -> Self::Element
fn into_element(self) -> Self::Element
Convert self into a type that implements
Element.Source§fn into_any_element(self) -> AnyElement
fn into_any_element(self) -> AnyElement
Convert self into a dynamically-typed
AnyElement.Source§impl RenderOnce for ToastClose
impl RenderOnce for ToastClose
Source§fn render(self, _: &mut Window, _: &mut App) -> impl IntoElement
fn render(self, _: &mut Window, _: &mut App) -> impl IntoElement
Render this component into an element tree. Note that this method
takes ownership of self, as compared to
Render::render() method
which takes a mutable reference.Auto Trait Implementations§
impl !RefUnwindSafe for ToastClose
impl !Send for ToastClose
impl !Sync for ToastClose
impl !UnwindSafe for ToastClose
impl Forget for ToastClose
impl Freeze for ToastClosewhere
NonZero<u32>: Freeze,
&'static str: Freeze,
*const ArcInner<str> is !null: Freeze,
PhantomData<ArcInner<str>>: Freeze,
*const ArcInner<Path> is !null: Freeze,
PhantomData<ArcInner<Path>>: Freeze,
*const str is !null: Freeze,
PhantomData<&'static str>: Freeze,
*const ArcInner<ElementId> is !null: Freeze,
PhantomData<ArcInner<ElementId>>: Freeze,
*const u8 is !null: Freeze,
PhantomData<ContextEntry>: Freeze,
*const ArcInner<RwLock<RawRwLock, FocusMap>> is !null: Freeze,
PhantomData<ArcInner<RwLock<RawRwLock, FocusMap>>>: Freeze,
*const RcInner<RefCell<ScrollHandleState>> is !null: Freeze,
PhantomData<RcInner<RefCell<ScrollHandleState>>>: Freeze,
*const RcInner<RefCell<Point<Pixels>>> is !null: Freeze,
PhantomData<RcInner<RefCell<Point<Pixels>>>>: Freeze,
*const RcInner<RefCell<OngoingScroll>> is !null: Freeze,
PhantomData<RcInner<RefCell<OngoingScroll>>>: Freeze,
*const StyleRefinement is !null: Freeze,
PhantomData<StyleRefinement>: Freeze,
PhantomData<(TypeId, Box<dyn Fn(&(dyn Any + 'static), &mut Window, &mut App) -> StyleRefinement>)>: Freeze,
PhantomData<(TypeId, GroupStyle)>: Freeze,
PhantomData<Box<dyn Fn(&MouseDownEvent, DispatchPhase, &Hitbox, &mut Window, &mut App)>>: Freeze,
PhantomData<Box<dyn Fn(&MouseUpEvent, DispatchPhase, &Hitbox, &mut Window, &mut App)>>: Freeze,
PhantomData<Box<dyn Fn(&MousePressureEvent, DispatchPhase, &Hitbox, &mut Window, &mut App)>>: Freeze,
PhantomData<Box<dyn Fn(&MouseMoveEvent, DispatchPhase, &Hitbox, &mut Window, &mut App)>>: Freeze,
PhantomData<Box<dyn Fn(&MouseExitEvent, DispatchPhase, &Hitbox, &mut Window, &mut App)>>: Freeze,
PhantomData<Box<dyn Fn(&FileDropEvent, DispatchPhase, &Hitbox, &mut Window, &mut App)>>: Freeze,
PhantomData<Box<dyn Fn(&ScrollEvent, DispatchPhase, &Hitbox, &mut Window, &mut App)>>: Freeze,
PhantomData<Box<dyn Fn(&PinchEvent, DispatchPhase, &Hitbox, &mut Window, &mut App)>>: Freeze,
PhantomData<Box<dyn Fn(&BackGestureEvent, DispatchPhase, &Hitbox, &mut Window, &mut App)>>: Freeze,
PhantomData<Box<dyn Fn(&KeyDownEvent, DispatchPhase, &mut Window, &mut App)>>: Freeze,
PhantomData<Box<dyn Fn(&KeyUpEvent, DispatchPhase, &mut Window, &mut App)>>: Freeze,
PhantomData<Box<dyn Fn(&ModifiersChangedEvent, &mut Window, &mut App)>>: Freeze,
PhantomData<(TypeId, Box<dyn Fn(&(dyn Any + 'static), DispatchPhase, &mut Window, &mut App)>)>: Freeze,
PhantomData<(TypeId, Box<dyn Fn(&(dyn Any + 'static), &mut Window, &mut App)>)>: Freeze,
*const dyn Fn(&(dyn Any + 'static), &mut Window, &mut App) -> bool is !null: Freeze,
PhantomData<dyn Fn(&(dyn Any + 'static), &mut Window, &mut App) -> bool>: Freeze,
PhantomData<Rc<dyn Fn(&ClickEvent, &mut Window, &mut App)>>: Freeze,
*const ArcInner<dyn Any> is !null: Freeze,
PhantomData<ArcInner<dyn Any>>: Freeze,
*const dyn Fn(&(dyn Any + 'static), Point<Pixels>, &mut Window, &mut App) -> AnyView is !null: Freeze,
PhantomData<dyn Fn(&(dyn Any + 'static), Point<Pixels>, &mut Window, &mut App) -> AnyView>: Freeze,
*const dyn Fn(&(dyn Any + 'static), &mut Window, &mut App) -> Option<ExternalDragPayload> is !null: Freeze,
PhantomData<dyn Fn(&(dyn Any + 'static), &mut Window, &mut App) -> Option<ExternalDragPayload>>: Freeze,
*const dyn Fn(&bool, &mut Window, &mut App) is !null: Freeze,
PhantomData<dyn Fn(&bool, &mut Window, &mut App)>: Freeze,
*const RcInner<dyn Fn(&mut Window, &mut App) -> AnyView> is !null: Freeze,
PhantomData<RcInner<dyn Fn(&mut Window, &mut App) -> AnyView>>: Freeze,
PhantomData<(Action, Box<dyn FnMut(Option<&ActionData>, &mut Window, &mut App)>)>: Freeze,
*const dyn FnOnce(&mut A11ySubtreeBuilder<'_>) is !null: Freeze,
PhantomData<dyn FnOnce(&mut A11ySubtreeBuilder<'_>)>: Freeze,
&'static Location<'static>: Freeze,
*mut dyn ElementObject: Freeze,
*const RcInner<Cell<bool>> is !null: Freeze,
PhantomData<RcInner<Cell<bool>>>: Freeze,
*const AnyElement is !null: Freeze,
*const dyn Fn(Vec<Bounds<Pixels>>, &mut Window, &mut App) is !null: Freeze,
PhantomData<dyn Fn(Vec<Bounds<Pixels>>, &mut Window, &mut App)>: Freeze,
*const dyn ImageCacheProvider is !null: Freeze,
PhantomData<dyn ImageCacheProvider>: Freeze,
*const dyn Fn(&mut Window, &mut App) -> SmallVec<[usize; 8]> is !null: Freeze,
PhantomData<dyn Fn(&mut Window, &mut App) -> SmallVec<[usize; 8]>>: Freeze,
PhantomData<BoxShadow>: Freeze,
*const ArcInner<Vec<(String, u32)>> is !null: Freeze,
PhantomData<ArcInner<Vec<(String, u32)>>>: Freeze,
*const ArcInner<Vec<String>> is !null: Freeze,
PhantomData<ArcInner<Vec<String>>>: Freeze,
*const RcInner<dyn Fn(&ClickEvent, &mut Window, &mut App)> is !null: Freeze,
PhantomData<RcInner<dyn Fn(&ClickEvent, &mut Window, &mut App)>>: Freeze,
impl Move for ToastClose
impl Unpin for ToastClosewhere
NonZero<u32>: Unpin,
&'static str: Unpin,
Arc<str>: Unpin,
Arc<Path>: Unpin,
*const str is !null: Unpin,
Arc<ElementId>: Unpin,
*const u8 is !null: Unpin,
Arc<RwLock<RawRwLock, FocusMap>>: Unpin,
Rc<RefCell<ScrollHandleState>>: Unpin,
Rc<RefCell<Point<Pixels>>>: Unpin,
Rc<RefCell<OngoingScroll>>: Unpin,
Box<StyleRefinement>: Unpin,
*const (): Unpin,
Box<dyn Fn(&(dyn Any + 'static), &mut Window, &mut App) -> StyleRefinement>: Unpin,
Box<dyn Fn(&MouseDownEvent, DispatchPhase, &Hitbox, &mut Window, &mut App)>: Unpin,
Box<dyn Fn(&MouseUpEvent, DispatchPhase, &Hitbox, &mut Window, &mut App)>: Unpin,
Box<dyn Fn(&MousePressureEvent, DispatchPhase, &Hitbox, &mut Window, &mut App)>: Unpin,
Box<dyn Fn(&MouseMoveEvent, DispatchPhase, &Hitbox, &mut Window, &mut App)>: Unpin,
Box<dyn Fn(&MouseExitEvent, DispatchPhase, &Hitbox, &mut Window, &mut App)>: Unpin,
Box<dyn Fn(&FileDropEvent, DispatchPhase, &Hitbox, &mut Window, &mut App)>: Unpin,
Box<dyn Fn(&ScrollEvent, DispatchPhase, &Hitbox, &mut Window, &mut App)>: Unpin,
Box<dyn Fn(&PinchEvent, DispatchPhase, &Hitbox, &mut Window, &mut App)>: Unpin,
Box<dyn Fn(&BackGestureEvent, DispatchPhase, &Hitbox, &mut Window, &mut App)>: Unpin,
Box<dyn Fn(&KeyDownEvent, DispatchPhase, &mut Window, &mut App)>: Unpin,
Box<dyn Fn(&KeyUpEvent, DispatchPhase, &mut Window, &mut App)>: Unpin,
Box<dyn Fn(&ModifiersChangedEvent, &mut Window, &mut App)>: Unpin,
Box<dyn Fn(&(dyn Any + 'static), DispatchPhase, &mut Window, &mut App)>: Unpin,
Box<dyn Fn(&(dyn Any + 'static), &mut Window, &mut App)>: Unpin,
Box<dyn Fn(&(dyn Any + 'static), &mut Window, &mut App) -> bool>: Unpin,
Rc<dyn Fn(&ClickEvent, &mut Window, &mut App)>: Unpin,
Arc<dyn Any>: Unpin,
Box<dyn Fn(&(dyn Any + 'static), Point<Pixels>, &mut Window, &mut App) -> AnyView>: Unpin,
Box<dyn Fn(&(dyn Any + 'static), &mut Window, &mut App) -> Option<ExternalDragPayload>>: Unpin,
Box<dyn Fn(&bool, &mut Window, &mut App)>: Unpin,
Rc<dyn Fn(&mut Window, &mut App) -> AnyView>: Unpin,
Box<dyn FnMut(Option<&ActionData>, &mut Window, &mut App)>: Unpin,
Box<dyn FnOnce(&mut A11ySubtreeBuilder<'_>)>: Unpin,
&'static Location<'static>: Unpin,
*mut dyn ElementObject: Unpin,
Rc<Cell<bool>>: Unpin,
*const AnyElement is !null: Unpin,
Box<dyn Fn(Vec<Bounds<Pixels>>, &mut Window, &mut App)>: Unpin,
Box<dyn ImageCacheProvider>: Unpin,
Box<dyn Fn(&mut Window, &mut App) -> SmallVec<[usize; 8]>>: Unpin,
Arc<Vec<(String, u32)>>: Unpin,
Arc<Vec<String>>: Unpin,
impl UnsafeUnpin for ToastClosewhere
NonZeroU32Inner: UnsafeUnpin,
&'static str: UnsafeUnpin,
*const ArcInner<str> is !null: UnsafeUnpin,
PhantomData<ArcInner<str>>: UnsafeUnpin,
*const ArcInner<Path> is !null: UnsafeUnpin,
PhantomData<ArcInner<Path>>: UnsafeUnpin,
*const str is !null: UnsafeUnpin,
PhantomData<&'static str>: UnsafeUnpin,
*const ArcInner<ElementId> is !null: UnsafeUnpin,
PhantomData<ArcInner<ElementId>>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<ContextEntry>: UnsafeUnpin,
*const ArcInner<RwLock<RawRwLock, FocusMap>> is !null: UnsafeUnpin,
PhantomData<ArcInner<RwLock<RawRwLock, FocusMap>>>: UnsafeUnpin,
*const RcInner<RefCell<ScrollHandleState>> is !null: UnsafeUnpin,
PhantomData<RcInner<RefCell<ScrollHandleState>>>: UnsafeUnpin,
*const RcInner<RefCell<Point<Pixels>>> is !null: UnsafeUnpin,
PhantomData<RcInner<RefCell<Point<Pixels>>>>: UnsafeUnpin,
*const RcInner<RefCell<OngoingScroll>> is !null: UnsafeUnpin,
PhantomData<RcInner<RefCell<OngoingScroll>>>: UnsafeUnpin,
*const StyleRefinement is !null: UnsafeUnpin,
PhantomData<StyleRefinement>: UnsafeUnpin,
PhantomData<(TypeId, Box<dyn Fn(&(dyn Any + 'static), &mut Window, &mut App) -> StyleRefinement>)>: UnsafeUnpin,
PhantomData<(TypeId, GroupStyle)>: UnsafeUnpin,
PhantomData<Box<dyn Fn(&MouseDownEvent, DispatchPhase, &Hitbox, &mut Window, &mut App)>>: UnsafeUnpin,
PhantomData<Box<dyn Fn(&MouseUpEvent, DispatchPhase, &Hitbox, &mut Window, &mut App)>>: UnsafeUnpin,
PhantomData<Box<dyn Fn(&MousePressureEvent, DispatchPhase, &Hitbox, &mut Window, &mut App)>>: UnsafeUnpin,
PhantomData<Box<dyn Fn(&MouseMoveEvent, DispatchPhase, &Hitbox, &mut Window, &mut App)>>: UnsafeUnpin,
PhantomData<Box<dyn Fn(&MouseExitEvent, DispatchPhase, &Hitbox, &mut Window, &mut App)>>: UnsafeUnpin,
PhantomData<Box<dyn Fn(&FileDropEvent, DispatchPhase, &Hitbox, &mut Window, &mut App)>>: UnsafeUnpin,
PhantomData<Box<dyn Fn(&ScrollEvent, DispatchPhase, &Hitbox, &mut Window, &mut App)>>: UnsafeUnpin,
PhantomData<Box<dyn Fn(&PinchEvent, DispatchPhase, &Hitbox, &mut Window, &mut App)>>: UnsafeUnpin,
PhantomData<Box<dyn Fn(&BackGestureEvent, DispatchPhase, &Hitbox, &mut Window, &mut App)>>: UnsafeUnpin,
PhantomData<Box<dyn Fn(&KeyDownEvent, DispatchPhase, &mut Window, &mut App)>>: UnsafeUnpin,
PhantomData<Box<dyn Fn(&KeyUpEvent, DispatchPhase, &mut Window, &mut App)>>: UnsafeUnpin,
PhantomData<Box<dyn Fn(&ModifiersChangedEvent, &mut Window, &mut App)>>: UnsafeUnpin,
PhantomData<(TypeId, Box<dyn Fn(&(dyn Any + 'static), DispatchPhase, &mut Window, &mut App)>)>: UnsafeUnpin,
PhantomData<(TypeId, Box<dyn Fn(&(dyn Any + 'static), &mut Window, &mut App)>)>: UnsafeUnpin,
*const dyn Fn(&(dyn Any + 'static), &mut Window, &mut App) -> bool is !null: UnsafeUnpin,
PhantomData<dyn Fn(&(dyn Any + 'static), &mut Window, &mut App) -> bool>: UnsafeUnpin,
PhantomData<Rc<dyn Fn(&ClickEvent, &mut Window, &mut App)>>: UnsafeUnpin,
*const ArcInner<dyn Any> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn Any>>: UnsafeUnpin,
*const dyn Fn(&(dyn Any + 'static), Point<Pixels>, &mut Window, &mut App) -> AnyView is !null: UnsafeUnpin,
PhantomData<dyn Fn(&(dyn Any + 'static), Point<Pixels>, &mut Window, &mut App) -> AnyView>: UnsafeUnpin,
*const dyn Fn(&(dyn Any + 'static), &mut Window, &mut App) -> Option<ExternalDragPayload> is !null: UnsafeUnpin,
PhantomData<dyn Fn(&(dyn Any + 'static), &mut Window, &mut App) -> Option<ExternalDragPayload>>: UnsafeUnpin,
*const dyn Fn(&bool, &mut Window, &mut App) is !null: UnsafeUnpin,
PhantomData<dyn Fn(&bool, &mut Window, &mut App)>: UnsafeUnpin,
*const RcInner<dyn Fn(&mut Window, &mut App) -> AnyView> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Fn(&mut Window, &mut App) -> AnyView>>: UnsafeUnpin,
PhantomData<(Action, Box<dyn FnMut(Option<&ActionData>, &mut Window, &mut App)>)>: UnsafeUnpin,
*const dyn FnOnce(&mut A11ySubtreeBuilder<'_>) is !null: UnsafeUnpin,
PhantomData<dyn FnOnce(&mut A11ySubtreeBuilder<'_>)>: UnsafeUnpin,
&'static Location<'static>: UnsafeUnpin,
*mut dyn ElementObject: UnsafeUnpin,
*const RcInner<Cell<bool>> is !null: UnsafeUnpin,
PhantomData<RcInner<Cell<bool>>>: UnsafeUnpin,
*const AnyElement is !null: UnsafeUnpin,
*const dyn Fn(Vec<Bounds<Pixels>>, &mut Window, &mut App) is !null: UnsafeUnpin,
PhantomData<dyn Fn(Vec<Bounds<Pixels>>, &mut Window, &mut App)>: UnsafeUnpin,
*const dyn ImageCacheProvider is !null: UnsafeUnpin,
PhantomData<dyn ImageCacheProvider>: UnsafeUnpin,
*const dyn Fn(&mut Window, &mut App) -> SmallVec<[usize; 8]> is !null: UnsafeUnpin,
PhantomData<dyn Fn(&mut Window, &mut App) -> SmallVec<[usize; 8]>>: UnsafeUnpin,
PhantomData<BoxShadow>: UnsafeUnpin,
*const ArcInner<Vec<(String, u32)>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Vec<(String, u32)>>>: UnsafeUnpin,
*const ArcInner<Vec<String>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Vec<String>>>: UnsafeUnpin,
*const RcInner<dyn Fn(&ClickEvent, &mut Window, &mut App)> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Fn(&ClickEvent, &mut Window, &mut App)>>: UnsafeUnpin,
Blanket Implementations§
Source§impl<E> AnimationExt for Ewhere
E: IntoElement + 'static,
impl<E> AnimationExt for Ewhere
E: IntoElement + 'static,
Source§fn with_animation(
self,
id: impl Into<ElementId>,
animation: Animation,
animator: impl Fn(Self, f32) -> Self + 'static,
) -> AnimationElement<Self>where
Self: Sized,
fn with_animation(
self,
id: impl Into<ElementId>,
animation: Animation,
animator: impl Fn(Self, f32) -> Self + 'static,
) -> AnimationElement<Self>where
Self: Sized,
Render this component or element with an animation
Source§fn with_animations(
self,
id: impl Into<ElementId>,
animations: Vec<Animation>,
animator: impl Fn(Self, usize, f32) -> Self + 'static,
) -> AnimationElement<Self>where
Self: Sized,
fn with_animations(
self,
id: impl Into<ElementId>,
animations: Vec<Animation>,
animator: impl Fn(Self, usize, f32) -> Self + 'static,
) -> AnimationElement<Self>where
Self: Sized,
Render this component or element with a chain of animations
Source§fn with_spring<T>(
self,
id: impl Into<ElementId>,
animation: SpringAnimation<T>,
animator: impl FnOnce(Self, <T as SpringTarget>::Output) -> Self + 'static,
) -> SpringAnimationElement<Self>
fn with_spring<T>( self, id: impl Into<ElementId>, animation: SpringAnimation<T>, animator: impl FnOnce(Self, <T as SpringTarget>::Output) -> Self + 'static, ) -> SpringAnimationElement<Self>
Renders this component or element at the value produced by a spring. Read more
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> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> FluentBuilder for Twhere
T: IntoElement,
impl<T> FluentBuilder for Twhere
T: IntoElement,
Source§fn map<U>(self, f: impl FnOnce(Self) -> U) -> Uwhere
Self: Sized,
fn map<U>(self, f: impl FnOnce(Self) -> U) -> Uwhere
Self: Sized,
Imperatively modify self with the given closure.
Source§fn when(self, condition: bool, then: impl FnOnce(Self) -> Self) -> Selfwhere
Self: Sized,
fn when(self, condition: bool, then: impl FnOnce(Self) -> Self) -> Selfwhere
Self: Sized,
Conditionally modify self with the given closure.
Source§fn when_else(
self,
condition: bool,
then: impl FnOnce(Self) -> Self,
else_fn: impl FnOnce(Self) -> Self,
) -> Selfwhere
Self: Sized,
fn when_else(
self,
condition: bool,
then: impl FnOnce(Self) -> Self,
else_fn: impl FnOnce(Self) -> Self,
) -> Selfwhere
Self: Sized,
Conditionally modify self with the given closure.
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<E> TestTextExt for Ewhere
E: IntoElement,
impl<E> TestTextExt for Ewhere
E: IntoElement,
Source§fn test_text(
self,
text: impl Into<SharedString>,
) -> ObservedTextElement<Self::Element>
fn test_text( self, text: impl Into<SharedString>, ) -> ObservedTextElement<Self::Element>
With
test-support, records text each time the element paints.
Otherwise returns the element it builds.Source§fn test_alt_text(
self,
text: impl Into<SharedString>,
) -> ObservedTextElement<Self::Element>
fn test_alt_text( self, text: impl Into<SharedString>, ) -> ObservedTextElement<Self::Element>
Like
Self::test_text for an image’s alternative text, which
stands in for what the element draws.