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

Reply via email to