Struct stringsext::mission::Mission [−][src]
pub struct Mission {
pub mission_id: u8,
pub counter_offset: u64,
pub encoding: &'static Encoding,
pub chars_min_nb: u8,
pub require_same_unicode_block: bool,
pub filter: Utf8Filter,
pub output_line_char_nb_max: usize,
pub print_encoding_as_ascii: bool,
}
Expand description
Mission
represents the instruction parameters used mainly in scanner::scan()
.
Each thread gets its own instance and stores it in ScannerState
.
Fields
mission_id: u8
An identifier for this mission. We use its position index in the
Missions.v
vector.
counter_offset: u64
Start offset for the input-stream-byte-counter. This is useful in case
the input comes split in separate files, that should be analyzed with
separate stringsext
runs. Note: in general it is better to treat all
input in one stringsext
run and provide all split input-files as
command-line-parameter for one stringsext
run. This way stringsext
can concatenate the split input files and is able to recognize split
strings at the cutting edge between two input files.
encoding: &'static Encoding
Every thread gets a constant encoding to search for.
chars_min_nb: u8
Minimum required string length in Bytes for a finding to be printed.
require_same_unicode_block: bool
When true imposes an addition condition for findings: Advises the filter to only accept multi-characters in a finding with the same leading byte. This does not affect 1-byte ASCII characters.
filter: Utf8Filter
A filter, defining additional criteria for a finding to be printed.
output_line_char_nb_max: usize
Maximum length of output-lines in UTF-8 characters. Findings that do not
fit, will be wrapped to two or more lines. The label +
indicates that
this line is the continuation of the previous line.
print_encoding_as_ascii: bool
The encoding_rs
decoder has no direct support for ASCII. As a
workaround, we simulate the missing ASCII-decoder with the
x-user-defined
-decoder and a special filter. With this flag is set, we
indicate this case. It is later used to print out the label ascii
instead of x-user-defined
.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Mission
impl UnwindSafe for Mission
Blanket Implementations
Mutably borrows from an owned value. Read more