Struct WakeLockName
#[repr(C)]pub struct WakeLockName {
bytes: [u8; 40],
len: c_int,
}Expand description
A validated wake lock name.
A name has 1 to Self::MAX_LEN bytes and no ASCII whitespace or control
characters. The kernel prints names unescaped into the tab-separated table
in /sys/kernel/debug/wakeup_sources, and whitespace would break it.
The kernel only uses the name to tell wake locks apart and to show them in
debugfs. Names are global, so creating a wake lock fails while any process
has one with the same name. Quectel’s library uses <pid>.<name> to avoid
this.
The layout matches struct wakelock_name of the driver.
Fields§
§bytes: [u8; 40]§len: c_intImplementations§
§impl WakeLockName
impl WakeLockName
Trait Implementations§
§impl AsRef<str> for WakeLockName
impl AsRef<str> for WakeLockName
§impl Clone for WakeLockName
impl Clone for WakeLockName
§fn clone(&self) -> WakeLockName
fn clone(&self) -> WakeLockName
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for WakeLockName
§impl Debug for WakeLockName
impl Debug for WakeLockName
§impl Display for WakeLockName
impl Display for WakeLockName
impl Eq for WakeLockName
§impl FromStr for WakeLockName
impl FromStr for WakeLockName
§impl Hash for WakeLockName
impl Hash for WakeLockName
§impl PartialEq for WakeLockName
impl PartialEq for WakeLockName
impl StructuralPartialEq for WakeLockName
Auto Trait Implementations§
impl Freeze for WakeLockName
impl RefUnwindSafe for WakeLockName
impl Send for WakeLockName
impl Sync for WakeLockName
impl Unpin for WakeLockName
impl UnsafeUnpin for WakeLockName
impl UnwindSafe for WakeLockName
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