[−][src]Struct ion_rs::text::writer::TextWriter
Implementations
impl<W: Write> TextWriter<W>
[src]
pub fn new(sink: W) -> TextWriter<W>
[src]
Constructs a new instance of TextWriter that writes values to the provided io::Write implementation.
pub fn output(&self) -> &W
[src]
Returns a reference to the underlying io::Write implementation.
pub fn flush(&mut self) -> IonResult<()>
[src]
Causes any buffered data to be written to the underlying io::Write implementation.
pub fn set_field_name(&mut self, name: &str)
[src]
Sets the current field name to name
. If the TextWriter is currently positioned inside
of a struct, the field name will be written before the next value. Otherwise, it will be
ignored.
pub fn set_annotations(&mut self, annotations: &[&str])
[src]
Sets a list of annotations that will be applied to the next value that is written.
pub fn step_in(&mut self, ion_type: IonType) -> IonResult<()>
[src]
Begins a container (List, S-Expression, or Struct). If ion_type
is not a container type,
step_in
will return an Err(IllegalOperation).
pub fn is_in_struct(&self) -> bool
[src]
Returns true if the TextWriter is currently positioned within a Struct.
pub fn step_out(&mut self) -> IonResult<()>
[src]
pub fn write_null(&mut self, ion_type: IonType) -> IonResult<()>
[src]
Writes an Ion null of the specified type.
pub fn write_bool(&mut self, value: bool) -> IonResult<()>
[src]
Writes the provided bool value as an Ion boolean.
pub fn write_i64(&mut self, value: i64) -> IonResult<()>
[src]
Writes the provided i64 value as an Ion integer.
pub fn write_f64(&mut self, value: f64) -> IonResult<()>
[src]
Writes the provided f64 value as an Ion float.
pub fn write_big_decimal(&mut self, value: &BigDecimal) -> IonResult<()>
[src]
Writes the provided BigDecimal value as an Ion decimal.
pub fn write_datetime(&mut self, value: &DateTime<FixedOffset>) -> IonResult<()>
[src]
Writes the provided DateTime value as an Ion timestamp.
pub fn write_symbol<S: AsRef<str>>(&mut self, value: S) -> IonResult<()>
[src]
Writes the provided &str value as an Ion symbol.
pub fn write_string<S: AsRef<str>>(&mut self, value: S) -> IonResult<()>
[src]
Writes the provided &str value as an Ion string.
pub fn write_blob(&mut self, value: &[u8]) -> IonResult<()>
[src]
Writes the provided byte array slice as an Ion blob.
pub fn write_clob(&mut self, _value: &[u8]) -> IonResult<()>
[src]
Writes the provided byte array slice as an Ion clob.
Auto Trait Implementations
impl<W> RefUnwindSafe for TextWriter<W> where
W: RefUnwindSafe,
W: RefUnwindSafe,
impl<W> Send for TextWriter<W> where
W: Send,
W: Send,
impl<W> Sync for TextWriter<W> where
W: Sync,
W: Sync,
impl<W> Unpin for TextWriter<W> where
W: Unpin,
W: Unpin,
impl<W> UnwindSafe for TextWriter<W> where
W: UnwindSafe,
W: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,