[][src]Trait serde_dhall::FromDhall

pub trait FromDhall: Sealed + Sized { }

A data structure that can be deserialized from a Dhall expression.

This is automatically implemented for any type that serde can deserialize. In fact, this trait cannot be implemented manually. To implement it for your type, use serde's derive mechanism.

Example

use serde::Deserialize;

// Use serde's derive
#[derive(Deserialize)]
struct Point {
    x: u64,
    y: u64,
}

// Convert a Dhall string to a Point.
let point: Point = serde_dhall::from_str("{ x = 1, y = 1 + 1 }").parse()?;

Implementors

impl FromDhall for SimpleType[src]

impl<T> FromDhall for T where
    T: DeserializeOwned
[src]

Loading content...