Struct VerboseVisitor
pub struct VerboseVisitor<'a>(pub &'a mut MessageBuf);Expand description
Visitor that writes an [Event] to a DLT message making use of verbose DLT
features.
Each field is represented by a separate argument in the DLT message. The field’s name is used as the argument’s name (unless the name is the message). It turns out that many DLT tools completely ignore the field names and only display the values, making this visitor less useful than it could be.
See the BasicFormatterVisitor for a visitor that handles the formatting
on the Rust side.
Tuple Fields§
§0: &'a mut MessageBufImplementations§
§impl VerboseVisitor<'_>
impl VerboseVisitor<'_>
fn should_skip_field(field: &Field) -> bool
fn should_skip_field(field: &Field) -> bool
Returns true if the given field should be skipped.
Trait Implementations§
§impl Visit for VerboseVisitor<'_>
impl Visit for VerboseVisitor<'_>
§fn record_debug(&mut self, field: &Field, value: &dyn Debug)
fn record_debug(&mut self, field: &Field, value: &dyn Debug)
Visit a value implementing
fmt::Debug.§fn record_f64(&mut self, field: &Field, value: f64)
fn record_f64(&mut self, field: &Field, value: f64)
Visit a double-precision floating point value.
§fn record_i64(&mut self, field: &Field, value: i64)
fn record_i64(&mut self, field: &Field, value: i64)
Visit a signed 64-bit integer value.
§fn record_u64(&mut self, field: &Field, value: u64)
fn record_u64(&mut self, field: &Field, value: u64)
Visit an unsigned 64-bit integer value.
§fn record_i128(&mut self, field: &Field, value: i128)
fn record_i128(&mut self, field: &Field, value: i128)
Visit a signed 128-bit integer value.
§fn record_u128(&mut self, field: &Field, value: u128)
fn record_u128(&mut self, field: &Field, value: u128)
Visit an unsigned 128-bit integer value.
§fn record_bool(&mut self, field: &Field, value: bool)
fn record_bool(&mut self, field: &Field, value: bool)
Visit a boolean value.
§fn record_str(&mut self, field: &Field, value: &str)
fn record_str(&mut self, field: &Field, value: &str)
Visit a string value.
§fn record_bytes(&mut self, field: &Field, value: &[u8])
fn record_bytes(&mut self, field: &Field, value: &[u8])
Visit a byte slice.
§fn record_error(&mut self, field: &Field, value: &(dyn Error + 'static))
fn record_error(&mut self, field: &Field, value: &(dyn Error + 'static))
Records a type implementing
Error. Read moreAuto Trait Implementations§
impl<'a> Freeze for VerboseVisitor<'a>
impl<'a> RefUnwindSafe for VerboseVisitor<'a>
impl<'a> Send for VerboseVisitor<'a>
impl<'a> Sync for VerboseVisitor<'a>
impl<'a> Unpin for VerboseVisitor<'a>
impl<'a> !UnwindSafe for VerboseVisitor<'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