Struct ion_rs::text::raw_text_writer::RawTextWriterBuilder
source · pub struct RawTextWriterBuilder { /* private fields */ }
Implementations§
source§impl RawTextWriterBuilder
impl RawTextWriterBuilder
sourcepub fn new(text_kind: TextKind) -> RawTextWriterBuilder
pub fn new(text_kind: TextKind) -> RawTextWriterBuilder
Constructs a text Ion writer with the specified formatting. See TextKind
for details.
sourcepub fn compact() -> RawTextWriterBuilder
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"
sourcepub fn lines() -> RawTextWriterBuilder
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"
sourcepub fn pretty() -> RawTextWriterBuilder
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"
pub fn with_space_between_top_level_values( self, space_between_top_level_values: &'static str ) -> RawTextWriterBuilder
pub fn with_space_between_nested_values( self, space_between_values: &'static str ) -> RawTextWriterBuilder
pub fn with_indentation(self, indentation: &'static str) -> RawTextWriterBuilder
pub fn with_space_after_field_name( self, space_after_field_name: &'static str ) -> RawTextWriterBuilder
pub fn with_space_after_container_start( self, space_after_container_start: &'static str ) -> RawTextWriterBuilder
sourcepub fn build<W: Write>(self, sink: W) -> IonResult<RawTextWriter<W>>
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§
Auto Trait Implementations§
impl RefUnwindSafe for RawTextWriterBuilder
impl Send for RawTextWriterBuilder
impl Sync for RawTextWriterBuilder
impl Unpin for RawTextWriterBuilder
impl UnwindSafe for RawTextWriterBuilder
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