Struct signal_hook::iterator::exfiltrator::raw::WithRawSiginfo
source · pub struct WithRawSiginfo;
Available on non-Windows and crate feature
iterator
only.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
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§
source§impl Clone for WithRawSiginfo
impl Clone for WithRawSiginfo
source§fn clone(&self) -> WithRawSiginfo
fn clone(&self) -> WithRawSiginfo
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 WithRawSiginfo
impl Debug for WithRawSiginfo
source§impl Default for WithRawSiginfo
impl Default for WithRawSiginfo
source§fn 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§
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