Module ser

Module ser 

Source
Expand description

Testing serialization implementations.

This module provides a Serializer struct for testing serialization. Construction of this struct uses the builder pattern through the Builder struct, allowing configuration of the behavior of the Serializer.

§Example

use claims::assert_ok_eq;
use serde::Serialize;
use serde_assert::{
    Serializer,
    Token,
};

let serializer = Serializer::builder().build();

assert_ok_eq!(true.serialize(&serializer), [Token::Bool(true)]);

Structs§

Builder
A builder for a Serializer.
CompoundSerializer
Serializer for serializing compound types.
Error
An error encountered during serialization.
SerializeStruct
Serializer for serializing structs.
Serializer
Serializer for testing Serialize implementations.

Enums§

SerializeStructAs
Configuration for serializing structs.