mozilla/rust — pull request #3507 by erickt (2012-09-15 22:13:42+00:00)
Title: new trait serialization, copyless bytes/str writer, and a str form_slice

This is my version of a new trait-based serialization. It's a pretty straightforward port to traits. I named it serialization2 as we'll need to do the snapshot-dance in order to replace the old serialization. After we get this into a snapshot, I'll upgrade ebml, json, and the auto serializer to use it.

Also, this patch includes a new rewrite of the io bytes writer to cut down on the copies, and replacing the unwieldy `str::raw::from_buf_len_nocopy` with a `str::raw::form_slice` that matches the vec function.