Skip to main content

SignalInfo

Struct SignalInfo 

Source
#[repr(C)]
pub struct SignalInfo { pub signal: c_int, pub errno: c_int, pub code: c_int, pub _pad0: u32, pub addr: u64, pub _trailing: [u8; 104], }
Expand description

siginfo_t parsé pour un handler fatal. Layout C miroir du siginfo_t Linux côté receiver — différent de super::SignalInfo qui est le builder côté sender.

Champs exposés : les plus utiles à un crash reporter. Le reste du siginfo_t est dans _padding.

Fields§

§signal: c_int

si_signo : signal reçu (devrait correspondre à FatalSignal::as_signal sur le handler installé).

§errno: c_int

si_errno.

§code: c_int

si_code : type de fault (SEGV_MAPERR, SEGV_ACCERR, …).

§_pad0: u32

Padding à l’alignement union (4 octets sur 64-bit).

§addr: u64

si_addr : adresse mémoire fautive (pour SIGSEGV/SIGBUS).

§_trailing: [u8; 104]

Reste de la struct (~104 octets restants pour atteindre 128).

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.