pub struct StringFinding { /* private fields */ }Expand description
A raw string found in recovered bytes.
Implementations§
Source§impl StringFinding
impl StringFinding
Sourcepub const fn record_index(&self) -> usize
pub const fn record_index(&self) -> usize
Examples found in repository?
examples/dump.rs (line 296)
291fn print_strings(strings: &[StringFinding]) {
292 section(&format!("strings ({})", strings.len()));
293 for found in strings {
294 println!(
295 " record #{} offset {} {:?}: {}",
296 found.record_index(),
297 found.offset(),
298 found.encoding(),
299 escape_inline(found.value())
300 );
301 }
302}Sourcepub const fn offset(&self) -> usize
pub const fn offset(&self) -> usize
Returns byte offset inside the record payload.
§Returns
The byte offset within the record payload where the string begins.
Examples found in repository?
examples/dump.rs (line 297)
291fn print_strings(strings: &[StringFinding]) {
292 section(&format!("strings ({})", strings.len()));
293 for found in strings {
294 println!(
295 " record #{} offset {} {:?}: {}",
296 found.record_index(),
297 found.offset(),
298 found.encoding(),
299 escape_inline(found.value())
300 );
301 }
302}Sourcepub const fn encoding(&self) -> StringEncoding
pub const fn encoding(&self) -> StringEncoding
Returns string encoding used for extraction.
§Returns
The StringEncoding under which this string was extracted.
Examples found in repository?
examples/dump.rs (line 298)
291fn print_strings(strings: &[StringFinding]) {
292 section(&format!("strings ({})", strings.len()));
293 for found in strings {
294 println!(
295 " record #{} offset {} {:?}: {}",
296 found.record_index(),
297 found.offset(),
298 found.encoding(),
299 escape_inline(found.value())
300 );
301 }
302}Sourcepub fn value(&self) -> &str
pub fn value(&self) -> &str
Examples found in repository?
examples/dump.rs (line 299)
291fn print_strings(strings: &[StringFinding]) {
292 section(&format!("strings ({})", strings.len()));
293 for found in strings {
294 println!(
295 " record #{} offset {} {:?}: {}",
296 found.record_index(),
297 found.offset(),
298 found.encoding(),
299 escape_inline(found.value())
300 );
301 }
302}Trait Implementations§
Source§impl Clone for StringFinding
impl Clone for StringFinding
Source§fn clone(&self) -> StringFinding
fn clone(&self) -> StringFinding
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 StringFinding
impl Debug for StringFinding
impl Eq for StringFinding
Source§impl PartialEq for StringFinding
impl PartialEq for StringFinding
impl StructuralPartialEq for StringFinding
Auto Trait Implementations§
impl Freeze for StringFinding
impl RefUnwindSafe for StringFinding
impl Send for StringFinding
impl Sync for StringFinding
impl Unpin for StringFinding
impl UnsafeUnpin for StringFinding
impl UnwindSafe for StringFinding
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