pub struct TextWriterBuilder { /* private fields */ }
Implementations§
Source§impl TextWriterBuilder
impl TextWriterBuilder
Sourcepub fn new(format: TextKind) -> TextWriterBuilder
pub fn new(format: TextKind) -> TextWriterBuilder
Constructs a text Ion writer with the specified formatting. See TextKind
for details.
Sourcepub fn compact() -> TextWriterBuilder
pub fn compact() -> TextWriterBuilder
Constructs a text Ion writer that serializes data with modest (but not strictly minimal) spacing.
For example:
{foo: 1, bar: 2, baz: 3} [1, 2, 3] true "hello"
Sourcepub fn lines() -> TextWriterBuilder
pub fn lines() -> TextWriterBuilder
Constructs a newline-delimited 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"
Sourcepub fn pretty() -> TextWriterBuilder
pub fn pretty() -> TextWriterBuilder
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"
Sourcepub fn build<W: Write>(self, sink: W) -> IonResult<TextWriter<W>>
pub fn build<W: Write>(self, sink: W) -> IonResult<TextWriter<W>>
Constructs a new instance of TextWriter that writes values to the provided io::Write implementation.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TextWriterBuilder
impl RefUnwindSafe for TextWriterBuilder
impl Send for TextWriterBuilder
impl Sync for TextWriterBuilder
impl Unpin for TextWriterBuilder
impl UnwindSafe for TextWriterBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more