mirror of
https://github.com/logos-blockchain/lssa.git
synced 2026-06-02 15:20:01 +00:00
This reverts commit 3fce53f663a3996938dddf77680854570063ca21, reversing changes made to e7b42a5177641455a8917bd2e29db20afd9690e5.
23 lines
426 B
Rust
23 lines
426 B
Rust
#[derive(Debug, Default, PartialEq, Eq)]
|
|
#[repr(C)]
|
|
pub enum OperationStatus {
|
|
#[default]
|
|
Ok = 0x0,
|
|
NullPointer = 0x1,
|
|
InitializationError = 0x2,
|
|
}
|
|
|
|
impl OperationStatus {
|
|
#[must_use]
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn is_ok(&self) -> bool {
|
|
*self == Self::Ok
|
|
}
|
|
|
|
#[must_use]
|
|
#[unsafe(no_mangle)]
|
|
pub extern "C" fn is_error(&self) -> bool {
|
|
!self.is_ok()
|
|
}
|
|
}
|