Trait Resolve

Source
pub trait Resolve {
    // Required method
    fn resolve(value: String) -> Value;
}
Expand description

Trait used to resolve scalar char into a json value with the good value.

A scalar type represents a single value. Rust has four primary scalar types: integers, floating-point numbers, Booleans, and characters. You may recognize these from other programming languages. Let’s jump into how they work in Rust.

Required Methods§

Source

fn resolve(value: String) -> Value

Method use to resolve a scalar char into a json value.

§Examples:
let string_value = "-00010000".to_string();
let json_value = Value::resolve(string_value);
assert_eq!(-10000, json_value.as_i64().unwrap());

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.

Implementations on Foreign Types§

Source§

impl Resolve for Value

Source§

fn resolve(scalar_char: String) -> Value

Implementors§