pub struct Policy {
pub matcher: PolicyMatch,
pub action: PolicyAction,
pub question: Option<String>,
pub on_timeout: Option<PolicyAction>,
pub timeout: Option<Dur>,
}Expand description
One rule: what it matches, and what happens.
Fields§
§matcher: PolicyMatch§action: PolicyAction§question: Option<String>The question put to a person for action: ask. Templated with
{{tool}}, {{caller}} and {{args}}.
on_timeout: Option<PolicyAction>What an unanswered ask becomes. Default deny — a gate nobody
answered has not been approved.
timeout: Option<Dur>Trait Implementations§
Source§impl<'de> Deserialize<'de> for Policy
impl<'de> Deserialize<'de> for Policy
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
impl StructuralPartialEq for Policy
Auto Trait Implementations§
impl Freeze for Policy
impl RefUnwindSafe for Policy
impl Send for Policy
impl Sync for Policy
impl Unpin for Policy
impl UnsafeUnpin for Policy
impl UnwindSafe for Policy
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