pub struct ControlFinding {
pub control_id: ControlId,
pub status: ControlStatus,
pub rationale: String,
pub subjects: Vec<String>,
pub evidence_gaps: Vec<EvidenceGap>,
}Expand description
Result of a single control evaluation.
Fields§
§control_id: ControlId§status: ControlStatus§rationale: String§subjects: Vec<String>§evidence_gaps: Vec<EvidenceGap>Implementations§
Source§impl ControlFinding
impl ControlFinding
pub fn satisfied( control_id: ControlId, rationale: impl Into<String>, subjects: Vec<String>, ) -> Self
pub fn violated( control_id: ControlId, rationale: impl Into<String>, subjects: Vec<String>, ) -> Self
pub fn indeterminate( control_id: ControlId, rationale: impl Into<String>, subjects: Vec<String>, evidence_gaps: Vec<EvidenceGap>, ) -> Self
pub fn not_applicable( control_id: ControlId, rationale: impl Into<String>, ) -> Self
Sourcepub fn extract_posture(
id: ControlId,
evidence: &EvidenceBundle,
) -> Result<&RepositoryPosture, Vec<ControlFinding>>
pub fn extract_posture( id: ControlId, evidence: &EvidenceBundle, ) -> Result<&RepositoryPosture, Vec<ControlFinding>>
Extracts RepositoryPosture from evidence, returning appropriate
Indeterminate or NotApplicable findings for non-complete states.
Use in posture controls to eliminate repeated match boilerplate:
ⓘ
let posture = match ControlFinding::extract_posture(self.id(), evidence) {
Ok(p) => p,
Err(findings) => return findings,
};Trait Implementations§
Source§impl Clone for ControlFinding
impl Clone for ControlFinding
Source§fn clone(&self) -> ControlFinding
fn clone(&self) -> ControlFinding
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 ControlFinding
impl Debug for ControlFinding
Source§impl<'de> Deserialize<'de> for ControlFinding
impl<'de> Deserialize<'de> for ControlFinding
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 ControlFinding
impl PartialEq for ControlFinding
Source§impl Serialize for ControlFinding
impl Serialize for ControlFinding
impl Eq for ControlFinding
impl StructuralPartialEq for ControlFinding
Auto Trait Implementations§
impl Freeze for ControlFinding
impl RefUnwindSafe for ControlFinding
impl Send for ControlFinding
impl Sync for ControlFinding
impl Unpin for ControlFinding
impl UnsafeUnpin for ControlFinding
impl UnwindSafe for ControlFinding
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