2014-02-05 08:52:54 -08:00
|
|
|
// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
|
|
|
|
// file at the top-level directory of this distribution and at
|
|
|
|
// http://rust-lang.org/COPYRIGHT.
|
|
|
|
//
|
|
|
|
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
|
|
|
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
|
|
|
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
|
|
|
// option. This file may not be copied, modified, or distributed
|
|
|
|
// except according to those terms.
|
|
|
|
|
|
|
|
//! Support code for encoding and decoding types.
|
|
|
|
|
|
|
|
/*
|
|
|
|
Core encoding and decoding interfaces.
|
|
|
|
*/
|
|
|
|
|
2014-07-01 07:12:04 -07:00
|
|
|
#![crate_name = "serialize"]
|
2014-12-18 22:52:48 -08:00
|
|
|
#![unstable = "deprecated in favor of rustc-serialize on crates.io"]
|
2014-03-21 18:05:05 -07:00
|
|
|
#![crate_type = "rlib"]
|
|
|
|
#![crate_type = "dylib"]
|
|
|
|
#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
|
|
|
|
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
|
2014-10-09 10:47:22 -07:00
|
|
|
html_root_url = "http://doc.rust-lang.org/nightly/",
|
2014-06-06 09:12:18 -07:00
|
|
|
html_playground_url = "http://play.rust-lang.org/")]
|
2014-09-26 17:48:16 +12:00
|
|
|
#![allow(unknown_features)]
|
2014-12-09 14:08:10 -08:00
|
|
|
#![feature(macro_rules, default_type_params, phase, slicing_syntax, globs)]
|
2014-12-06 14:30:22 -05:00
|
|
|
#![feature(unboxed_closures)]
|
2015-01-01 22:45:11 -05:00
|
|
|
#![feature(associated_types)]
|
2014-02-05 08:52:54 -08:00
|
|
|
|
|
|
|
// test harness access
|
|
|
|
#[cfg(test)]
|
2014-02-14 09:49:11 +08:00
|
|
|
extern crate test;
|
2014-05-24 21:15:16 -07:00
|
|
|
|
2014-12-31 20:43:46 -08:00
|
|
|
#[cfg(stage0)]
|
2014-05-24 21:15:16 -07:00
|
|
|
#[phase(plugin, link)]
|
|
|
|
extern crate log;
|
2014-12-31 20:43:46 -08:00
|
|
|
|
|
|
|
#[cfg(not(stage0))]
|
|
|
|
#[macro_use]
|
|
|
|
extern crate log;
|
|
|
|
|
2014-12-10 19:46:38 -08:00
|
|
|
extern crate unicode;
|
2014-05-24 21:15:16 -07:00
|
|
|
|
2014-12-17 10:16:10 -05:00
|
|
|
extern crate collections;
|
|
|
|
|
2014-02-05 08:52:54 -08:00
|
|
|
pub use self::serialize::{Decoder, Encoder, Decodable, Encodable,
|
2014-02-21 14:18:39 -08:00
|
|
|
DecoderHelpers, EncoderHelpers};
|
2014-02-05 08:52:54 -08:00
|
|
|
|
2015-01-03 22:24:50 -08:00
|
|
|
#[cfg(stage0)]
|
|
|
|
#[path = "serialize_stage0.rs"]
|
2014-02-05 08:52:54 -08:00
|
|
|
mod serialize;
|
2015-01-03 22:24:50 -08:00
|
|
|
#[cfg(not(stage0))]
|
|
|
|
mod serialize;
|
|
|
|
|
|
|
|
#[cfg(stage0)]
|
|
|
|
#[path = "collection_impls_stage0.rs"]
|
|
|
|
mod collection_impls;
|
|
|
|
#[cfg(not(stage0))]
|
2014-02-21 14:18:39 -08:00
|
|
|
mod collection_impls;
|
2014-02-12 08:40:52 +08:00
|
|
|
|
|
|
|
pub mod base64;
|
|
|
|
pub mod hex;
|
2015-01-03 22:24:50 -08:00
|
|
|
|
|
|
|
#[cfg(stage0)]
|
|
|
|
#[path = "json_stage0.rs"]
|
|
|
|
pub mod json;
|
|
|
|
#[cfg(not(stage0))]
|
2014-02-21 14:18:39 -08:00
|
|
|
pub mod json;
|
2014-12-18 22:52:48 -08:00
|
|
|
|
|
|
|
mod rustc_serialize {
|
|
|
|
pub use serialize::*;
|
|
|
|
}
|