pub enum ApprovalResult {
Approved,
Rejected {
reason: Option<String>,
},
Modified {
modified_payload: Value,
},
}Expand description
Result of an approval request.
Variants§
Approved
Request was approved by Human.
Rejected
Request was rejected by Human.
Modified
Request was approved with modifications by Human.
Implementations§
Source§impl ApprovalResult
impl ApprovalResult
Sourcepub fn is_approved(&self) -> bool
pub fn is_approved(&self) -> bool
Returns true if the result is Approved or Modified.
Sourcepub fn is_rejected(&self) -> bool
pub fn is_rejected(&self) -> bool
Returns true if the result is Rejected.
Sourcepub fn is_modified(&self) -> bool
pub fn is_modified(&self) -> bool
Returns true if the result is Modified.
Sourcepub fn modified_payload(&self) -> Option<&Value>
pub fn modified_payload(&self) -> Option<&Value>
Returns the modified payload if this is a Modified result.
Trait Implementations§
Source§impl Clone for ApprovalResult
impl Clone for ApprovalResult
Source§fn clone(&self) -> ApprovalResult
fn clone(&self) -> ApprovalResult
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 ApprovalResult
impl Debug for ApprovalResult
Source§impl<'de> Deserialize<'de> for ApprovalResult
impl<'de> Deserialize<'de> for ApprovalResult
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 ApprovalResult
impl PartialEq for ApprovalResult
Source§impl Serialize for ApprovalResult
impl Serialize for ApprovalResult
impl StructuralPartialEq for ApprovalResult
Auto Trait Implementations§
impl Freeze for ApprovalResult
impl RefUnwindSafe for ApprovalResult
impl Send for ApprovalResult
impl Sync for ApprovalResult
impl Unpin for ApprovalResult
impl UnsafeUnpin for ApprovalResult
impl UnwindSafe for ApprovalResult
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