pub enum Obligation {
Audit {
tag: String,
},
RateLimit {
window_secs: u64,
max: u32,
},
Custom {
value: Value,
},
}Expand description
Side-effects a policy may attach to an Allow decision.
v0 obligations are advisory — the dispatcher SHOULD log them but is not required to enforce. Enforcement (real rate limiting, hard audit writes) is a follow-up.
Variants§
Audit
RateLimit
Custom
Escape hatch for policy-specific obligations. value accepts ARBITRARY
JSON (objects, arrays, scalars, null) — the struct-like variant shape
is required because serde’s internally-tagged enums cannot merge the
kind discriminator into a non-object newtype payload.
Trait Implementations§
Source§impl Clone for Obligation
impl Clone for Obligation
Source§fn clone(&self) -> Obligation
fn clone(&self) -> Obligation
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 Obligation
impl Debug for Obligation
Source§impl<'de> Deserialize<'de> for Obligation
impl<'de> Deserialize<'de> for Obligation
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Obligation, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Obligation, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for Obligation
impl Serialize for Obligation
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for Obligation
impl RefUnwindSafe for Obligation
impl Send for Obligation
impl Sync for Obligation
impl Unpin for Obligation
impl UnsafeUnpin for Obligation
impl UnwindSafe for Obligation
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