pub struct ErrorInfo {
pub title: String,
pub details: String,
pub suggestions: Vec<String>,
pub technical: Option<String>,
}Expand description
An error dialog with details and suggestions
Fields§
§title: StringThe error title/summary
details: StringDetailed error message
suggestions: Vec<String>Suggested recovery actions
technical: Option<String>Technical details (for advanced users)
Implementations§
Source§impl ErrorInfo
impl ErrorInfo
Sourcepub fn from_error(error: &EnvelopeError) -> Self
pub fn from_error(error: &EnvelopeError) -> Self
Create error info from an EnvelopeError
Sourcepub fn simple(title: impl Into<String>, details: impl Into<String>) -> Self
pub fn simple(title: impl Into<String>, details: impl Into<String>) -> Self
Create a simple error info
Sourcepub fn with_suggestion(self, suggestion: impl Into<String>) -> Self
pub fn with_suggestion(self, suggestion: impl Into<String>) -> Self
Add a suggestion
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ErrorInfo
impl RefUnwindSafe for ErrorInfo
impl Send for ErrorInfo
impl Sync for ErrorInfo
impl Unpin for ErrorInfo
impl UnwindSafe for ErrorInfo
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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