Struct hyper_scripter::error::ExitCode
source · pub struct ExitCode(_);Implementations§
source§impl ExitCode
impl ExitCode
sourcepub fn cmp_and_replace(&mut self, code: ExitCode)
pub fn cmp_and_replace(&mut self, code: ExitCode)
將另一個 ExitCode 和自身比較,若對方較嚴重,則將自身的值變成對方
use hyper_scripter::error::*;
let mut code = EXIT_KNOWN_ERR;
code.cmp_and_replace(EXIT_OK);
assert_eq!(code, EXIT_KNOWN_ERR);
code.cmp_and_replace(EXIT_OTHER_ERR);
assert_eq!(code, EXIT_OTHER_ERR);pub fn code(&self) -> i32
Trait Implementations§
impl Copy for ExitCode
impl Eq for ExitCode
impl StructuralEq for ExitCode
impl StructuralPartialEq for ExitCode
Auto Trait Implementations§
impl RefUnwindSafe for ExitCode
impl Send for ExitCode
impl Sync for ExitCode
impl Unpin for ExitCode
impl UnwindSafe for ExitCode
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.