[][src]Crate serde_eetf

Erlang external term format support for serde. This allows a rust app to easily talk to erlang, elixir or any other BEAM language with little boilerplate.

use serde_eetf::{to_bytes, from_bytes};

#[derive(Deserialize, Serialize, PartialEq, Debug)]
struct Test {
    x: i8
}

let input = Test{ x: 8 };
// Here we convert our Test struct into some bytes that could be sent to
// Erlang.
let bytes = to_bytes(&input).unwrap();

// When we receive a response from Erlang we can convert it back to our Test
// struct.
let result: Test = from_bytes(&bytes).unwrap();

Structs

Deserializer

Deserializes an eetf::Term

Enums

Error

An Error type for serializing/deserializing EETF.

Functions

from_bytes

Deserializes some EETF from a slice of bytes.

from_reader

Deserializes some EETF from a Read

to_bytes

Serializes a value into a EETF in a Vec of bytes

to_writer

Serializes a value into EETF using a Write

Type Definitions

Result

The Result type of a serialization/deserialization.