#[non_exhaustive]pub enum PresentError {
Busy,
NoHost,
Unsupported,
InvalidSpec(String),
Platform(String),
}Expand description
Why a presentation could not be shown or did not complete.
thiserror-derived per docs/CODE_STANDARDS.md: callers match on the
variant.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Busy
Another presentation is live — one at a time, process-wide. Recover
by resolving it: take it down through its PresentationHandle with
dismiss, or drop its Presentation future — either frees the
slot. A refusal logs the live presentation’s generation and how long
it has been held (where the target has a monotonic clock); see
docs/LIMITATIONS.md’s native-widgets-alert-busy-slot-unobserved-host-teardown
for the case where a live presentation outlives an unobserved host teardown.
NoHost
No host to present over: no resumed Android Activity, no iOS
window scene with a root view controller, no macOS key/main window.
Unsupported
This platform has no native presentation of this kind.
InvalidSpec(String)
The request broke a submit-time rule (see AlertSpec /
SheetSpec::validate).
Platform(String)
A platform failure not covered above (a JNI/Objective-C error, an arm that ended without an outcome).
Trait Implementations§
Source§impl Clone for PresentError
impl Clone for PresentError
Source§impl Debug for PresentError
impl Debug for PresentError
Source§impl Display for PresentError
impl Display for PresentError
impl Eq for PresentError
Source§impl Error for PresentError
impl Error for PresentError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl PartialEq for PresentError
impl PartialEq for PresentError
impl StructuralPartialEq for PresentError
Auto Trait Implementations§
impl Freeze for PresentError
impl RefUnwindSafe for PresentError
impl Send for PresentError
impl Sync for PresentError
impl Unpin for PresentError
impl UnsafeUnpin for PresentError
impl UnwindSafe for PresentError
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
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<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
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.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.