summary refs log tree commit diff
path: root/src/libstd/ebml.rs
AgeCommit message (Collapse)AuthorLines
2013-03-29Merge remote-tracking branch 'remotes/origin/incoming' into serialErick Tryzelaar-6/+6
2013-03-29Merge remote-tracking branch 'remotes/origin/incoming' into serialErick Tryzelaar-30/+0
2013-03-29librustc: Remove `fail_unless!`Patrick Walton-6/+6
2013-03-29Register snapshotsBrian Anderson-30/+0
2013-03-29Merge remote-tracking branch 'remotes/origin/incoming' into serialErick Tryzelaar-4/+4
2013-03-29std: add Encoder::emit_map and Decoder::read_mapErick Tryzelaar-0/+27
2013-03-29std: remove Encoder::read_rec and Decoder::emit_recErick Tryzelaar-6/+0
2013-03-29std: remove Encoder::emit_tup{,_elt} and Decoder::read_tup{,_elt}Erick Tryzelaar-13/+0
2013-03-29std: remove Encoder::emit_{owned,managed}_vec and ↵Erick Tryzelaar-23/+6
Decoder::read_{owned,managed}_vec
2013-03-29std: remove Encoder::emit_{owned,managed} and Decoder::read_{owned,managed}Erick Tryzelaar-14/+0
2013-03-29std: remove Encoder::emit_{owned,managed}_str and ↵Erick Tryzelaar-13/+2
Decoder::read_{owned,managed}_str
2013-03-28Removing unused importsAlex Crichton-4/+4
2013-03-28std: change Decoder::read_option to return a generic typeErick Tryzelaar-6/+6
This allows read_option to be used with a custom option type instead of just core::Option.
2013-03-28std: change Decoder::read_option to return a generic typeErick Tryzelaar-6/+6
This allows read_option to be used with a custom option type instead of just core::Option.
2013-03-28auto merge of #5595 : catamorphism/rust/demoding, r=catamorphismbors-1/+0
2013-03-27auto merge of #5578 : erickt/rust/incoming, r=jbclements,ericktbors-2/+54
Hey folks, This patch series does some work on the json decoder, specifically with auto decoding of enums. Previously, we would take this code: ``` enum A { B, C(~str, uint) } ``` and would encode a value of this enum to either `["B", []]` or `["C", ["D", 123]]`. I've changed this to `"B"` or `["C", "D", 123]`. This matches the style of the O'Caml json library [json-wheel](http://mjambon.com/json-wheel.html). I've added tests to make sure all this work. In order to make this change, I added passing a `&[&str]` vec to `Decode::emit_enum_variant` so the json decoder can convert the name of a variant into it's position. I also changed the impl of `Encodable` for `Option<T>` to have the right upper casing. I also did some work on the parser, which allows for `fn foo<T: ::cmp::Eq>() { ... }` statements (#5572), fixed the pretty printer properly expanding `debug!("...")` expressions, and removed `ast::expr_vstore_fixed`, which doesn't appear to be used anymore.
2013-03-27core: Remove unused importTim Chevalier-1/+0
2013-03-27Autoref the argument to the index operator (#4920)Niko Matsakis-5/+3
2013-03-27std: Decode::read_enum_variant should pass in the variant namesErick Tryzelaar-0/+30
Because the json::Decoder uses the string variant name, we need a way to correlate the string to the enum index. This passes in a static &[&str] to read_enum_variant, which allows the json::Decoder to know which branch it's trying to process.
2013-03-27std: add option type directly to serialize::{En,De}codeErick Tryzelaar-2/+24
2013-03-22librustc: Remove the `const` declaration form everywherePatrick Walton-1/+1
2013-03-22libstd: Remove all uses of `pure` from libstd. rs=depurePatrick Walton-1/+1
2013-03-13librustc: Don't accept `as Trait` anymore; fix all occurrences of it.Patrick Walton-4/+4
2013-03-11librustc: Replace all uses of `fn()` with `&fn()`. rs=defunPatrick Walton-35/+35
2013-03-07librustc: Convert all uses of `assert` over to `fail_unless!`Patrick Walton-6/+6
2013-03-07De-implicit-self libstdBen Striegel-21/+21
2013-03-04Remove unused imports throughout src/Alex Crichton-6/+0
2013-03-02Remove REC, change related tests/docsJihyun Yu-2/+2
2013-02-28librustc: Mark all type implementations public. rs=impl-publicityPatrick Walton-3/+3
2013-02-15auto merge of #4969 : nickdesaulniers/rust/issue3869, r=brsonbors-3/+5
Issue #3869 review? @nikomatsakis Convert all uses of vec::slice to vec::view Issue #3869 Rename const_view to const_slice Renamed mut_view to mut_slice Fix windows build error. `buf` is borrowed by the call to `as_mut_buf()` and so we must invoke `slice()` outside of that call.
2013-02-15libstd: Get rid of `move`.Luqman Aden-2/+2
2013-02-14Convert all uses of vec::slice to vec::view Issue #3869Nick Desaulniers-3/+5
Rename const_view to const_slice Renamed mut_view to mut_slice
2013-02-14librustc: Replace `impl Type : Trait` with `impl Trait for Type`. ↵Patrick Walton-3/+3
rs=implflipping
2013-02-13Remove die!, raplace invocations with fail! Issue #4524 pt 3Nick Desaulniers-19/+19
2013-02-07Make ~fn non-copyable, make &fn copyable, split barefn/closure types,Niko Matsakis-2/+0
correct handling of moves for struct-record update. Part of #3678. Fixes #2828, #3904, #4719.
2013-02-04std: Stamp out structural recordsTim Chevalier-5/+10
See #4665
2013-01-31Replace most invocations of fail keyword with die! macroNick Desaulniers-21/+22
2013-01-29libstd: Remove "dual impls" from the language and enforce coherence rules. ↵Patrick Walton-0/+1
r=brson "Dual impls" are impls that are both type implementations and trait implementations. They can lead to ambiguity and so this patch removes them from the language. This also enforces coherence rules. Without this patch, records can implement traits not defined in the current crate. This patch fixes this, and updates all of rustc to adhere to the new enforcement. Most of this patch is fixing rustc to obey the coherence rules, which involves converting a bunch of records to structs.
2013-01-25register snapshotsGraydon Hoare-13/+0
2013-01-14Add cfg attrs to handle auto_encode transitionBrian Anderson-0/+13
2013-01-14Merge remote-tracking branch 'mneumann/f-serialize'Brian Anderson-2/+2
2013-01-08librustc: Make unqualified identifier searches terminate at the nearest ↵Patrick Walton-3/+15
module scope. r=tjc
2013-01-08Revert "librustc: Make unqualified identifier searches terminate at the ↵Patrick Walton-15/+3
nearest module scope. r=tjc" This reverts commit a8d37af2473da79be704c9ce2374f278c47177b6.
2013-01-08librustc: Make unqualified identifier searches terminate at the nearest ↵Patrick Walton-3/+15
module scope. r=tjc
2012-12-27libstd: Fix a bunch of resolve errors in tests. rs=firePatrick Walton-0/+6
2012-12-27librustc: Terminate name searches at the nearest module scope for paths that ↵Patrick Walton-2/+18
contain at least two components. r=graydon
2012-12-27Enhance auto_encode to take number of struct fieldsMichael Neumann-2/+2
emit_struct and read_struct takes an additional len:uint parameter which tells us how many fields the struct we are working on has. This is required to implement an Encoder for the msgpack [1] serialization format. To serialize a struct with msgpack you have to use arrays and the size of the array has to be know before each of the elements are written out. JSON as an example doesn't have this problem as it uses '[' and ']' delimiters for arrays. [1]: www.msgpack.org
2012-12-19Remove serialize::traits submodule.Erick Tryzelaar-1/+1
2012-12-18Stop resolving static methods at the module level. Closes #4179Brian Anderson-1/+1
2012-12-17Switch from serialization to std::serialize. (snapshot)Erick Tryzelaar-25/+25