#[repr(C)]pub enum NetError {
Show 13 variants
Success = 0,
NullPointer = -1,
InvalidUtf8 = -2,
InvalidJson = -3,
InitFailed = -4,
IngestionFailed = -5,
PollFailed = -6,
BufferTooSmall = -7,
ShuttingDown = -8,
IntOverflow = -9,
MismatchedHandles = -10,
InteriorNul = -11,
Unknown = -99,
}Expand description
Error codes returned by FFI functions.
Variants§
Success = 0
Success (no error).
NullPointer = -1
Null pointer passed.
InvalidUtf8 = -2
Invalid UTF-8 string.
InvalidJson = -3
Invalid JSON.
InitFailed = -4
Initialization failed.
IngestionFailed = -5
Ingestion failed (backpressure).
PollFailed = -6
Poll failed.
BufferTooSmall = -7
Buffer too small.
ShuttingDown = -8
Shutting down.
IntOverflow = -9
Integer overflow: result does not fit in c_int.
MismatchedHandles = -10
Stream handle does not belong to the supplied node handle. Previously the send-family FFIs accepted any (stream, node) pair without verifying they were created from the same node, allowing silent cross-session traffic.
InteriorNul = -11
CString::new failure: the input bytes are valid UTF-8 by
Rust’s String invariant but contain an interior NUL byte
— and the C ABI cannot represent that, since C strings are
NUL-terminated. Pre-fix this was reported as
InvalidUtf8, which was wrong: the input is UTF-8-valid;
it just has a NUL where C expects it not to. A binding
reading the typed error and seeing “invalid UTF-8” would
chase the wrong cause.
Unknown = -99
Unknown error.