#[non_exhaustive]pub struct Manifest {
pub spans: Vec<EmittedTokenSpan>,
}Expand description
Set of emitted token spans for one clean text segment.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.spans: Vec<EmittedTokenSpan>Spans sorted by clean_span.start.
Implementations§
Source§impl Manifest
impl Manifest
Sourcepub fn from_spans(spans: Vec<EmittedTokenSpan>) -> Self
pub fn from_spans(spans: Vec<EmittedTokenSpan>) -> Self
Builds a manifest from spans and sorts them by clean byte start.
Sourcepub fn diff_against(
&self,
suspect_span: &Range<usize>,
suspect_class: &PiiClass,
) -> Option<LeakKind>
pub fn diff_against( &self, suspect_span: &Range<usize>, suspect_class: &PiiClass, ) -> Option<LeakKind>
Diffs one safety-net suspect span against emitted token coverage.
Returns None when the suspect span is continuously covered by emitted
token spans of the same class. Internal gaps return
LeakKind::PartialBleed. When multiple uncovered gaps exist, this method
deterministically returns the first gap by byte offset; full gap
enumeration is intentionally deferred to a future report format.
Trait Implementations§
impl Eq for Manifest
impl StructuralPartialEq for Manifest
Auto Trait Implementations§
impl Freeze for Manifest
impl RefUnwindSafe for Manifest
impl Send for Manifest
impl Sync for Manifest
impl Unpin for Manifest
impl UnsafeUnpin for Manifest
impl UnwindSafe for Manifest
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