hun-error

Crates.iohun-error
lib.rshun-error
version0.1.1
sourcesrc
created_at2023-05-23 01:10:14.572506
updated_at2023-05-25 11:52:22.723744
descriptionRUST Error
homepage
repositoryhttps://gitee.com/1467792822/rerror
max_upload_size
id871617
size16,549
hunting (h1467792822)

documentation

README

Error,基于i32错误码定义

包装OS的错误码, 统一错误码的查询和获取接口

  1. fn errno() -> i32;
  2. fn set_errno(i32);
  3. unsafe fn errmsg(i32) -> &str;

封装i32为Error

Example

use hun_error::*;

let err = Error::last_error();
assert_eq!(err, Error::default());

set_errno(100);
let err = Error::last_error();
assert_eq!(err, 100.into());
Commit count: 0

cargo fmt