logos.std.io.error
Module std · package logos-std
Types
structBorrowedBuf
struct BorrowedBuf
Writable byte-buffer cursor tracking how many bytes have been filled so far.
Simplified port of Rust’s io::BorrowedBuf: memory is assumed initialised (no uninit tracking).
Fields
capacity: i64
Total buffer size in bytes.
data: *mut u8
Base pointer of the underlying writable buffer.
filled: i64
Count of valid bytes written so far, from the start of data.
Methods
fn advance(self: &mut BorrowedBuf, n: i64) -> void
Advances filled by n; no bounds check against capacity.
Caller asserts n bytes are valid in [self.filled, self.filled + n).
fn clear(self: &mut BorrowedBuf) -> void
Resets filled to 0; the underlying bytes are untouched.
fn remaining(self: &BorrowedBuf) -> i64
Returns the number of unfilled bytes remaining.
enumErrorKind
enum ErrorKind
Category of an I/O error, mirroring Rust’s std::io::ErrorKind.
Variants
AddrInUse
AddrNotAvailable
AlreadyExists
BrokenPipe
ConnectionAborted
ConnectionRefused
ConnectionReset
Interrupted
InvalidData
InvalidInput
NotConnected
NotFound
Other
OutOfMemory
PermissionDenied
TimedOut
UnexpectedEof
Unsupported
WouldBlock
WriteZero
structIoError
struct IoError
Structured I/O error: an ErrorKind plus an optional OS errno and a static message.
Implements: Error
Fields
kind: ErrorKind
Error category.
message: &[u8]
Static human-readable message; "" when absent.
raw_os_error: i32
Raw OS errno; -1 when the error is not OS-derived.
Methods
fn source(self: &IoError) -> Option
Functions
fnborrowed_buf_new
fn borrowed_buf_new(data: *mut u8, capacity: i64) -> BorrowedBuf
Creates a BorrowedBuf over capacity writable bytes at data, with nothing filled.
data must point to at least capacity writable bytes that outlive the buffer.
fnio_error_from_errno
fn io_error_from_errno(errno: i32) -> IoError
Wraps an OS-derived errno into a structured IoError.
Maps the usual errno subset to ErrorKind variants; unknown values map to ErrorKind::Other.
The message is left empty.
fnio_error_new
fn io_error_new(kind: ErrorKind, message: &[u8]) -> IoError
Creates an IoError not attributed to any OS error; raw_os_error() on it returns None.