Skip to main content

VldInput

Trait VldInput 

Source
pub trait VldInput {
    // Required method
    fn to_json_value(&self) -> Result<Value, VldError>;
}
Expand description

Trait for types that can be used as input to schema parsing.

Implemented for JSON strings (&str, String), raw bytes (&[u8]), file paths (Path, PathBuf — requires the std feature), and serde_json::Value.

Required Methods§

Source

fn to_json_value(&self) -> Result<Value, VldError>

Convert this input into a serde_json::Value.

Implementations on Foreign Types§

Source§

impl VldInput for Value

Source§

impl VldInput for str

Source§

impl VldInput for String

Source§

impl VldInput for Path

Available on crate feature std only.
Source§

impl VldInput for PathBuf

Available on crate feature std only.
Source§

impl VldInput for [u8]

Implementors§