pub enum CloakError {
InvalidConfidence(f64),
NoRecognizers,
InvalidSpan {
start: usize,
end: usize,
len: usize,
},
RegexError(Error),
IoError(Error),
JsonError(Error),
CsvError(Error),
EncryptionError(String),
ConfigError(String),
}Expand description
Errors produced by cloakrs core APIs.
Variants§
InvalidConfidence(f64)
A confidence score was outside the inclusive 0.0..=1.0 range.
NoRecognizers
A scanner was built or used without any recognizers.
InvalidSpan
A span does not point at valid UTF-8 character boundaries in the source text.
Fields
RegexError(Error)
Regex compilation failed.
IoError(Error)
IO failed.
JsonError(Error)
JSON parsing or serialization failed.
CsvError(Error)
CSV parsing or serialization failed.
EncryptionError(String)
Encryption failed.
ConfigError(String)
Configuration is invalid.
Trait Implementations§
Source§impl Debug for CloakError
impl Debug for CloakError
Source§impl Display for CloakError
impl Display for CloakError
Source§impl Error for CloakError
impl Error for CloakError
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()
Source§impl From<Error> for CloakError
impl From<Error> for CloakError
Source§impl From<Error> for CloakError
impl From<Error> for CloakError
Source§impl From<Error> for CloakError
impl From<Error> for CloakError
Auto Trait Implementations§
impl Freeze for CloakError
impl !RefUnwindSafe for CloakError
impl Send for CloakError
impl Sync for CloakError
impl Unpin for CloakError
impl UnsafeUnpin for CloakError
impl !UnwindSafe for CloakError
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