Struct DlogutilEntry

Source
pub struct DlogutilEntry { /* private fields */ }
Expand description

A struct containing the metadata and contents for a single dlog entry.

Implementations§

Source§

impl DlogutilEntry

Source

pub fn get_timestamp(&self, stamp_type: SortingOrder) -> Result<Duration>

Retrieves the timestamp of given type from the log entry.

The information about timestamp availability can be retrieved using the buffer_check_ts_type_available function.

§Returns
  • Ok(Duration) - Timestamp of the entry as a Duration struct.
  • Err(std::io::Error) - An error.
§Errors
Source

pub fn get_tid(&self) -> Result<i32>

Retrieves the TID (thread identificator) of the log sender.

If LogIdKmsg is used as the buffer, this function will always return TIZEN_ERROR_NO_DATA. This is because the KMSG buffer contains no TID information.

§Returns
  • Ok(i32) - TID of the log sender.
  • Err(std::io::Error) - An error.
§Errors
Source

pub fn get_pid(&self) -> Result<i32>

Retrieves the PID (process identificator) of the log sender.

If LogIdKmsg is used as the buffer, this function will always return TIZEN_ERROR_NO_DATA. This is because the KMSG buffer contains no PID information.

§Returns
  • Ok(i32) - PID of the log sender.
  • Err(std::io::Error) - An error.
§Errors
Source

pub fn get_priority(&self) -> Result<Priority>

Retrieves the priority level metadata of the log entry.

§Returns
  • Ok(Priority) - Log priority.
  • Err(std::io::Error) - An error.
§Errors
Source

pub fn get_tag(&self) -> Result<&str>

Retrieves the tag (arbitrary label) of the log entry.

In some rare cases the entry may be malformed and the tag may turn out to be unavailable.

In such cases, an empty string may be returned instead.

§Returns
  • Ok(&str) - Log tag.
  • Err(std::io::Error) - An error.
§Errors
Source

pub fn get_message(&self) -> Result<&str>

Retrieves the message (without any metadata) of the log entry.

In some rare cases the entry may be malformed and the message may turn out to be unavailable.

In such cases, an empty string may be returned instead.

§Returns
  • Ok(&str) - Log message.
  • Err(std::io::Error) - An error.
§Errors

Trait Implementations§

Source§

impl Drop for DlogutilEntry

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl Send for DlogutilEntry

Source§

impl Sync for DlogutilEntry

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.