I found the answer of my questions:
for ~[u8] convertion in string : std::str::from_utf8();
For m.inner() error : use m.inner_ref()
Philippe
Le 20/11/2013 14:15, [email protected] a écrit :
I'am still testing the json lib and I try to encode the json using
extra::json::Encoder. The code I use is :
let mut encoder = extra::json::Encoder(m as @mut Writer);
test.encode(&mut encoder);
let st:~[u8] = m.inner();
I have the error : error: cannot move out of dereference of @ pointer
the inner is declared as follow :
/// Because this takes `self' one could never 'undecorate' a Reader/Writer
/// that has been boxed. Is that ok? This feature is mostly useful for
/// extracting the buffer from MemWriter
fn inner(self) -> T;
My second question is how to convert a ~[u8] to a ~std ?
Philippe Delrieu
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev