Support code for encoding and decoding types.

Trait Decodable

Method decode

fn decode(d: &mut D) -> Self

Trait Decoder

Method read_nil

fn read_nil(&mut self)

Method read_uint

fn read_uint(&mut self) -> uint

Method read_u64

fn read_u64(&mut self) -> u64

Method read_u32

fn read_u32(&mut self) -> u32

Method read_u16

fn read_u16(&mut self) -> u16

Method read_u8

fn read_u8(&mut self) -> u8

Method read_int

fn read_int(&mut self) -> int

Method read_i64

fn read_i64(&mut self) -> i64

Method read_i32

fn read_i32(&mut self) -> i32

Method read_i16

fn read_i16(&mut self) -> i16

Method read_i8

fn read_i8(&mut self) -> i8

Method read_bool

fn read_bool(&mut self) -> bool

Method read_f64

fn read_f64(&mut self) -> f64

Method read_f32

fn read_f32(&mut self) -> f32

Method read_float

fn read_float(&mut self) -> float

Method read_char

fn read_char(&mut self) -> char

Method read_str

fn read_str(&mut self) -> ~str

Method read_enum

fn read_enum<T>(&mut self, name: &str, f: &fn(&mut Self) -> T) -> T

Method read_enum_variant

fn read_enum_variant<T>(&mut self, names: &[&str],
                        f: &fn(&mut Self, uint) -> T) -> T

Method read_enum_variant_arg

fn read_enum_variant_arg<T>(&mut self, a_idx: uint, f: &fn(&mut Self) -> T) ->
 T

Method read_enum_struct_variant

fn read_enum_struct_variant<T>(&mut self, names: &[&str],
                               f: &fn(&mut Self, uint) -> T) -> T

Method read_enum_struct_variant_field

fn read_enum_struct_variant_field<T>(&mut self, &f_name: &str, f_idx: uint,
                                     f: &fn(&mut Self) -> T) -> T

Method read_struct

fn read_struct<T>(&mut self, s_name: &str, len: uint, f: &fn(&mut Self) -> T)
 -> T

Method read_struct_field

fn read_struct_field<T>(&mut self, f_name: &str, f_idx: uint,
                        f: &fn(&mut Self) -> T) -> T

Method read_tuple

fn read_tuple<T>(&mut self, f: &fn(&mut Self, uint) -> T) -> T

Method read_tuple_arg

fn read_tuple_arg<T>(&mut self, a_idx: uint, f: &fn(&mut Self) -> T) -> T

Method read_tuple_struct

fn read_tuple_struct<T>(&mut self, s_name: &str, f: &fn(&mut Self, uint) -> T)
 -> T

Method read_tuple_struct_arg

fn read_tuple_struct_arg<T>(&mut self, a_idx: uint, f: &fn(&mut Self) -> T) ->
 T

Method read_option

fn read_option<T>(&mut self, f: &fn(&mut Self, bool) -> T) -> T

Method read_seq

fn read_seq<T>(&mut self, f: &fn(&mut Self, uint) -> T) -> T

Method read_seq_elt

fn read_seq_elt<T>(&mut self, idx: uint, f: &fn(&mut Self) -> T) -> T

Method read_map

fn read_map<T>(&mut self, f: &fn(&mut Self, uint) -> T) -> T

Method read_map_elt_key

fn read_map_elt_key<T>(&mut self, idx: uint, f: &fn(&mut Self) -> T) -> T

Method read_map_elt_val

fn read_map_elt_val<T>(&mut self, idx: uint, f: &fn(&mut Self) -> T) -> T

Trait DecoderHelpers

Method read_to_vec

fn read_to_vec<T>(&mut self, f: &fn(&mut Self) -> T) -> ~[T]

Trait Encodable

Method encode

fn encode(&self, s: &mut S)

Trait Encoder

Method emit_nil

fn emit_nil(&mut self)

Method emit_uint

fn emit_uint(&mut self, v: uint)

Method emit_u64

fn emit_u64(&mut self, v: u64)

Method emit_u32

fn emit_u32(&mut self, v: u32)

Method emit_u16

fn emit_u16(&mut self, v: u16)

Method emit_u8

fn emit_u8(&mut self, v: u8)

Method emit_int

fn emit_int(&mut self, v: int)

Method emit_i64

fn emit_i64(&mut self, v: i64)

Method emit_i32

fn emit_i32(&mut self, v: i32)

Method emit_i16

fn emit_i16(&mut self, v: i16)

Method emit_i8

fn emit_i8(&mut self, v: i8)

Method emit_bool

fn emit_bool(&mut self, v: bool)

Method emit_float

fn emit_float(&mut self, v: float)

Method emit_f64

fn emit_f64(&mut self, v: f64)

Method emit_f32

fn emit_f32(&mut self, v: f32)

Method emit_char

fn emit_char(&mut self, v: char)

Method emit_str

fn emit_str(&mut self, v: &str)

Method emit_enum

fn emit_enum(&mut self, name: &str, f: &fn(&mut Self))

Method emit_enum_variant

fn emit_enum_variant(&mut self, v_name: &str, v_id: uint, len: uint,
                     f: &fn(&mut Self))

Method emit_enum_variant_arg

fn emit_enum_variant_arg(&mut self, a_idx: uint, f: &fn(&mut Self))

Method emit_enum_struct_variant

fn emit_enum_struct_variant(&mut self, v_name: &str, v_id: uint, len: uint,
                            f: &fn(&mut Self))

Method emit_enum_struct_variant_field

fn emit_enum_struct_variant_field(&mut self, f_name: &str, f_idx: uint,
                                  f: &fn(&mut Self))

Method emit_struct

fn emit_struct(&mut self, name: &str, len: uint, f: &fn(&mut Self))

Method emit_struct_field

fn emit_struct_field(&mut self, f_name: &str, f_idx: uint, f: &fn(&mut Self))

Method emit_tuple

fn emit_tuple(&mut self, len: uint, f: &fn(&mut Self))

Method emit_tuple_arg

fn emit_tuple_arg(&mut self, idx: uint, f: &fn(&mut Self))

Method emit_tuple_struct

fn emit_tuple_struct(&mut self, name: &str, len: uint, f: &fn(&mut Self))

Method emit_tuple_struct_arg

fn emit_tuple_struct_arg(&mut self, f_idx: uint, f: &fn(&mut Self))

Method emit_option

fn emit_option(&mut self, f: &fn(&mut Self))

Method emit_option_none

fn emit_option_none(&mut self)

Method emit_option_some

fn emit_option_some(&mut self, f: &fn(&mut Self))

Method emit_seq

fn emit_seq(&mut self, len: uint, f: &fn(this: &mut Self))

Method emit_seq_elt

fn emit_seq_elt(&mut self, idx: uint, f: &fn(this: &mut Self))

Method emit_map

fn emit_map(&mut self, len: uint, f: &fn(&mut Self))

Method emit_map_elt_key

fn emit_map_elt_key(&mut self, idx: uint, f: &fn(&mut Self))

Method emit_map_elt_val

fn emit_map_elt_val(&mut self, idx: uint, f: &fn(&mut Self))

Trait EncoderHelpers

Method emit_from_vec

fn emit_from_vec<T>(&mut self, v: &[T], f: &fn(&mut Self, v: &T))

Implementation of Encodable<S> for uint where <S: Encoder>

Method encode

fn encode(&self, s: &mut S)

Implementation of Decodable<D> for uint where <D: Decoder>

Method decode

fn decode(d: &mut D) -> uint

Implementation of Encodable<S> for u8 where <S: Encoder>

Method encode

fn encode(&self, s: &mut S)

Implementation of Decodable<D> for u8 where <D: Decoder>

Method decode

fn decode(d: &mut D) -> u8

Implementation of Encodable<S> for u16 where <S: Encoder>

Method encode

fn encode(&self, s: &mut S)

Implementation of Decodable<D> for u16 where <D: Decoder>

Method decode

fn decode(d: &mut D) -> u16

Implementation of Encodable<S> for u32 where <S: Encoder>

Method encode

fn encode(&self, s: &mut S)

Implementation of Decodable<D> for u32 where <D: Decoder>

Method decode

fn decode(d: &mut D) -> u32

Implementation of Encodable<S> for u64 where <S: Encoder>

Method encode

fn encode(&self, s: &mut S)

Implementation of Decodable<D> for u64 where <D: Decoder>

Method decode

fn decode(d: &mut D) -> u64

Implementation of Encodable<S> for int where <S: Encoder>

Method encode

fn encode(&self, s: &mut S)

Implementation of Decodable<D> for int where <D: Decoder>

Method decode

fn decode(d: &mut D) -> int

Implementation of Encodable<S> for i8 where <S: Encoder>

Method encode

fn encode(&self, s: &mut S)

Implementation of Decodable<D> for i8 where <D: Decoder>

Method decode

fn decode(d: &mut D) -> i8

Implementation of Encodable<S> for i16 where <S: Encoder>

Method encode

fn encode(&self, s: &mut S)

Implementation of Decodable<D> for i16 where <D: Decoder>

Method decode

fn decode(d: &mut D) -> i16

Implementation of Encodable<S> for i32 where <S: Encoder>

Method encode

fn encode(&self, s: &mut S)

Implementation of Decodable<D> for i32 where <D: Decoder>

Method decode

fn decode(d: &mut D) -> i32

Implementation of Encodable<S> for i64 where <S: Encoder>

Method encode

fn encode(&self, s: &mut S)

Implementation of Decodable<D> for i64 where <D: Decoder>

Method decode

fn decode(d: &mut D) -> i64

Implementation of Encodable<S> for &'self str where <'self, S: Encoder>

Method encode

fn encode(&self, s: &mut S)

Implementation of Encodable<S> for ~str where <S: Encoder>

Method encode

fn encode(&self, s: &mut S)

Implementation of Decodable<D> for ~str where <D: Decoder>

Method decode

fn decode(d: &mut D) -> ~str

Implementation of Encodable<S> for @str where <S: Encoder>

Method encode

fn encode(&self, s: &mut S)

Implementation of Decodable<D> for @str where <D: Decoder>

Method decode

fn decode(d: &mut D) -> @str

Implementation of Encodable<S> for float where <S: Encoder>

Method encode

fn encode(&self, s: &mut S)

Implementation of Decodable<D> for float where <D: Decoder>

Method decode

fn decode(d: &mut D) -> float

Implementation of Encodable<S> for f32 where <S: Encoder>

Method encode

fn encode(&self, s: &mut S)

Implementation of Decodable<D> for f32 where <D: Decoder>

Method decode

fn decode(d: &mut D) -> f32

Implementation of Encodable<S> for f64 where <S: Encoder>

Method encode

fn encode(&self, s: &mut S)

Implementation of Decodable<D> for f64 where <D: Decoder>

Method decode

fn decode(d: &mut D) -> f64

Implementation of Encodable<S> for bool where <S: Encoder>

Method encode

fn encode(&self, s: &mut S)

Implementation of Decodable<D> for bool where <D: Decoder>

Method decode

fn decode(d: &mut D) -> bool

Implementation of Encodable<S> for char where <S: Encoder>

Method encode

fn encode(&self, s: &mut S)

Implementation of Decodable<D> for char where <D: Decoder>

Method decode

fn decode(d: &mut D) -> char

Implementation of Encodable<S> for () where <S: Encoder>

Method encode

fn encode(&self, s: &mut S)

Implementation of Decodable<D> for () where <D: Decoder>

Method decode

fn decode(d: &mut D)

Implementation of Encodable<S> for &'self T where <'self, S: Encoder, T: Encodable<S>>

Method encode

fn encode(&self, s: &mut S)

Implementation of Encodable<S> for ~T where <S: Encoder, T: Encodable<S>>

Method encode

fn encode(&self, s: &mut S)

Implementation of Decodable<D> for ~T where <D: Decoder, T: Decodable<D>>

Method decode

fn decode(d: &mut D) -> ~T

Implementation of Encodable<S> for @T where <S: Encoder, T: Encodable<S>>

Method encode

fn encode(&self, s: &mut S)

Implementation of Decodable<D> for @T where <D: Decoder, T: Decodable<D>>

Method decode

fn decode(d: &mut D) -> @T

Implementation of Encodable<S> for &'self [T] where <'self, S: Encoder, T: Encodable<S>>

Method encode

fn encode(&self, s: &mut S)

Implementation of Encodable<S> for ~[T] where <S: Encoder, T: Encodable<S>>

Method encode

fn encode(&self, s: &mut S)

Implementation of Decodable<D> for ~[T] where <D: Decoder, T: Decodable<D>>

Method decode

fn decode(d: &mut D) -> ~[T]

Implementation of Encodable<S> for @[T] where <S: Encoder, T: Encodable<S>>

Method encode

fn encode(&self, s: &mut S)

Implementation of Decodable<D> for @[T] where <D: Decoder, T: Decodable<D>>

Method decode

fn decode(d: &mut D) -> @[T]

Implementation of Encodable<S> for Option<T> where <S: Encoder, T: Encodable<S>>

Method encode

fn encode(&self, s: &mut S)

Implementation of Decodable<D> for Option<T> where <D: Decoder, T: Decodable<D>>

Method decode

fn decode(d: &mut D) -> Option<T>

Implementation of Encodable<S> for (T0, T1) where <S: Encoder, T0: Encodable<S>, T1: Encodable<S>>

Method encode

fn encode(&self, s: &mut S)

Implementation of Decodable<D> for (T0, T1) where <D: Decoder, T0: Decodable<D>, T1: Decodable<D>>

Method decode

fn decode(d: &mut D) -> (T0, T1)

Implementation of Encodable<S> for (T0, T1, T2) where <S: Encoder, T0: Encodable<S>, T1: Encodable<S>, T2: Encodable<S>>

Method encode

fn encode(&self, s: &mut S)

Implementation of Decodable<D> for (T0, T1, T2) where <D: Decoder, T0: Decodable<D>, T1: Decodable<D>, T2: Decodable<D>>

Method decode

fn decode(d: &mut D) -> (T0, T1, T2)

Implementation of Encodable<S> for (T0, T1, T2, T3) where <S: Encoder, T0: Encodable<S>, T1: Encodable<S>, T2: Encodable<S>, T3: Encodable<S>>

Method encode

fn encode(&self, s: &mut S)

Implementation of Decodable<D> for (T0, T1, T2, T3) where <D: Decoder, T0: Decodable<D>, T1: Decodable<D>, T2: Decodable<D>, T3: Decodable<D>>

Method decode

fn decode(d: &mut D) -> (T0, T1, T2, T3)

Implementation of Encodable<S> for (T0, T1, T2, T3, T4) where <S: Encoder, T0: Encodable<S>, T1: Encodable<S>, T2: Encodable<S>, T3: Encodable<S>, T4: Encodable<S>>

Method encode

fn encode(&self, s: &mut S)

Implementation of Decodable<D> for (T0, T1, T2, T3, T4) where <D: Decoder, T0: Decodable<D>, T1: Decodable<D>, T2: Decodable<D>, T3: Decodable<D>, T4: Decodable<D>>

Method decode

fn decode(d: &mut D) -> (T0, T1, T2, T3, T4)

Implementation of Encodable<S> for @mut DList<T> where <S: Encoder, T: Encodable<S> + Copy>

Method encode

fn encode(&self, s: &mut S)

Implementation of Decodable<D> for @mut DList<T> where <D: Decoder, T: Decodable<D>>

Method decode

fn decode(d: &mut D) -> @mut DList<T>

Implementation of Encodable<S> for Deque<T> where <S: Encoder, T: Encodable<S>>

Method encode

fn encode(&self, s: &mut S)

Implementation of Decodable<D> for Deque<T> where <D: Decoder, T: Decodable<D>>

Method decode

fn decode(d: &mut D) -> Deque<T>

Implementation of Encodable<E> for HashMap<K, V> where <E: Encoder, K: Encodable<E> + Hash + IterBytes + Eq, V: Encodable<E>>

Method encode

fn encode(&self, e: &mut E)

Implementation of Decodable<D> for HashMap<K, V> where <D: Decoder, K: Decodable<D> + Hash + IterBytes + Eq, V: Decodable<D>>

Method decode

fn decode(d: &mut D) -> HashMap<K, V>

Implementation of Encodable<S> for HashSet<T> where <S: Encoder, T: Encodable<S> + Hash + IterBytes + Eq>

Method encode

fn encode(&self, s: &mut S)

Implementation of Decodable<D> for HashSet<T> where <D: Decoder, T: Decodable<D> + Hash + IterBytes + Eq>

Method decode

fn decode(d: &mut D) -> HashSet<T>

Implementation of Encodable<E> for TrieMap<V> where <E: Encoder, V: Encodable<E>>

Method encode

fn encode(&self, e: &mut E)

Implementation of Decodable<D> for TrieMap<V> where <D: Decoder, V: Decodable<D>>

Method decode

fn decode(d: &mut D) -> TrieMap<V>

Implementation of Encodable<S> for TrieSet where <S: Encoder>

Method encode

fn encode(&self, s: &mut S)

Implementation of Decodable<D> for TrieSet where <D: Decoder>

Method decode

fn decode(d: &mut D) -> TrieSet

Implementation of Encodable<E> for TreeMap<K, V> where <E: Encoder, K: Encodable<E> + Eq + TotalOrd, V: Encodable<E> + Eq>

Method encode

fn encode(&self, e: &mut E)

Implementation of Decodable<D> for TreeMap<K, V> where <D: Decoder, K: Decodable<D> + Eq + TotalOrd, V: Decodable<D> + Eq>

Method decode

fn decode(d: &mut D) -> TreeMap<K, V>

Implementation of Encodable<S> for TreeSet<T> where <S: Encoder, T: Encodable<S> + Eq + TotalOrd>

Method encode

fn encode(&self, s: &mut S)

Implementation of Decodable<D> for TreeSet<T> where <D: Decoder, T: Decodable<D> + Eq + TotalOrd>

Method decode

fn decode(d: &mut D) -> TreeSet<T>

Implementation of EncoderHelpers for S where <S: Encoder>

Method emit_from_vec

fn emit_from_vec<T>(&mut self, v: &[T], f: &fn(&mut S, &T))

Implementation of DecoderHelpers for D where <D: Decoder>

Method read_to_vec

fn read_to_vec<T>(&mut self, f: &fn(&mut D) -> T) -> ~[T]