pub trait Visit {
// Required methods
fn bytes(&mut self, value: &[u8]) -> Result<()>;
fn str(&mut self, value: &str) -> Result<()>;
// Provided methods
fn int(&mut self, value: i128) -> Result<()> { ... }
fn uint(&mut self, value: u128) -> Result<()> { ... }
fn seq(
&mut self,
items: &[&dyn DisplayBytes],
separator: &dyn DisplayBytes,
) -> Result<()> { ... }
fn message(&mut self, message: &Message) -> Result<()> { ... }
}Expand description
Receives a value described by DisplayBytes::visit.
Only bytes and str are required: other methods default to them, the
way display_bytes would write the value.
Required Methods§
Provided Methods§
fn int(&mut self, value: i128) -> Result<()>
fn uint(&mut self, value: u128) -> Result<()>
Sourcefn seq(
&mut self,
items: &[&dyn DisplayBytes],
separator: &dyn DisplayBytes,
) -> Result<()>
fn seq( &mut self, items: &[&dyn DisplayBytes], separator: &dyn DisplayBytes, ) -> Result<()>
Items of join. Defaults to them joined, as bytes.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".