Lines Matching defs:code
21 pub mod code {
104 /// Creates an [`Error`] from a kernel error code.
106 /// `errno` must be within error code range (i.e. `>= -MAX_ERRNO && < 0`).
108 /// It is a bug to pass an out-of-range `errno`. [`code::EINVAL`] is returned in such a case.
132 code::EINVAL
136 /// Creates an [`Error`] from a kernel error code.
148 /// Creates an [`Error`] from a kernel error code.
152 /// `errno` must be within error code range (i.e. `>= -MAX_ERRNO && < 0`).
160 /// Returns the kernel error code.
218 code::ENOMEM
224 code::EINVAL
230 code::EINVAL
236 code::ENOMEM
242 code::EINVAL
261 /// typically return an `int` that represents a generic error code. We model
265 /// a [`Result`]. Since in the kernel many functions return an error code,
278 /// error handling is done explicitly by writing handling code for each