MCPcopy Create free account
hub / github.com/bytecodealliance/rustix / decode_error_code

Method decode_error_code

src/backend/linux_raw/reg.rs:171–179  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

169
170 #[inline]
171 pub(super) fn decode_error_code(self) -> u16 {
172 let bits = self.raw as usize;
173
174 // `raw` must be in `-4095..0`. Linux always returns errors in
175 // `-4095..0`, and we double-check it here.
176 debug_assert!((-4095..0).contains(&(bits as isize)));
177
178 bits as u16
179 }
180
181 #[inline]
182 pub(super) fn is_nonzero(&self) -> bool {

Callers 8

try_decode_c_intFunction · 0.80
try_decode_c_uintFunction · 0.80
try_decode_usizeFunction · 0.80
try_decode_void_starFunction · 0.80
try_decode_u64Function · 0.80
try_decode_raw_fdFunction · 0.80
try_decode_voidFunction · 0.80
try_decode_errorFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected