pub enum TokenFoldError {
InvalidInput(String),
SafetyViolation(String),
RedactionFailed(String),
EstimatorError(String),
ConfigError(String),
InternalError(String),
Io(Error),
}Variants§
InvalidInput(String)
SafetyViolation(String)
RedactionFailed(String)
EstimatorError(String)
ConfigError(String)
InternalError(String)
Io(Error)
Implementations§
Source§impl TokenFoldError
impl TokenFoldError
Sourcepub fn exit_code(&self) -> i32
pub fn exit_code(&self) -> i32
Stable CLI exit code for this error: 2 invalid input, 3 safety/redaction violation,
4 estimator failure, 5 bad configuration, 6 internal or I/O failure. Every successful
crate::Status outcome — including UnreachableTarget, which is a typed result and
not an error — exits 0. The proxy’s HTTP status mapping and the Python binding’s
exception hierarchy are derived from these same buckets, so the numbering is a public
contract; exit_codes_match_error_taxonomy_table below pins it.
Trait Implementations§
Source§impl Debug for TokenFoldError
impl Debug for TokenFoldError
Source§impl Display for TokenFoldError
impl Display for TokenFoldError
Source§impl Error for TokenFoldError
impl Error for TokenFoldError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl !RefUnwindSafe for TokenFoldError
impl !UnwindSafe for TokenFoldError
impl Freeze for TokenFoldError
impl Send for TokenFoldError
impl Sync for TokenFoldError
impl Unpin for TokenFoldError
impl UnsafeUnpin for TokenFoldError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more