pub struct WithOrigin(/* private fields */);Available on crate feature
extended-siginfo only.Expand description
The Exfiltrator that produces Origin of
signals.
§Examples
// Subscribe to SIGUSR1, with information about the process.
let mut signals = SignalsInfo::<WithOrigin>::new(&[SIGUSR1])?;
// Send a signal to ourselves.
let my_pid = unsafe { libc::getpid() };
unsafe { libc::kill(my_pid, SIGUSR1) };
// Grab the signal and look into the details.
let received = signals.wait().next().unwrap();
assert_eq!(SIGUSR1, received.signal);
assert_eq!(my_pid, received.process.unwrap().pid);Trait Implementations§
Source§impl Clone for WithOrigin
Available on non-Windows and crate feature iterator only.
impl Clone for WithOrigin
Available on non-Windows and crate feature
iterator only.Source§fn clone(&self) -> WithOrigin
fn clone(&self) -> WithOrigin
Returns a duplicate 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 WithOrigin
Available on non-Windows and crate feature iterator only.
impl Debug for WithOrigin
Available on non-Windows and crate feature
iterator only.Source§impl Default for WithOrigin
Available on non-Windows and crate feature iterator only.
impl Default for WithOrigin
Available on non-Windows and crate feature
iterator only.Source§fn default() -> WithOrigin
fn default() -> WithOrigin
Returns the “default value” for a type. Read more
impl Copy for WithOrigin
Available on non-Windows and crate feature
iterator only.Auto Trait Implementations§
impl Freeze for WithOrigin
impl RefUnwindSafe for WithOrigin
impl Send for WithOrigin
impl Sync for WithOrigin
impl Unpin for WithOrigin
impl UnwindSafe for WithOrigin
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