///|
/// A version-tolerant Cairo status code.
///
/// Status remains opaque so newer Cairo releases can return status values that
/// were unknown when this binding was compiled.
struct Status(Int) derive(Debug, Eq)
///|
/// Returns whether this status represents a successful operation.
pub fn Status::is_success(self : Status) -> Bool {
self.0 == 0
}
///|
/// Returns Cairo's numeric representation of this status.
pub fn Status::to_int(self : Status) -> Int {
self.0
}
///|
extern "c" fn status_to_string(status : Int) -> Bytes = "moonbit_cairo_status_to_string"
///|
/// Returns Cairo's description of this status.
pub fn Status::to_string(self : Status) -> String {
@encoding/utf8.decode_lossy(status_to_string(self.0))
}