pub fn to_string_pretty(reader: IonCReaderHandle) -> IonCResult<String> {
    let mut buf = vec![0; 4000000];
    {
        let mut opts = ION_WRITER_OPTIONS {
            pretty_print: 1,
            ..Default::default()
        };
        let writer = IonCWriterHandle::new_buf(buf.as_mut(), &mut opts)?;
        ionc!(ion_c_sys::ion_writer_write_all_values(*writer, *reader))?;
    }

    Ok(buf_to_str(buf)?)
}
/// Given a reader, return the pretty Ion text representation.
///
/// FIXME: This implementation currently uses a fixed size buffer
/// which is larger than the maximum QLDB document size, and thus
/// should never overflow. As Ion support in Rust gets better, we will
/// likely be able to remove this method entirely or at least use
/// "streams" to have a variably sized output buffer.
Given a reader, return the pretty Ion text representation.
FIXME: This implementation currently uses a fixed size buffer
which is larger than the maximum QLDB document size, and thus
should never overflow. As Ion support in Rust gets better, we will
likely be able to remove this method entirely or at least use
"streams" to have a variably sized output buffer.
Given a reader return the pretty Ion text representation . FIXME : This implementation currently uses a fixed size buffer which is larger than the maximum QLDB document size and thus should never overflow . As Ion support in Rust gets better we will likely be able to remove this method entirely or at least use " streams " to have a variably sized output buffer .
pub fn to_string_pretty(reader: IonCReaderHandle) -> IonCResult<String> {
    let mut buf = vec![0; 4000000];
    {
        let mut opts = ION_WRITER_OPTIONS {
            pretty_print: 1,
            ..Default::default()
        };
        let writer = IonCWriterHandle::new_buf(buf.as_mut(), &mut opts)?;
        ionc!(ion_c_sys::ion_writer_write_all_values(*writer, *reader))?;
    }
    Ok(buf_to_str(buf)?)
}
pub fn to_string_pretty ( reader : IonCReaderHandle ) -> IonCResult < String > { let mut buf = vec ! [ 0 4000000 ] ; { let mut opts = ION_WRITER_OPTIONS { pretty_print : 1 , .. Default :: default ( ) } ; let writer = IonCWriterHandle :: new_buf ( buf . as_mut ( ) , & mut opts ) ? ; ionc ! ( ion_c_sys ion_writer_write_all_values ( writer reader ) ) ? ; } Ok ( buf_to_str ( buf ) ? ) }
Given a reader, return the pretty Ion text representation.
Given a reader return the pretty Ion text representation .
reader
IonCReaderHandle
reader
IonCReaderHandle