fn from()

in rust/ccommon-rs/src/error.rs [34:45]


    fn from(val: std::os::raw::c_int) -> Self {
        match val {
            -1 => Error::Generic,
            -2 => Error::EAgain,
            -3 => Error::ERetry,
            -4 => Error::ENoMem,
            -5 => Error::EEmpty,
            -6 => Error::ERdHup,
            -7 => Error::EInval,
            _ => Error::EOther,
        }
    }