Struct unwind_context::UnwindContextFunc
source · pub struct UnwindContextFunc<Args> {
pub name: &'static str,
pub args: Args,
}
Expand description
A structure representing function name and its argument names and values.
This type is not intended to be used directly. Consider using macros like
build_unwind_context_data
or unwind_context
instead.
Fields§
§name: &'static str
Function name.
args: Args
Function argument names and values.
Implementations§
source§impl<Args> UnwindContextFunc<Args>
impl<Args> UnwindContextFunc<Args>
sourcepub fn new(name: &'static str, args: Args) -> Self
pub fn new(name: &'static str, args: Args) -> Self
Create a new UnwindContextFunc
with the provided name and arguments.
§Examples
use unwind_context::{UnwindContextArg, UnwindContextFunc};
let func1 = UnwindContextFunc::new("name1", ());
let func2 = UnwindContextFunc::new("name2", (UnwindContextArg::new(Some("first"), 123), ()));
let func3 = UnwindContextFunc::new(
"name3",
(
UnwindContextArg::new(Some("first"), 123),
(
UnwindContextArg::new(Some("second"), "foo"),
(UnwindContextArg::new(Some("third"), true), ()),
),
),
);
Trait Implementations§
source§impl<Args: Clone> Clone for UnwindContextFunc<Args>
impl<Args: Clone> Clone for UnwindContextFunc<Args>
source§fn clone(&self) -> UnwindContextFunc<Args>
fn clone(&self) -> UnwindContextFunc<Args>
Returns a copy 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<Args> Debug for UnwindContextFunc<Args>
impl<Args> Debug for UnwindContextFunc<Args>
source§impl<Args> DebugAnsiColored for UnwindContextFunc<Args>
impl<Args> DebugAnsiColored for UnwindContextFunc<Args>
source§fn fmt_colored(
&self,
f: &mut Formatter<'_>,
color_scheme: &'static AnsiColorScheme
) -> FmtResult
fn fmt_colored( &self, f: &mut Formatter<'_>, color_scheme: &'static AnsiColorScheme ) -> FmtResult
Formats the value using with colorization and a given
AnsiColorScheme
. Read moresource§impl<Args: Hash> Hash for UnwindContextFunc<Args>
impl<Args: Hash> Hash for UnwindContextFunc<Args>
source§impl<Args: Ord> Ord for UnwindContextFunc<Args>
impl<Args: Ord> Ord for UnwindContextFunc<Args>
source§fn cmp(&self, other: &UnwindContextFunc<Args>) -> Ordering
fn cmp(&self, other: &UnwindContextFunc<Args>) -> 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<Args: PartialEq> PartialEq for UnwindContextFunc<Args>
impl<Args: PartialEq> PartialEq for UnwindContextFunc<Args>
source§fn eq(&self, other: &UnwindContextFunc<Args>) -> bool
fn eq(&self, other: &UnwindContextFunc<Args>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<Args: PartialOrd> PartialOrd for UnwindContextFunc<Args>
impl<Args: PartialOrd> PartialOrd for UnwindContextFunc<Args>
source§fn partial_cmp(&self, other: &UnwindContextFunc<Args>) -> Option<Ordering>
fn partial_cmp(&self, other: &UnwindContextFunc<Args>) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl<Args: Eq> Eq for UnwindContextFunc<Args>
impl<Args> StructuralPartialEq for UnwindContextFunc<Args>
Auto Trait Implementations§
impl<Args> RefUnwindSafe for UnwindContextFunc<Args>where
Args: RefUnwindSafe,
impl<Args> Send for UnwindContextFunc<Args>where
Args: Send,
impl<Args> Sync for UnwindContextFunc<Args>where
Args: Sync,
impl<Args> Unpin for UnwindContextFunc<Args>where
Args: Unpin,
impl<Args> UnwindSafe for UnwindContextFunc<Args>where
Args: UnwindSafe,
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