Qucs-S S-parameter Viewer & RF Synthesis Tools
Loading...
Searching...
No Matches
Classes | Functions | Variables
cattrs.preconf.msgspec Namespace Reference

Classes

class  MsgspecJsonConverter
 

Functions

None configure_converter (Converter converter)
 
MsgspecJsonConverter make_converter (*Any args, **Any kwargs)
 
None configure_passthroughs (Converter converter)
 
UnstructureHook seq_unstructure_factory (type, Converter converter)
 
UnstructureHook mapping_unstructure_factory (type, BaseConverter converter)
 
UnstructureHook attrs_unstructure_factory (Any type, Converter converter)
 
UnstructureHook namedtuple_unstructure_factory (type[tuple] type, BaseConverter converter)
 

Variables

 T = TypeVar("T")
 

Detailed Description

Preconfigured converters for msgspec.

Function Documentation

◆ attrs_unstructure_factory()

UnstructureHook cattrs.preconf.msgspec.attrs_unstructure_factory ( Any  type,
Converter  converter 
)
Choose whether to use msgspec handling or our own.

◆ configure_converter()

None cattrs.preconf.msgspec.configure_converter ( Converter  converter)
Configure the converter for the msgspec library.

* bytes are serialized as base64 strings, directly by msgspec
* datetimes and dates are passed through to be serialized as RFC 3339 directly
* enums are passed through to msgspec directly
* union passthrough configured for str, bool, int, float and None

◆ configure_passthroughs()

None cattrs.preconf.msgspec.configure_passthroughs ( Converter  converter)
Configure optimizing passthroughs.

A passthrough is when we let msgspec handle something automatically.

◆ mapping_unstructure_factory()

UnstructureHook cattrs.preconf.msgspec.mapping_unstructure_factory (   type,
BaseConverter  converter 
)
The msgspec unstructure hook factory for mappings.

◆ namedtuple_unstructure_factory()

UnstructureHook cattrs.preconf.msgspec.namedtuple_unstructure_factory ( type[tuple]  type,
BaseConverter   converter 
)
A hook factory for unstructuring namedtuples, modified for msgspec.

◆ seq_unstructure_factory()

UnstructureHook cattrs.preconf.msgspec.seq_unstructure_factory (   type,
Converter  converter 
)
The msgspec unstructure hook factory for sequences.