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 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.