pub struct RawTextWriterBuilder { /* private fields */ }

Implementations§

source§

impl RawTextWriterBuilder

source

pub fn new(text_kind: TextKind) -> RawTextWriterBuilder

Constructs a text Ion writer with the specified formatting. See TextKind for details.

source

pub fn compact() -> RawTextWriterBuilder

Constructs a text Ion writer with modest (but not strictly minimal) spacing.

For example:

{foo: 1, bar: 2, baz: 3} [1, 2, 3] true "hello"
source

pub fn lines() -> RawTextWriterBuilder

Constructs a ‘lines’ text Ion writer that adds UNIX and human-friendly newlines between top-level values.

For example:

{foo: 1, bar: 2, baz: 3}
[1, 2, 3]
true
"hello"
source

pub fn pretty() -> RawTextWriterBuilder

Constructs a ‘pretty’ text Ion writer that adds human-friendly spacing between values.

For example:

{
    foo: 1,
    bar: 2,
    baz: 3
}
[
    1,
    2,
    3
]
true
"hello"
source

pub fn with_space_between_top_level_values( self, space_between_top_level_values: &'static str ) -> RawTextWriterBuilder

source

pub fn with_space_between_nested_values( self, space_between_values: &'static str ) -> RawTextWriterBuilder

source

pub fn with_indentation(self, indentation: &'static str) -> RawTextWriterBuilder

source

pub fn with_space_after_field_name( self, space_after_field_name: &'static str ) -> RawTextWriterBuilder

source

pub fn with_space_after_container_start( self, space_after_container_start: &'static str ) -> RawTextWriterBuilder

source

pub fn build<W: Write>(self, sink: W) -> IonResult<RawTextWriter<W>>

Constructs a new instance of RawTextWriter that writes values to the provided io::Write implementation.

Trait Implementations§

source§

impl Default for RawTextWriterBuilder

source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.