pub trait Value {
Show 17 methods
// Required method
fn stream<'sval, S: Stream<'sval> + ?Sized>(
&'sval self,
stream: &mut S,
) -> Result;
// Provided methods
fn tag(&self) -> Option<Tag> { ... }
fn to_bool(&self) -> Option<bool> { ... }
fn to_f32(&self) -> Option<f32> { ... }
fn to_f64(&self) -> Option<f64> { ... }
fn to_i8(&self) -> Option<i8> { ... }
fn to_i16(&self) -> Option<i16> { ... }
fn to_i32(&self) -> Option<i32> { ... }
fn to_i64(&self) -> Option<i64> { ... }
fn to_i128(&self) -> Option<i128> { ... }
fn to_u8(&self) -> Option<u8> { ... }
fn to_u16(&self) -> Option<u16> { ... }
fn to_u32(&self) -> Option<u32> { ... }
fn to_u64(&self) -> Option<u64> { ... }
fn to_u128(&self) -> Option<u128> { ... }
fn to_text(&self) -> Option<&str> { ... }
fn to_binary(&self) -> Option<&[u8]> { ... }
}Expand description
A producer of structured data.
Each call to Value::stream is expected to produce a single complete value.
Required Methods§
Provided Methods§
Sourcefn to_f32(&self) -> Option<f32>
fn to_f32(&self) -> Option<f32>
Try convert this value into a 32bit binary floating point number.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.