#[repr(C)]pub struct LinuxSigset {
pub sig: [c_size_t; 1],
}linux only.Expand description
๐ง ๐ถ โ ๐ป A raw Linux kernel signal mask.
๐ sys/os/linux/process
๐ฆ size_of::<LinuxSigset>() == 4 bytes / 32 bits #๏ธโฃ #[cfg(target_pointer_width = โ32โ)]
๐ฆ size_of::<LinuxSigset>() == 8 bytes / 64 bits #๏ธโฃ #[cfg(target_pointer_width = โ64โ)]
This is the mask representation passed to raw Linux signal syscalls.
Signal numbers start at 1, while mask bits start at 0,
so signal n is stored in bit n - 1.
For the semantic Devela set, use LinuxSignalSet.
Fieldsยง
ยงsig: [c_size_t; 1]Raw signal mask words.
Implementationsยง
Sourceยงimpl LinuxSigset
impl LinuxSigset
Sourcepub const MAX_SIGNAL: usize
pub const MAX_SIGNAL: usize
Highest supported standard Linux signal number.
Sourcepub const fn from_signal_set(signals: LinuxSignalSet) -> Self
pub const fn from_signal_set(signals: LinuxSignalSet) -> Self
Returns a raw mask from a semantic signal set.
Sourcepub const fn to_signal_set(self) -> LinuxSignalSet
pub const fn to_signal_set(self) -> LinuxSignalSet
Returns this raw mask as a semantic signal set.
Sourcepub const fn with_signal(self, signal: LinuxSignal) -> Self
pub const fn with_signal(self, signal: LinuxSignal) -> Self
Returns a copy with signal added.
Sourcepub const fn without_signal(self, signal: LinuxSignal) -> Self
pub const fn without_signal(self, signal: LinuxSignal) -> Self
Returns a copy with signal removed.
Ignores unsupported signal numbers.
Sourcepub const fn has_signal(self, signal: LinuxSignal) -> bool
pub const fn has_signal(self, signal: LinuxSignal) -> bool
Returns whether this raw mask contains signal.
Sourcepub fn insert_signal(&mut self, signal: LinuxSignal)
pub fn insert_signal(&mut self, signal: LinuxSignal)
Adds signal to this raw mask.
Sourcepub fn remove_signal(&mut self, signal: LinuxSignal)
pub fn remove_signal(&mut self, signal: LinuxSignal)
Removes signal from this raw mask.
ยงPanics
Panics if signal is not a supported standard Linux signal.
Sourcepub const fn with_signal_number(self, signal: c_int) -> Self
pub const fn with_signal_number(self, signal: c_int) -> Self
Returns a copy with the raw signal number added, if supported.
Trait Implementationsยง
Sourceยงimpl Clone for LinuxSigset
impl Clone for LinuxSigset
Sourceยงfn clone(&self) -> LinuxSigset
fn clone(&self) -> LinuxSigset
1.0.0 (const: unstable) ยท Sourceยงfn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for LinuxSigset
Sourceยงimpl Debug for LinuxSigset
impl Debug for LinuxSigset
Sourceยงimpl Default for LinuxSigset
impl Default for LinuxSigset
Sourceยงfn default() -> LinuxSigset
fn default() -> LinuxSigset
impl Eq for LinuxSigset
Sourceยงimpl From<LinuxSignalSet> for LinuxSigset
impl From<LinuxSignalSet> for LinuxSigset
Sourceยงfn from(signals: LinuxSignalSet) -> Self
fn from(signals: LinuxSignalSet) -> Self
Sourceยงimpl From<LinuxSigset> for LinuxSignalSet
impl From<LinuxSigset> for LinuxSignalSet
Sourceยงfn from(mask: LinuxSigset) -> Self
fn from(mask: LinuxSigset) -> Self
Sourceยงimpl Hash for LinuxSigset
impl Hash for LinuxSigset
Sourceยงimpl Ord for LinuxSigset
impl Ord for LinuxSigset
Sourceยงfn cmp(&self, other: &LinuxSigset) -> Ordering
fn cmp(&self, other: &LinuxSigset) -> Ordering
1.21.0 (const: unstable) ยท Sourceยงfn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Sourceยงimpl PartialEq for LinuxSigset
impl PartialEq for LinuxSigset
Sourceยงfn eq(&self, other: &LinuxSigset) -> bool
fn eq(&self, other: &LinuxSigset) -> bool
self and other values to be equal, and is used by ==.Sourceยงimpl PartialOrd for LinuxSigset
impl PartialOrd for LinuxSigset
impl StructuralPartialEq for LinuxSigset
Auto Trait Implementationsยง
impl Freeze for LinuxSigset
impl RefUnwindSafe for LinuxSigset
impl Send for LinuxSigset
impl Sync for LinuxSigset
impl Unpin for LinuxSigset
impl UnsafeUnpin for LinuxSigset
impl UnwindSafe for LinuxSigset
Blanket Implementationsยง
Sourceยงimpl<T> AnyExt for T
impl<T> AnyExt for T
Sourceยงfn type_hash_with<H: Hasher>(&self, hasher: H) -> u64
fn type_hash_with<H: Hasher>(&self, hasher: H) -> u64
TypeId of Self using a custom hasher.Sourceยงfn as_any_mut(&mut self) -> &mut dyn Anywhere
Self: Sized,
fn as_any_mut(&mut self) -> &mut dyn Anywhere
Self: Sized,
Sourceยงfn as_any_box(self: Box<Self>) -> Box<dyn Any>where
Self: Sized,
fn as_any_box(self: Box<Self>) -> Box<dyn Any>where
Self: Sized,
alloc only.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
Sourceยงimpl<T> ByteSized for T
impl<T> ByteSized for T
Sourceยงconst BYTE_ALIGN: usize = _
const BYTE_ALIGN: usize = _
Sourceยงfn byte_align(&self) -> usize
fn byte_align(&self) -> usize
Sourceยงfn ptr_size_ratio(&self) -> [usize; 2]
fn ptr_size_ratio(&self) -> [usize; 2]
Sourceยงimpl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Sourceยงimpl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Sourceยงimpl<T> MemExt for Twhere
T: ?Sized,
impl<T> MemExt for Twhere
T: ?Sized,
Sourceยงconst NEEDS_DROP: bool = _
const NEEDS_DROP: bool = _
Sourceยงfn mem_align_of<T>() -> usize
fn mem_align_of<T>() -> usize
Sourceยงfn mem_align_of_val(&self) -> usize
fn mem_align_of_val(&self) -> usize
Sourceยงfn mem_size_of<T>() -> usize
fn mem_size_of<T>() -> usize
Sourceยงfn mem_size_of_val(&self) -> usize
fn mem_size_of_val(&self) -> usize
Sourceยงfn mem_needs_drop(&self) -> bool
fn mem_needs_drop(&self) -> bool
true if dropping values of this type matters. Read moreSourceยงfn mem_forget(self)where
Self: Sized,
fn mem_forget(self)where
Self: Sized,
self without running its destructor. Read moreSourceยงfn mem_replace(&mut self, other: Self) -> Selfwhere
Self: Sized,
fn mem_replace(&mut self, other: Self) -> Selfwhere
Self: Sized,
Sourceยงunsafe fn mem_zeroed<T>() -> T
unsafe fn mem_zeroed<T>() -> T
unsafe_layout only.T represented by the all-zero byte-pattern. Read moreSourceยงunsafe fn mem_transmute_copy<Src, Dst>(src: &Src) -> Dst
unsafe fn mem_transmute_copy<Src, Dst>(src: &Src) -> Dst
unsafe_layout only.T represented by the all-zero byte-pattern. Read moreSourceยงfn mem_as_bytes(&self) -> &[u8] โ
fn mem_as_bytes(&self) -> &[u8] โ
unsafe_slice only.