pub struct MatchWindow {
pub offset: u64,
pub length: usize,
}Expand description
Candidate byte range reported by the filter.
§Example
use ebpfsieve::{ByteFrequencyFilter, ByteThreshold, MatchWindow};
let filter = ByteFrequencyFilter::new([ByteThreshold::new(b'a', 2)])
.unwrap()
.with_window_size(3)
.unwrap();
let matches = filter.matching_windows(b"aab");
assert_eq!(matches, vec![MatchWindow { offset: 0, length: 3 }]);Fields§
§offset: u64Starting byte offset in the scanned stream.
length: usizeNumber of bytes covered by the candidate window.
Trait Implementations§
Source§impl Clone for MatchWindow
impl Clone for MatchWindow
Source§fn clone(&self) -> MatchWindow
fn clone(&self) -> MatchWindow
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 MatchWindow
impl Debug for MatchWindow
Source§impl PartialEq for MatchWindow
impl PartialEq for MatchWindow
impl Copy for MatchWindow
impl Eq for MatchWindow
impl StructuralPartialEq for MatchWindow
Auto Trait Implementations§
impl Freeze for MatchWindow
impl RefUnwindSafe for MatchWindow
impl Send for MatchWindow
impl Sync for MatchWindow
impl Unpin for MatchWindow
impl UnsafeUnpin for MatchWindow
impl UnwindSafe for MatchWindow
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