Struct nom_tracable::TracableInfo
source · pub struct TracableInfo {}Expand description
Struct to have trace configuration.
Implementations§
source§impl TracableInfo
impl TracableInfo
sourcepub fn new() -> Self
pub fn new() -> Self
Examples found in repository?
More examples
examples/u8_parser.rs (line 49)
47 48 49 50 51 52 53 54 55 56 57 58
fn main() {
// Configure trace setting
let info = TracableInfo::new()
.parser_width(64)
.fragment_width(20)
.fold("term");
let _ret = expr(LocatedSpan::new_extra("1-1+1+1-1".as_bytes(), info));
// Show histogram
histogram();
cumulative_histogram();
}examples/u8_custom_parser.rs (line 122)
120 121 122 123 124 125 126 127 128 129 130 131
fn main() {
// Configure trace setting
let info = TracableInfo::new()
.parser_width(64)
.fragment_width(20)
.fold("term");
let _ret = expr(Span(LocatedSpan::new_extra("1-1+1+1-1".as_bytes(), info)));
// Show histogram
histogram();
cumulative_histogram();
}pub fn forward(self, _x: bool) -> Self
pub fn backward(self, _x: bool) -> Self
pub fn custom(self, _x: bool) -> Self
pub fn color(self, _x: bool) -> Self
pub fn count_width(self, _x: usize) -> Self
sourcepub fn parser_width(self, _x: usize) -> Self
pub fn parser_width(self, _x: usize) -> Self
Examples found in repository?
More examples
examples/u8_parser.rs (line 50)
47 48 49 50 51 52 53 54 55 56 57 58
fn main() {
// Configure trace setting
let info = TracableInfo::new()
.parser_width(64)
.fragment_width(20)
.fold("term");
let _ret = expr(LocatedSpan::new_extra("1-1+1+1-1".as_bytes(), info));
// Show histogram
histogram();
cumulative_histogram();
}examples/u8_custom_parser.rs (line 123)
120 121 122 123 124 125 126 127 128 129 130 131
fn main() {
// Configure trace setting
let info = TracableInfo::new()
.parser_width(64)
.fragment_width(20)
.fold("term");
let _ret = expr(Span(LocatedSpan::new_extra("1-1+1+1-1".as_bytes(), info)));
// Show histogram
histogram();
cumulative_histogram();
}sourcepub fn fragment_width(self, _x: usize) -> Self
pub fn fragment_width(self, _x: usize) -> Self
Examples found in repository?
examples/u8_parser.rs (line 51)
47 48 49 50 51 52 53 54 55 56 57 58
fn main() {
// Configure trace setting
let info = TracableInfo::new()
.parser_width(64)
.fragment_width(20)
.fold("term");
let _ret = expr(LocatedSpan::new_extra("1-1+1+1-1".as_bytes(), info));
// Show histogram
histogram();
cumulative_histogram();
}More examples
examples/u8_custom_parser.rs (line 124)
120 121 122 123 124 125 126 127 128 129 130 131
fn main() {
// Configure trace setting
let info = TracableInfo::new()
.parser_width(64)
.fragment_width(20)
.fold("term");
let _ret = expr(Span(LocatedSpan::new_extra("1-1+1+1-1".as_bytes(), info)));
// Show histogram
histogram();
cumulative_histogram();
}sourcepub fn fold(self, _x: &str) -> Self
pub fn fold(self, _x: &str) -> Self
Examples found in repository?
More examples
examples/u8_parser.rs (line 52)
47 48 49 50 51 52 53 54 55 56 57 58
fn main() {
// Configure trace setting
let info = TracableInfo::new()
.parser_width(64)
.fragment_width(20)
.fold("term");
let _ret = expr(LocatedSpan::new_extra("1-1+1+1-1".as_bytes(), info));
// Show histogram
histogram();
cumulative_histogram();
}examples/u8_custom_parser.rs (line 125)
120 121 122 123 124 125 126 127 128 129 130 131
fn main() {
// Configure trace setting
let info = TracableInfo::new()
.parser_width(64)
.fragment_width(20)
.fold("term");
let _ret = expr(Span(LocatedSpan::new_extra("1-1+1+1-1".as_bytes(), info)));
// Show histogram
histogram();
cumulative_histogram();
}Trait Implementations§
source§impl Clone for TracableInfo
impl Clone for TracableInfo
source§fn clone(&self) -> TracableInfo
fn clone(&self) -> TracableInfo
Returns a copy 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 TracableInfo
impl Debug for TracableInfo
source§impl Default for TracableInfo
impl Default for TracableInfo
source§impl HasTracableInfo for TracableInfo
impl HasTracableInfo for TracableInfo
fn get_tracable_info(&self) -> TracableInfo
fn set_tracable_info(self, info: TracableInfo) -> Self
source§impl PartialEq<TracableInfo> for TracableInfo
impl PartialEq<TracableInfo> for TracableInfo
source§fn eq(&self, other: &TracableInfo) -> bool
fn eq(&self, other: &TracableInfo) -> bool
This method tests for
self and other values to be equal, and is used
by ==.