pub struct DebugLog(/* private fields */);Expand description
An object representing a Zircon ‘debuglog’ object.
As essentially a subtype of NullableHandle, it can be freely interconverted.
Implementations§
Source§impl DebugLog
impl DebugLog
Sourcepub fn into_raw(self) -> u32
pub fn into_raw(self) -> u32
Return the raw handle’s integer value without closing it when self is dropped.
Sourcepub fn duplicate(&self, rights: Rights) -> Result<DebugLog, Status>
pub fn duplicate(&self, rights: Rights) -> Result<DebugLog, Status>
Wraps the
zx_handle_duplicate
syscall.
Sourcepub fn replace(self, rights: Rights) -> Result<DebugLog, Status>
pub fn replace(self, rights: Rights) -> Result<DebugLog, Status>
Wraps the
zx_handle_replace
syscall.
Sourcepub fn signal(
&self,
clear_mask: Signals,
set_mask: Signals,
) -> Result<(), Status>
pub fn signal( &self, clear_mask: Signals, set_mask: Signals, ) -> Result<(), Status>
Wraps the
zx_object_signal
syscall.
Sourcepub fn wait_one(
&self,
signals: Signals,
deadline: Instant<MonotonicTimeline>,
) -> WaitResult
pub fn wait_one( &self, signals: Signals, deadline: Instant<MonotonicTimeline>, ) -> WaitResult
Wraps the
zx_object_wait_one
syscall.
Source§impl DebugLog
impl DebugLog
Sourcepub fn create(
resource: &Resource,
opts: DebugLogOpts,
) -> Result<DebugLog, Status>
pub fn create( resource: &Resource, opts: DebugLogOpts, ) -> Result<DebugLog, Status>
Create a debug log object that allows access to read from and write to the kernel debug logging facility.
Wraps the [zx_debuglog_create]((https://fuchsia.dev/fuchsia-src/reference/syscalls/debuglog_create.md) syscall.
Sourcepub fn write(&self, message: &[u8]) -> Result<(), Status>
pub fn write(&self, message: &[u8]) -> Result<(), Status>
Write a message to the kernel debug log.
Wraps the [zx_debuglog_write]((https://fuchsia.dev/fuchsia-src/reference/syscalls/debuglog_write.md) syscall.
Sourcepub fn read(&self) -> Result<DebugLogRecord, Status>
pub fn read(&self) -> Result<DebugLogRecord, Status>
Read a single log record from the kernel debug log.
The DebugLog object must have been created with DebugLogOpts::READABLE, or this will return an error.
Wraps the [zx_debuglog_read]((https://fuchsia.dev/fuchsia-src/reference/syscalls/debuglog_read.md) syscall.
Trait Implementations§
Source§impl AsHandleRef for DebugLog
impl AsHandleRef for DebugLog
Source§fn as_handle_ref(&self) -> Unowned<'_, NullableHandle>
fn as_handle_ref(&self) -> Unowned<'_, NullableHandle>
object_wait_many.