#[non_exhaustive]pub struct DetectOptions {
pub base: u64,
}Expand description
Where to look for a filesystem, and anything else detection needs to be told.
Every input to detect_with is a field here rather than a parameter, so an input
detection grows arrives as a field a caller may ignore.
// The filesystem in a partition that begins one mebibyte into a whole-disk image.
let options = DetectOptions::new().base(1 << 20);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.base: u64Byte offset within the source at which the filesystem begins — zero for a bare image, the partition’s start for one inside a disk image, and wherever a carver located a candidate region.
Offset is a first-class concept everywhere a filesystem is read, and it is one here for the same reason: the question detection answers is “what is at this location”, which a classifier fixed to the start of its source cannot be asked.
Implementations§
Trait Implementations§
Source§impl Clone for DetectOptions
impl Clone for DetectOptions
Source§fn clone(&self) -> DetectOptions
fn clone(&self) -> DetectOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 DetectOptions
impl Debug for DetectOptions
Source§impl Default for DetectOptions
impl Default for DetectOptions
Source§fn default() -> DetectOptions
fn default() -> DetectOptions
Returns the “default value” for a type. Read more
Source§impl PartialEq for DetectOptions
impl PartialEq for DetectOptions
Source§fn eq(&self, other: &DetectOptions) -> bool
fn eq(&self, other: &DetectOptions) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for DetectOptions
impl Eq for DetectOptions
impl StructuralPartialEq for DetectOptions
Auto Trait Implementations§
impl Freeze for DetectOptions
impl RefUnwindSafe for DetectOptions
impl Send for DetectOptions
impl Sync for DetectOptions
impl Unpin for DetectOptions
impl UnsafeUnpin for DetectOptions
impl UnwindSafe for DetectOptions
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