Struct ion_rs::text::raw_text_writer::RawTextWriter
source · pub struct RawTextWriter<W: Write> { /* private fields */ }
Implementations§
source§impl<W: Write> RawTextWriter<W>
impl<W: Write> RawTextWriter<W>
sourcepub fn is_in_struct(&self) -> bool
pub fn is_in_struct(&self) -> bool
Returns true if the RawTextWriter is currently positioned within a Struct.
sourcepub fn write_big_decimal(&mut self, value: &BigDecimal) -> IonResult<()>
pub fn write_big_decimal(&mut self, value: &BigDecimal) -> IonResult<()>
Writes the provided BigDecimal value as an Ion decimal.
sourcepub fn write_datetime(&mut self, value: &DateTime<FixedOffset>) -> IonResult<()>
👎Deprecated since 0.6.1: Please use the write_timestamp
method instead.
pub fn write_datetime(&mut self, value: &DateTime<FixedOffset>) -> IonResult<()>
write_timestamp
method instead.Writes the provided DateTime value as an Ion timestamp.
pub fn add_annotation<A: AsRawSymbolTokenRef>(&mut self, annotation: A)
Trait Implementations§
source§impl<W: Write> IonWriter for RawTextWriter<W>
impl<W: Write> IonWriter for RawTextWriter<W>
source§fn set_annotations<I, A>(&mut self, annotations: I)where
A: AsRawSymbolTokenRef,
I: IntoIterator<Item = A>,
fn set_annotations<I, A>(&mut self, annotations: I)where A: AsRawSymbolTokenRef, I: IntoIterator<Item = A>,
Sets a list of annotations that will be applied to the next value that is written.
source§fn write_null(&mut self, ion_type: IonType) -> IonResult<()>
fn write_null(&mut self, ion_type: IonType) -> IonResult<()>
Writes an Ion null of the specified type.
source§fn write_bool(&mut self, value: bool) -> IonResult<()>
fn write_bool(&mut self, value: bool) -> IonResult<()>
Writes the provided bool value as an Ion boolean.
source§fn write_i64(&mut self, value: i64) -> IonResult<()>
fn write_i64(&mut self, value: i64) -> IonResult<()>
Writes the provided i64 value as an Ion integer.
source§fn write_int(&mut self, value: &Int) -> IonResult<()>
fn write_int(&mut self, value: &Int) -> IonResult<()>
Writes an Ion integer
with the specified value to the output stream.
source§fn write_f32(&mut self, value: f32) -> IonResult<()>
fn write_f32(&mut self, value: f32) -> IonResult<()>
Writes the provided f64 value as an Ion float.
source§fn write_f64(&mut self, value: f64) -> IonResult<()>
fn write_f64(&mut self, value: f64) -> IonResult<()>
Writes the provided f64 value as an Ion float.
source§fn write_decimal(&mut self, value: &Decimal) -> IonResult<()>
fn write_decimal(&mut self, value: &Decimal) -> IonResult<()>
Writes the provided Decimal as an Ion decimal.
source§fn write_timestamp(&mut self, value: &Timestamp) -> IonResult<()>
fn write_timestamp(&mut self, value: &Timestamp) -> IonResult<()>
Writes the provided Timestamp as an Ion timestamp.
source§fn write_symbol<A: AsRawSymbolTokenRef>(&mut self, value: A) -> IonResult<()>
fn write_symbol<A: AsRawSymbolTokenRef>(&mut self, value: A) -> IonResult<()>
Writes the provided &str value as an Ion symbol.
source§fn write_string<S: AsRef<str>>(&mut self, value: S) -> IonResult<()>
fn write_string<S: AsRef<str>>(&mut self, value: S) -> IonResult<()>
Writes the provided &str value as an Ion string.
source§fn write_clob<A: AsRef<[u8]>>(&mut self, value: A) -> IonResult<()>
fn write_clob<A: AsRef<[u8]>>(&mut self, value: A) -> IonResult<()>
Writes the provided byte array slice as an Ion clob.
source§fn write_blob<A: AsRef<[u8]>>(&mut self, value: A) -> IonResult<()>
fn write_blob<A: AsRef<[u8]>>(&mut self, value: A) -> IonResult<()>
Writes the provided byte array slice as an Ion blob.
source§fn step_in(&mut self, ion_type: IonType) -> IonResult<()>
fn step_in(&mut self, ion_type: IonType) -> IonResult<()>
Begins a container (List, S-Expression, or Struct). If ion_type
is not a container type,
step_in
will return an Err(IllegalOperation).
source§fn set_field_name<A: AsRawSymbolTokenRef>(&mut self, name: A)
fn set_field_name<A: AsRawSymbolTokenRef>(&mut self, name: A)
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.
source§fn step_out(&mut self) -> IonResult<()>
fn step_out(&mut self) -> IonResult<()>
Completes the current container. If the TextWriter is not currently positioned inside a
container, step_out
will return an Err(IllegalOperation).
§type Output = W
type Output = W
source§fn ion_version(&self) -> (u8, u8)
fn ion_version(&self) -> (u8, u8)
source§fn write_ion_version_marker(&mut self, major: u8, minor: u8) -> IonResult<()>
fn write_ion_version_marker(&mut self, major: u8, minor: u8) -> IonResult<()>
source§fn supports_text_symbol_tokens(&self) -> bool
fn supports_text_symbol_tokens(&self) -> bool
true
if this RawWriter supports writing field names, annotations, and
symbol values directly as text; otherwise, returns false
. Read moresource§fn parent_type(&self) -> Option<IonType>
fn parent_type(&self) -> Option<IonType>
None
. Otherwise, returns
Some(_)
with the parent container’s IonType.source§fn depth(&self) -> usize
fn depth(&self) -> usize
source§fn flush(&mut self) -> IonResult<()>
fn flush(&mut self) -> IonResult<()>
source§fn output_mut(&mut self) -> &mut W
fn output_mut(&mut self) -> &mut W
Auto Trait Implementations§
impl<W> RefUnwindSafe for RawTextWriter<W>where W: RefUnwindSafe,
impl<W> Send for RawTextWriter<W>where W: Send,
impl<W> Sync for RawTextWriter<W>where W: Sync,
impl<W> Unpin for RawTextWriter<W>where W: Unpin,
impl<W> UnwindSafe for RawTextWriter<W>where W: UnwindSafe,
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
source§impl<W> ElementWriter for Wwhere
W: IonWriter,
impl<W> ElementWriter for Wwhere W: IonWriter,
source§fn write_element(&mut self, element: &Element) -> Result<(), IonError>
fn write_element(&mut self, element: &Element) -> Result<(), IonError>
Element
as a top-level value.