silk/os_writer
Profiles: aarch64-apple-darwin, aarch64-unknown-linux-gnu, x86_64-unknown-linux-gnu.
Native Writer providers borrowing process standard output and standard error.
When to use
Construct StdoutWriter or StderrWriter at a native application edge and provide it for
silk.writer.Writer. Portable code can supply its own Writer provider instead.
Details
Construction makes no foreign call. Writes complete each byte sequence through selected libc descriptor calls. Flush is a no-op because these providers have no userspace buffer.
Gotchas
A failed write may have committed a prefix. Descriptors remain process-owned and are never closed by these providers. The module is empty on WebAssembly and no-libc profiles.
Import as StdoutWriter with import silk.os_writer { StdoutWriter }.
Public declarations: 2.
StdoutWriter
pub struct StdoutWriterA Writer provider borrowing process standard output without owning or closing its descriptor.
Associated function StdoutWriter.make
pub fn make() -> StdoutWriterCreates a provider borrowing standard output without making a foreign call.
StderrWriter
pub struct StderrWriterA Writer provider borrowing process standard error without owning or closing its descriptor.
Associated function StderrWriter.make
pub fn make() -> StderrWriterCreates a provider borrowing standard error without making a foreign call.
Implementation Writer for StdoutWriter
impl Writer for StdoutWriterOperation writeAll
writeAll = StdoutWriter.impl@0.writeAllOperation flush
flush = StdoutWriter.impl@0.flushImplementation Writer for StderrWriter
impl Writer for StderrWriterOperation writeAll
writeAll = StderrWriter.impl@1.writeAllOperation flush
flush = StderrWriter.impl@1.flush