pub struct PreparedSource {
pub id: String,
pub format: String,
pub hashes: Vec<u64>,
pub spans: Vec<(Location, Location)>,
}Expand description
A file ready for detection: pre-hashed, pre-filtered.
Produced either from SourceFile.tokens (backward compat) or directly from
tokenize_to_detection output (fast path used by orchestrate.rs).
Fields§
§id: String§format: String§hashes: Vec<u64>§spans: Vec<(Location, Location)>Implementations§
Source§impl PreparedSource
impl PreparedSource
Sourcepub fn from_detection_tokens(
id: String,
format: String,
tokens: &[DetectionToken],
) -> Self
pub fn from_detection_tokens( id: String, format: String, tokens: &[DetectionToken], ) -> Self
Build from a DetectionToken slice — the fast path.
Auto Trait Implementations§
impl Freeze for PreparedSource
impl RefUnwindSafe for PreparedSource
impl Send for PreparedSource
impl Sync for PreparedSource
impl Unpin for PreparedSource
impl UnsafeUnpin for PreparedSource
impl UnwindSafe for PreparedSource
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more