unwind_context/
non_exhaustive.rs

1use core::fmt::{Debug, Formatter, Result as FmtResult};
2
3/// A marker type which is used in arguments list to indicate that there are
4/// some other arguments that are omitted.
5///
6/// It is formatted as a `...` placeholder.
7///
8/// This type is not intended to be used directly. Consider using macros like
9/// [`build_unwind_context_data`] or [`unwind_context`] instead.
10///
11/// # Examples
12///
13/// ```rust
14/// let arg = unwind_context::UnwindContextArg::new(None, unwind_context::NonExhaustiveMarker);
15/// ```
16///
17/// [`build_unwind_context_data`]: crate::build_unwind_context_data
18/// [`unwind_context`]: crate::unwind_context
19#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash, Default)]
20pub struct NonExhaustiveMarker;
21
22impl Debug for NonExhaustiveMarker {
23    #[inline]
24    fn fmt(&self, f: &mut Formatter<'_>) -> FmtResult {
25        f.write_str("...")
26    }
27}