#[repr(transparent)]pub struct FigStatus(pub c_int);Expand description
A fig C ABI status code, as a transparent wrapper over the raw c_int the
ABI returns — deliberately not a Rust enum.
A fieldless #[repr(C)] enum returned by value from an extern "C" function
is undefined behavior the instant the callee returns a discriminant the enum
does not list, and fig’s status set is allowed to grow after 1.0. The newtype
preserves any code unchanged; compare against the associated constants and
route unrecognized values through a fallback (the fig crate does this in
its Error::from_status).
Tuple Fields§
§0: c_intImplementations§
Source§impl FigStatus
impl FigStatus
pub const OK: c_int = 0
pub const INVALID_ARGUMENT: c_int = 1
pub const PARSE_ERROR: c_int = 2
pub const OUT_OF_MEMORY: c_int = 3
pub const UNSUPPORTED_FORMAT: c_int = 4
pub const NOT_FOUND: c_int = 5
pub const INTERNAL_ERROR: c_int = 255
Trait Implementations§
impl Copy for FigStatus
impl Eq for FigStatus
impl StructuralPartialEq for FigStatus
Auto Trait Implementations§
impl Freeze for FigStatus
impl RefUnwindSafe for FigStatus
impl Send for FigStatus
impl Sync for FigStatus
impl Unpin for FigStatus
impl UnsafeUnpin for FigStatus
impl UnwindSafe for FigStatus
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more