Struct signal_hook::iterator::exfiltrator::raw::WithRawSiginfo
source · [−]pub struct WithRawSiginfo;
Expand description
The Exfiltrator
that produces the raw
libc::siginfo_t
. Note that it might look differently on different OSes and its API is a
little bit more limited than its C counterpart.
You might prefer the [WithOrigin
][super::WithOrigin] if you simply need information about the
origin of the signal.
Examples
// Subscribe to SIGUSR1, with information about the process.
let mut signals = SignalsInfo::<WithRawSiginfo>::new(&[SIGUSR1])?;
// Send ourselves a signal.
signal_hook::low_level::raise(SIGUSR1)?;
// Grab the signal and look into the details.
let received = signals.wait().next().unwrap();
// Not much else is useful in a cross-platform way :-(
assert_eq!(SIGUSR1, received.si_signo);
Trait Implementations
sourceimpl Clone for WithRawSiginfo
impl Clone for WithRawSiginfo
sourcefn clone(&self) -> WithRawSiginfo
fn clone(&self) -> WithRawSiginfo
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for WithRawSiginfo
impl Debug for WithRawSiginfo
sourceimpl Default for WithRawSiginfo
impl Default for WithRawSiginfo
sourcefn default() -> WithRawSiginfo
fn default() -> WithRawSiginfo
Returns the “default value” for a type. Read more
impl Copy for WithRawSiginfo
Auto Trait Implementations
impl RefUnwindSafe for WithRawSiginfo
impl Send for WithRawSiginfo
impl Sync for WithRawSiginfo
impl Unpin for WithRawSiginfo
impl UnwindSafe for WithRawSiginfo
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more