pub enum Error {
PermissionDenied,
NotFound,
AlreadyExists,
Unsupported,
InvalidState,
Disconnected,
Platform(PlatformErrorCode),
}Expand description
The single error type surfaced across the Net Lattice workspace.
Provider trait methods return Result<T, Error> — never a raw OS error
type (std::io::Error, a bare errno, a Windows DWORD). See
ARCHITECTURE.md’s Error Model for why.
Variants§
PermissionDenied
The operation requires privileges the caller does not have (e.g.
CAP_NET_ADMIN on Linux, Administrator on Windows).
NotFound
The referenced object does not exist.
AlreadyExists
An object with the same identity already exists.
Unsupported
The operation has no meaning on this backend at all, as opposed to
a Capability being merely absent at runtime.
InvalidState
The operation is not valid given the object’s current state.
Disconnected
An event channel’s producer (the backend’s background watcher) has
shut down — no further events will ever arrive. Distinct from a
timeout (which is not an error at all — see
EventReceiver::recv_timeout): this means the stream is over for
good, typically because the backend itself, or the connection it
watches over, was dropped.
Platform(PlatformErrorCode)
Escape hatch preserving the raw backend-specific error for diagnostics. Not the primary way consumers are expected to match on failures.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()