pub struct Wakelock {
pub wakelock_id: Option<u32>,
pub wakelock_name: Option<String>,
pub wakelock_type: Option<i32>,
}Fields§
§wakelock_id: Option<u32>Interning id.
wakelock_name: Option<String>Name of the wakelock.
wakelock_type: Option<i32>Type of the wakelock. We record data about both true kernel wakelocks and “native” wakelocks which are taken in userspace but are more conceptually similar to kernel wakelocks than normal userspace ones.
Implementations§
Source§impl Wakelock
impl Wakelock
Sourcepub fn wakelock_id(&self) -> u32
pub fn wakelock_id(&self) -> u32
Returns the value of wakelock_id, or the default value if wakelock_id is unset.
Sourcepub fn wakelock_name(&self) -> &str
pub fn wakelock_name(&self) -> &str
Returns the value of wakelock_name, or the default value if wakelock_name is unset.
Sourcepub fn wakelock_type(&self) -> Type
pub fn wakelock_type(&self) -> Type
Returns the enum value of wakelock_type, or the default if the field is unset or set to an invalid enum value.
Sourcepub fn set_wakelock_type(&mut self, value: Type)
pub fn set_wakelock_type(&mut self, value: Type)
Sets wakelock_type to the provided enum value.
Trait Implementations§
Source§impl Message for Wakelock
impl Message for Wakelock
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message to a buffer. Read more
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message to a newly allocated buffer.
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message with a length-delimiter to a buffer. Read more
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message with a length-delimiter to a newly allocated buffer.
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes an instance of the message from a buffer. Read more
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes a length-delimited instance of the message from the buffer.
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes an instance of the message from a buffer, and merges it into
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes a length-delimited instance of the message from buffer, and
merges it into
self.impl Eq for Wakelock
impl StructuralPartialEq for Wakelock
Auto Trait Implementations§
impl Freeze for Wakelock
impl RefUnwindSafe for Wakelock
impl Send for Wakelock
impl Sync for Wakelock
impl Unpin for Wakelock
impl UnsafeUnpin for Wakelock
impl UnwindSafe for Wakelock
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