pub struct InternalControl {
pub control_id: String,
pub control_name: String,
pub control_type: ControlType,
pub objective: String,
pub frequency: ControlFrequency,
pub owner_role: UserPersona,
pub risk_level: RiskLevel,
pub description: String,
pub is_key_control: bool,
pub sox_assertion: SoxAssertion,
}Expand description
Internal control definition.
Fields§
§control_id: StringUnique control identifier (e.g., “C001”, “C010”)
control_name: StringControl name/title
control_type: ControlTypeType of control (Preventive, Detective, Monitoring)
objective: StringControl objective description
frequency: ControlFrequencyHow often the control is performed
owner_role: UserPersonaRole responsible for executing/owning the control
risk_level: RiskLevelRisk level associated with control failure
description: StringDetailed description of the control procedure
is_key_control: boolWhether this is a SOX 404 key control
sox_assertion: SoxAssertionSOX assertion this control addresses
Implementations§
Source§impl InternalControl
impl InternalControl
Sourcepub fn new(
control_id: impl Into<String>,
control_name: impl Into<String>,
control_type: ControlType,
objective: impl Into<String>,
) -> Self
pub fn new( control_id: impl Into<String>, control_name: impl Into<String>, control_type: ControlType, objective: impl Into<String>, ) -> Self
Create a new internal control.
Sourcepub fn with_frequency(self, frequency: ControlFrequency) -> Self
pub fn with_frequency(self, frequency: ControlFrequency) -> Self
Builder method to set frequency.
Sourcepub fn with_owner(self, owner: UserPersona) -> Self
pub fn with_owner(self, owner: UserPersona) -> Self
Builder method to set owner role.
Sourcepub fn with_risk_level(self, level: RiskLevel) -> Self
pub fn with_risk_level(self, level: RiskLevel) -> Self
Builder method to set risk level.
Sourcepub fn with_description(self, description: impl Into<String>) -> Self
pub fn with_description(self, description: impl Into<String>) -> Self
Builder method to set description.
Sourcepub fn as_key_control(self) -> Self
pub fn as_key_control(self) -> Self
Builder method to mark as key control.
Sourcepub fn with_assertion(self, assertion: SoxAssertion) -> Self
pub fn with_assertion(self, assertion: SoxAssertion) -> Self
Builder method to set SOX assertion.
Sourcepub fn standard_controls() -> Vec<Self>
pub fn standard_controls() -> Vec<Self>
Generate standard controls for a typical organization.
Trait Implementations§
Source§impl Clone for InternalControl
impl Clone for InternalControl
Source§fn clone(&self) -> InternalControl
fn clone(&self) -> InternalControl
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 InternalControl
impl Debug for InternalControl
Source§impl<'de> Deserialize<'de> for InternalControl
impl<'de> Deserialize<'de> for InternalControl
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 InternalControl
impl RefUnwindSafe for InternalControl
impl Send for InternalControl
impl Sync for InternalControl
impl Unpin for InternalControl
impl UnwindSafe for InternalControl
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