pub struct UnsafeAuditReport {
pub total_lines: usize,
pub unsafe_lines: usize,
pub unsafe_density_percent: f64,
pub unsafe_blocks: Vec<UnsafeBlock>,
pub average_confidence: f64,
}Expand description
Report summarizing unsafe code in a Rust file
Fields§
§total_lines: usizeTotal lines of code
unsafe_lines: usizeLines inside unsafe blocks
unsafe_density_percent: f64Unsafe density as percentage
unsafe_blocks: Vec<UnsafeBlock>List of all unsafe blocks found
average_confidence: f64Average confidence score across all blocks
Implementations§
Source§impl UnsafeAuditReport
impl UnsafeAuditReport
Sourcepub fn new(
total_lines: usize,
unsafe_lines: usize,
unsafe_blocks: Vec<UnsafeBlock>,
) -> Self
pub fn new( total_lines: usize, unsafe_lines: usize, unsafe_blocks: Vec<UnsafeBlock>, ) -> Self
Create a new audit report
Sourcepub fn meets_density_target(&self) -> bool
pub fn meets_density_target(&self) -> bool
Check if unsafe density meets the <5% target
Sourcepub fn high_confidence_blocks(&self) -> Vec<&UnsafeBlock>
pub fn high_confidence_blocks(&self) -> Vec<&UnsafeBlock>
Get blocks with high confidence for elimination (≥70)
Trait Implementations§
Source§impl Clone for UnsafeAuditReport
impl Clone for UnsafeAuditReport
Source§fn clone(&self) -> UnsafeAuditReport
fn clone(&self) -> UnsafeAuditReport
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 moreAuto Trait Implementations§
impl Freeze for UnsafeAuditReport
impl RefUnwindSafe for UnsafeAuditReport
impl Send for UnsafeAuditReport
impl Sync for UnsafeAuditReport
impl Unpin for UnsafeAuditReport
impl UnwindSafe for UnsafeAuditReport
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