pub struct Carver<'a> {
pub min_size: usize,
pub fix_incomplete: bool,
pub report_all: bool,
/* private fields */
}
Expand description
The Carver struct is responsible for carving JSON strings out of the provided reader, and provide output and reports to the provided writers.
Fields§
§min_size: usize
The minimum size of the JSON string that will be reported.
fix_incomplete: bool
Whether to attempt to fix incomplete JSON strings.
report_all: bool
Whether to report every detected JSON, not just corrupted ones.
Implementations§
Source§impl<'a> Carver<'a>
impl<'a> Carver<'a>
Sourcepub fn new(
reader: Reader<'a>,
json_writer: Writer<'a>,
report_writer: Writer<'a>,
max_size: Option<usize>,
max_ident_depth: Option<usize>,
) -> Self
pub fn new( reader: Reader<'a>, json_writer: Writer<'a>, report_writer: Writer<'a>, max_size: Option<usize>, max_ident_depth: Option<usize>, ) -> Self
Create a new Carver
instance from the provided Reader
and Writer
instances.
Sourcepub fn replace_newlines(&mut self, opt: bool)
pub fn replace_newlines(&mut self, opt: bool)
Configure whether to replace newlines in JSON strings or not.
Auto Trait Implementations§
impl<'a> Freeze for Carver<'a>
impl<'a> RefUnwindSafe for Carver<'a>
impl<'a> !Send for Carver<'a>
impl<'a> !Sync for Carver<'a>
impl<'a> Unpin for Carver<'a>
impl<'a> UnwindSafe for Carver<'a>
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