Struct hyper_scripter::error::ExitCode
source · [−]pub struct ExitCode(_);
Implementations
sourceimpl 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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.