usecrate::consts::{SW_CONDITIONS_NOT_SATISFIED, SW_NO_ERROR, SW_WRONG_DATA, SW_WRONG_LENGTH}; usecrate::ctap2::commands::CommandError; use std::fmt; use std::io; use std::path;
impl ApduErrorStatus { pubfn from(status: [u8; 2]) -> Result<(), ApduErrorStatus> { match status {
s if s == SW_NO_ERROR => Ok(()),
s if s == SW_CONDITIONS_NOT_SATISFIED => Err(ApduErrorStatus::ConditionsNotSatisfied),
s if s == SW_WRONG_DATA => Err(ApduErrorStatus::WrongData),
s if s == SW_WRONG_LENGTH => Err(ApduErrorStatus::WrongLength),
other => Err(ApduErrorStatus::Unknown(other)),
}
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.