pub struct ApprovalRequest {
pub approver: Approver,
pub caller: String,
pub capability: String,
pub context: Value,
pub rule: AskRule,
}Expand description
One call waiting for a decision, as the approver is shown it. context holds
the values the policy tested, which are the values the operation uses.
Fields§
§approver: Approver§caller: String§capability: String§context: Value§rule: AskRuleImplementations§
Source§impl ApprovalRequest
impl ApprovalRequest
Sourcepub fn denial(&self) -> String
pub fn denial(&self) -> String
The reason a call that can’t be asked is denied with: the one a deny rule gives.
Sourcepub fn report_unasked(
&self,
why: Unasked,
detail: Option<&str>,
metrics: &dyn MetricsSink,
)
pub fn report_unasked( &self, why: Unasked, detail: Option<&str>, metrics: &dyn MetricsSink, )
Reports this request as denied without asking, for why: a warning in the log
for the operator, and a count in metrics. The program is told only that the
call was denied.
Trait Implementations§
Source§impl Clone for ApprovalRequest
impl Clone for ApprovalRequest
Source§impl Debug for ApprovalRequest
impl Debug for ApprovalRequest
Source§impl<'de> Deserialize<'de> for ApprovalRequest
impl<'de> Deserialize<'de> for ApprovalRequest
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
Source§impl PartialEq for ApprovalRequest
impl PartialEq for ApprovalRequest
Source§impl Serialize for ApprovalRequest
impl Serialize for ApprovalRequest
impl StructuralPartialEq for ApprovalRequest
Auto Trait Implementations§
impl Forget for ApprovalRequest
impl Freeze for ApprovalRequest
impl RefUnwindSafe for ApprovalRequest
impl Send for ApprovalRequest
impl Sync for ApprovalRequest
impl Unpin for ApprovalRequest
impl UnsafeUnpin for ApprovalRequest
impl UnwindSafe for ApprovalRequest
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