pub struct Decision {
pub outcome: Outcome,
pub reason: String,
pub check_ids: Vec<String>,
pub blocking: bool,
}Fields§
§outcome: Outcome§reason: StringA stable, machine-readable reason code, e.g.
"gate:deny:secrets:pattern_match".
check_ids: Vec<String>The ids consulted for this outcome (may be empty for an unconditional allow). Consumers that carry their own rule identifiers put them here.
blocking: boolWhen true, this decision must block regardless of any downstream trust
level or consumer autonomy policy. A pure signal for the consumer; the
gate itself does not act on it.
Implementations§
Source§impl Decision
impl Decision
Sourcepub fn deny(reason: impl Into<String>, check_ids: Vec<String>) -> Decision
pub fn deny(reason: impl Into<String>, check_ids: Vec<String>) -> Decision
A deny with the given reason code and consulted ids.
Sourcepub fn degrade(reason: impl Into<String>, check_ids: Vec<String>) -> Decision
pub fn degrade(reason: impl Into<String>, check_ids: Vec<String>) -> Decision
A degrade with the given reason code and consulted ids.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Decision
impl<'de> Deserialize<'de> for Decision
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Decision, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Decision, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Decision
Source§impl Serialize for Decision
impl Serialize for Decision
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
impl StructuralPartialEq for Decision
Auto Trait Implementations§
impl Freeze for Decision
impl RefUnwindSafe for Decision
impl Send for Decision
impl Sync for Decision
impl Unpin for Decision
impl UnsafeUnpin for Decision
impl UnwindSafe for Decision
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