Struct SimpleSeq

Source
pub struct SimpleSeq<'i, W: Write> {
    writer: W,
    target: QuoteTarget,
    level: QuoteLevel,
    indent: Indent<'i>,
    is_empty: bool,
}
Expand description

Serializer for a sequence of atomic values delimited by space

Fields§

§writer: W§target: QuoteTarget§level: QuoteLevel§indent: Indent<'i>

Indent that should be written before the content if content is not an empty string

§is_empty: bool

If true, nothing was written yet to the writer

Trait Implementations§

Source§

impl<'i, W: Write> SerializeSeq for SimpleSeq<'i, W>

Source§

type Ok = W

Must match the Ok type of our Serializer.
Source§

type Error = DeError

Must match the Error type of our Serializer.
Source§

fn serialize_element<T>(&mut self, value: &T) -> Result<(), Self::Error>
where T: ?Sized + Serialize,

Serialize a sequence element.
Source§

fn end(self) -> Result<Self::Ok, Self::Error>

Finish serializing a sequence.
Source§

impl<'i, W: Write> SerializeTuple for SimpleSeq<'i, W>

Source§

type Ok = W

Must match the Ok type of our Serializer.
Source§

type Error = DeError

Must match the Error type of our Serializer.
Source§

fn serialize_element<T>(&mut self, value: &T) -> Result<(), Self::Error>
where T: ?Sized + Serialize,

Serialize a tuple element.
Source§

fn end(self) -> Result<Self::Ok, Self::Error>

Finish serializing a tuple.
Source§

impl<'i, W: Write> SerializeTupleStruct for SimpleSeq<'i, W>

Source§

type Ok = W

Must match the Ok type of our Serializer.
Source§

type Error = DeError

Must match the Error type of our Serializer.
Source§

fn serialize_field<T>(&mut self, value: &T) -> Result<(), Self::Error>
where T: ?Sized + Serialize,

Serialize a tuple struct field.
Source§

fn end(self) -> Result<Self::Ok, Self::Error>

Finish serializing a tuple struct.
Source§

impl<'i, W: Write> SerializeTupleVariant for SimpleSeq<'i, W>

Source§

type Ok = W

Must match the Ok type of our Serializer.
Source§

type Error = DeError

Must match the Error type of our Serializer.
Source§

fn serialize_field<T>(&mut self, value: &T) -> Result<(), Self::Error>
where T: ?Sized + Serialize,

Serialize a tuple variant field.
Source§

fn end(self) -> Result<Self::Ok, Self::Error>

Finish serializing a tuple variant.

Auto Trait Implementations§

§

impl<'i, W> Freeze for SimpleSeq<'i, W>
where W: Freeze,

§

impl<'i, W> RefUnwindSafe for SimpleSeq<'i, W>
where W: RefUnwindSafe,

§

impl<'i, W> Send for SimpleSeq<'i, W>
where W: Send,

§

impl<'i, W> Sync for SimpleSeq<'i, W>
where W: Sync,

§

impl<'i, W> Unpin for SimpleSeq<'i, W>
where W: Unpin,

§

impl<'i, W> !UnwindSafe for SimpleSeq<'i, W>

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where 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 T
where 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 T
where U: Into<T>,

Source§

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 T
where U: TryFrom<T>,

Source§

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.