pub struct GuardrailRule {
pub name: String,
pub type: GuardrailType,
pub expression: String,
pub action: GuardrailAction,
pub direction: GuardrailDirection,
pub on_error: GuardrailOnError,
pub reject_message: Option<String>,
pub enabled: bool,
}Expand description
Guardrail rule configuration
Fields§
§name: StringRule name
type: GuardrailTypeEvaluation type
expression: StringCEL expression to evaluate
action: GuardrailActionAction when rule matches
direction: GuardrailDirectionMessage direction to apply rule
on_error: GuardrailOnErrorBehavior on evaluation error
reject_message: Option<String>Message to return if blocked
enabled: boolWhether rule is enabled
Trait Implementations§
Source§impl Clone for GuardrailRule
impl Clone for GuardrailRule
Source§fn clone(&self) -> GuardrailRule
fn clone(&self) -> GuardrailRule
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GuardrailRule
impl Debug for GuardrailRule
Source§impl<'de> Deserialize<'de> for GuardrailRule
impl<'de> Deserialize<'de> for GuardrailRule
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for GuardrailRule
impl RefUnwindSafe for GuardrailRule
impl Send for GuardrailRule
impl Sync for GuardrailRule
impl Unpin for GuardrailRule
impl UnsafeUnpin for GuardrailRule
impl UnwindSafe for GuardrailRule
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