pub enum GuardError {
ContentBlocked {
reason: String,
category: SafetyCategory,
},
RateLimitExceeded(String),
PiiDetectionError(String),
InjectionDetectionError(String),
ContentFilterError(String),
ConfigError(String),
SerializationError(Error),
IoError(Error),
}Expand description
Guard error types
Variants§
ContentBlocked
Content was blocked due to safety policy
RateLimitExceeded(String)
Rate limit exceeded
PiiDetectionError(String)
PII detection error
InjectionDetectionError(String)
Injection detection error
ContentFilterError(String)
Content filter API error
ConfigError(String)
Configuration error
SerializationError(Error)
Serialization error
IoError(Error)
IO error
Trait Implementations§
Source§impl Debug for GuardError
impl Debug for GuardError
Source§impl Display for GuardError
impl Display for GuardError
Source§impl Error for GuardError
impl Error for GuardError
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 GuardError
impl From<Error> for GuardError
Auto Trait Implementations§
impl Freeze for GuardError
impl !RefUnwindSafe for GuardError
impl Send for GuardError
impl Sync for GuardError
impl Unpin for GuardError
impl !UnwindSafe for GuardError
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