[−][src]Trait lexpr::number::Visitor
Trait to access the value stored in Number.
The Number type does not directly expose its internal
structure to allow future changes without breaking the API.
Instead, you can implement this trait and pass your implementation
to Number::visit.
Associated Types
Loading content...Required methods
fn error<T: Into<String>>(msg: T) -> Self::Error
Construct an error given a message.
This method is used by trait default implementations.
fn visit_u64(self, n: u64) -> Result<Self::Value, Self::Error>
The stored value is a u64.
fn visit_i64(self, n: i64) -> Result<Self::Value, Self::Error>
The stored value is an i64.
fn visit_f64(self, n: f64) -> Result<Self::Value, Self::Error>
The stored value is f64.