Struct unwind_context::UnwindContextArgs
source · pub struct UnwindContextArgs<Params>(pub Params);
Expand description
A structure representing function argument names and their values.
This type is not intended to be used directly. Consider using macros like
build_unwind_context_data
or unwind_context
instead.
Tuple Fields§
§0: Params
Function argument names and values in cons-like list representation.
Implementations§
source§impl<Params> UnwindContextArgs<Params>
impl<Params> UnwindContextArgs<Params>
sourcepub fn new(args: Params) -> Self
pub fn new(args: Params) -> Self
Create a new UnwindContextArgs
with the provided parameters.
Parameters are required to be represented as a recursive tuple list like
(A, (B, (C, (D, ()))))
in order to be formatted.
§Examples
use unwind_context::{UnwindContextArg, UnwindContextArgs};
let args0 = UnwindContextArgs::new(());
let args1 = UnwindContextArgs::new((UnwindContextArg::new(Some("first"), 123), ()));
let args3 = UnwindContextArgs::new((
UnwindContextArg::new(Some("first"), 123),
(
UnwindContextArg::new(Some("second"), "foo"),
(UnwindContextArg::new(Some("third"), true), ()),
),
));
Trait Implementations§
source§impl<Params: Clone> Clone for UnwindContextArgs<Params>
impl<Params: Clone> Clone for UnwindContextArgs<Params>
source§fn clone(&self) -> UnwindContextArgs<Params>
fn clone(&self) -> UnwindContextArgs<Params>
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 Debug for UnwindContextArgs<&()>
impl Debug for UnwindContextArgs<&()>
source§impl<First> Debug for UnwindContextArgs<&(UnwindContextArg<First>, ())>where
First: Debug,
impl<First> Debug for UnwindContextArgs<&(UnwindContextArg<First>, ())>where
First: Debug,
source§impl<'a, First, Second, Rest> Debug for UnwindContextArgs<&'a (UnwindContextArg<First>, (Second, Rest))>
impl<'a, First, Second, Rest> Debug for UnwindContextArgs<&'a (UnwindContextArg<First>, (Second, Rest))>
source§impl Debug for UnwindContextArgs<()>
impl Debug for UnwindContextArgs<()>
source§impl<First, Rest> Debug for UnwindContextArgs<(First, Rest)>
impl<First, Rest> Debug for UnwindContextArgs<(First, Rest)>
source§impl DebugAnsiColored for UnwindContextArgs<&()>
impl DebugAnsiColored for UnwindContextArgs<&()>
source§fn fmt_colored(
&self,
_: &mut Formatter<'_>,
_: &'static AnsiColorScheme
) -> FmtResult
fn fmt_colored( &self, _: &mut Formatter<'_>, _: &'static AnsiColorScheme ) -> FmtResult
Formats the value using with colorization and a given
AnsiColorScheme
. Read moresource§impl<First> DebugAnsiColored for UnwindContextArgs<&(UnwindContextArg<First>, ())>where
First: Debug,
impl<First> DebugAnsiColored for UnwindContextArgs<&(UnwindContextArg<First>, ())>where
First: Debug,
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<'a, First, Second, Rest> DebugAnsiColored for UnwindContextArgs<&'a (UnwindContextArg<First>, (Second, Rest))>
impl<'a, First, Second, Rest> DebugAnsiColored for UnwindContextArgs<&'a (UnwindContextArg<First>, (Second, Rest))>
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 DebugAnsiColored for UnwindContextArgs<()>
impl DebugAnsiColored for UnwindContextArgs<()>
source§fn fmt_colored(
&self,
_: &mut Formatter<'_>,
_: &'static AnsiColorScheme
) -> FmtResult
fn fmt_colored( &self, _: &mut Formatter<'_>, _: &'static AnsiColorScheme ) -> FmtResult
Formats the value using with colorization and a given
AnsiColorScheme
. Read moresource§impl<First, Rest> DebugAnsiColored for UnwindContextArgs<(First, Rest)>
impl<First, Rest> DebugAnsiColored for UnwindContextArgs<(First, Rest)>
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<Params: Hash> Hash for UnwindContextArgs<Params>
impl<Params: Hash> Hash for UnwindContextArgs<Params>
source§impl<Params: Ord> Ord for UnwindContextArgs<Params>
impl<Params: Ord> Ord for UnwindContextArgs<Params>
source§fn cmp(&self, other: &UnwindContextArgs<Params>) -> Ordering
fn cmp(&self, other: &UnwindContextArgs<Params>) -> 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<Params: PartialEq> PartialEq for UnwindContextArgs<Params>
impl<Params: PartialEq> PartialEq for UnwindContextArgs<Params>
source§fn eq(&self, other: &UnwindContextArgs<Params>) -> bool
fn eq(&self, other: &UnwindContextArgs<Params>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<Params: PartialOrd> PartialOrd for UnwindContextArgs<Params>
impl<Params: PartialOrd> PartialOrd for UnwindContextArgs<Params>
source§fn partial_cmp(&self, other: &UnwindContextArgs<Params>) -> Option<Ordering>
fn partial_cmp(&self, other: &UnwindContextArgs<Params>) -> 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<Params: Eq> Eq for UnwindContextArgs<Params>
impl<Params> StructuralPartialEq for UnwindContextArgs<Params>
Auto Trait Implementations§
impl<Params> RefUnwindSafe for UnwindContextArgs<Params>where
Params: RefUnwindSafe,
impl<Params> Send for UnwindContextArgs<Params>where
Params: Send,
impl<Params> Sync for UnwindContextArgs<Params>where
Params: Sync,
impl<Params> Unpin for UnwindContextArgs<Params>where
Params: Unpin,
impl<Params> UnwindSafe for UnwindContextArgs<Params>where
Params: 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