Struct serde_v8::Serializer[][src]

pub struct Serializer<'a, 'b> { /* fields omitted */ }

Implementations

impl<'a, 'b> Serializer<'a, 'b>[src]

pub fn new(scope: Rc<RefCell<EscapableHandleScope<'a, 'b>>>) -> Self[src]

Trait Implementations

impl<'a, 'b> Clone for Serializer<'a, 'b>[src]

impl<'a, 'b> Serializer for Serializer<'a, 'b>[src]

type Ok = Local<'a, Value>

The output type produced by this Serializer during successful serialization. Most serializers that produce text or binary output should set Ok = () and serialize into an io::Write or buffer contained within the Serializer instance. Serializers that build in-memory data structures may be simplified by using Ok to propagate the data structure around. Read more

type Error = Error

The error type when some error occurs during serialization.

type SerializeSeq = ArraySerializer<'a, 'b>

Type returned from serialize_seq for serializing the content of the sequence. Read more

type SerializeTuple = ArraySerializer<'a, 'b>

Type returned from serialize_tuple for serializing the content of the tuple. Read more

type SerializeTupleStruct = ArraySerializer<'a, 'b>

Type returned from serialize_tuple_struct for serializing the content of the tuple struct. Read more

type SerializeTupleVariant = VariantSerializer<'a, 'b, ArraySerializer<'a, 'b>>

Type returned from serialize_tuple_variant for serializing the content of the tuple variant. Read more

type SerializeMap = MapSerializer<'a, 'b>

Type returned from serialize_map for serializing the content of the map. Read more

type SerializeStruct = StructSerializers<'a, 'b>

Type returned from serialize_struct for serializing the content of the struct. Read more

type SerializeStructVariant = VariantSerializer<'a, 'b, StructSerializers<'a, 'b>>

Type returned from serialize_struct_variant for serializing the content of the struct variant. Read more

fn serialize_unit_variant(
    self,
    _name: &'static str,
    _variant_index: u32,
    variant: &'static str
) -> Result<Local<'a, Value>>
[src]

For compatibility with serde-json, serialises unit variants as “Variant” strings.

fn serialize_seq(self, _len: Option<usize>) -> Result<Self::SerializeSeq>[src]

Serialises any Rust iterable into a JS Array

fn serialize_struct(
    self,
    name: &'static str,
    _len: usize
) -> Result<Self::SerializeStruct>
[src]

Serialises Rust typed structs into plain JS objects.

Auto Trait Implementations

impl<'a, 'b> !RefUnwindSafe for Serializer<'a, 'b>

impl<'a, 'b> !Send for Serializer<'a, 'b>

impl<'a, 'b> !Sync for Serializer<'a, 'b>

impl<'a, 'b> Unpin for Serializer<'a, 'b>

impl<'a, 'b> !UnwindSafe for Serializer<'a, 'b>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.