pub struct VisualPanic { /* private fields */ }
Expand description
The struct containing information on the current VisualPanic settings.
Implementations§
Source§impl VisualPanic
Provide public methods for VisualPanic
.
impl VisualPanic
Provide public methods for VisualPanic
.
Sourcepub fn new(
custom_icon: Option<&str>,
custom_title: Option<&str>,
custom_level: Option<VisualPanicLevel>,
) -> Self
pub fn new( custom_icon: Option<&str>, custom_title: Option<&str>, custom_level: Option<VisualPanicLevel>, ) -> Self
Implements a new struct with custom options.
The icon, title and level of the dialog can be set using Option<T>
, e.g.,
let visual_panic_options: VisualPanic = VisualPanic::new(
Some("path/to/custom_icon.png"),
Some("Custom Title"),
Some(VisualPanicLevel::Info)
);
Sourcepub fn register_global(self)
pub fn register_global(self)
Registers a VisualPanic
globally, i.e., for the whole application.
Returns currently nothing.
Will panic, if handling the &std::panic::PanicInfo
fails in any way or the native message dialog can not be spawned.
Trait Implementations§
Source§impl Clone for VisualPanic
impl Clone for VisualPanic
Source§fn clone(&self) -> VisualPanic
fn clone(&self) -> VisualPanic
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for VisualPanic
impl Debug for VisualPanic
Source§impl Default for VisualPanic
impl Default for VisualPanic
Source§fn default() -> VisualPanic
fn default() -> VisualPanic
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for VisualPanic
impl<'de> Deserialize<'de> for VisualPanic
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Hash for VisualPanic
impl Hash for VisualPanic
Source§impl Ord for VisualPanic
impl Ord for VisualPanic
Source§fn cmp(&self, other: &VisualPanic) -> Ordering
fn cmp(&self, other: &VisualPanic) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for VisualPanic
impl PartialEq for VisualPanic
Source§impl PartialOrd for VisualPanic
impl PartialOrd for VisualPanic
Source§impl Serialize for VisualPanic
impl Serialize for VisualPanic
impl Eq for VisualPanic
impl StructuralPartialEq for VisualPanic
Auto Trait Implementations§
impl Freeze for VisualPanic
impl RefUnwindSafe for VisualPanic
impl Send for VisualPanic
impl Sync for VisualPanic
impl Unpin for VisualPanic
impl UnwindSafe for VisualPanic
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