pub enum BlockCode {
PromptInjection,
Toxicity,
PolicyViolation,
RateLimit,
Custom(String),
}Expand description
Machine-readable codes for blocked requests.
Used in the JSON error response body and audit log.
Variants§
PromptInjection
A prompt injection pattern was detected.
Toxicity
Toxic or harmful content was detected.
PolicyViolation
A user-defined policy rule was violated.
RateLimit
The request was rate-limited.
Custom(String)
A custom block code defined by a user stage.
Implementations§
Trait Implementations§
impl Eq for BlockCode
impl StructuralPartialEq for BlockCode
Auto Trait Implementations§
impl Freeze for BlockCode
impl RefUnwindSafe for BlockCode
impl Send for BlockCode
impl Sync for BlockCode
impl Unpin for BlockCode
impl UnsafeUnpin for BlockCode
impl UnwindSafe for BlockCode
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