#[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 —
each is a FigStatus, so status == FigStatus::OK and a match arm both
work — 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: FigStatus
pub const INVALID_ARGUMENT: FigStatus
pub const PARSE_ERROR: FigStatus
pub const OUT_OF_MEMORY: FigStatus
pub const UNSUPPORTED_FORMAT: FigStatus
pub const NOT_FOUND: FigStatus
Sourcepub const UNSUPPORTED_OPERATION: FigStatus
pub const UNSUPPORTED_OPERATION: FigStatus
The operation is not defined for these arguments, though each is
individually valid. Added in core 2.7.0; see fig_embed_retype.
pub const INTERNAL_ERROR: FigStatus
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