pub struct ApprovalAction {
pub actor_id: String,
pub actor_name: String,
pub actor_role: UserPersona,
pub action: ApprovalActionType,
pub action_timestamp: DateTime<Utc>,
pub comments: Option<String>,
pub approval_level: u8,
}Expand description
Individual action in the approval workflow.
Fields§
§actor_id: StringUser ID of the person taking action
actor_name: StringDisplay name of the actor
actor_role: UserPersonaRole/persona of the actor
action: ApprovalActionTypeType of action taken
action_timestamp: DateTime<Utc>Timestamp of the action
comments: Option<String>Comments/notes from the actor
approval_level: u8Approval level this action applies to
Implementations§
Source§impl ApprovalAction
impl ApprovalAction
Sourcepub fn new(
actor_id: String,
actor_name: String,
actor_role: UserPersona,
action: ApprovalActionType,
level: u8,
) -> Self
pub fn new( actor_id: String, actor_name: String, actor_role: UserPersona, action: ApprovalActionType, level: u8, ) -> Self
Create a new approval action.
Sourcepub fn with_comment(self, comment: &str) -> Self
pub fn with_comment(self, comment: &str) -> Self
Add a comment to the action.
Sourcepub fn with_timestamp(self, timestamp: DateTime<Utc>) -> Self
pub fn with_timestamp(self, timestamp: DateTime<Utc>) -> Self
Set the timestamp.
Trait Implementations§
Source§impl Clone for ApprovalAction
impl Clone for ApprovalAction
Source§fn clone(&self) -> ApprovalAction
fn clone(&self) -> ApprovalAction
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 ApprovalAction
impl Debug for ApprovalAction
Source§impl<'de> Deserialize<'de> for ApprovalAction
impl<'de> Deserialize<'de> for ApprovalAction
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
Auto Trait Implementations§
impl Freeze for ApprovalAction
impl RefUnwindSafe for ApprovalAction
impl Send for ApprovalAction
impl Sync for ApprovalAction
impl Unpin for ApprovalAction
impl UnwindSafe for ApprovalAction
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