Entrypoint for the Pickler autogeneration macro.
Implicit picklers for collection types.
Implicit picklers for collection types.
This trait exists as a mixin so that types extending it can re-export its implicit definitions. If you don't need that, use the CollectionPicklers object.
Pickles values of type T
by converting them to values of type Other
, which has an otherPickler
provided.
A refining of ConvertPickler for converting types to Strings using their toString
method.
Place this annotation on a class parameter to make the Autogen pickler use this name in the pickled version instead of the parameter's name.
Produces a stream of tokens.
Produces a stream of tokens. Counterpart of Writer
.
This is patterned after the Jackson stream interface. At any given time, the Reader has a current token, unless it hasn't started reading yet or is already done. The current token can be inspected using the methods on the trait. Typical usage looks like this:
while (reader.next) { reader.tokenType match ... }
The methods int
, string
etc. throw an UnpicklingException if the current token is not of the right type,
or if there is no current token.
Writes a stream of tokens to an internal mutable buffer.
Writes a stream of tokens to an internal mutable buffer.
Instances are assumed to be mutable and not safe for concurrent write access, with some sort of mutable buffer or builder collecting the Result.
Methods may, but are not required to, fail with an IllegalStateException if called in an illegal sequence (e.g. writeAttributeName twice in a row).
A way to pickle or unpickle a type.
A marker trait for pickling backend implementations, allowing them to be distinguished at the type level.
A marker trait for pickling backend implementations, allowing them to be distinguished at the type level. Also serves as a factory for Reader and Writer instances.
Note: this requires implementations to be singletons, because this.type
is used to parameterize the Reader and Writer
instances returned.
Implicit definitions of picklers for standard types.
Implicit definitions of picklers for standard types.
This trait exists as a mixin so that types extending it can re-export its implicit definitions. If you don't need that, use the PrimitivePicklers object.
NOTE: in non-generic situations, when you know the type T you're dealing with statically, you don't have to use these as sub-picklers; you can call the methods PickleWriter.writeXxx and PickleReader.readXxx directly instead, which is more efficient and clearer to read.
A pickler for a value T that pickles it to the fixed string name
.
The type of a lexer-level token that can be read and written directly to a Reader/Writer.
The type of a lexer-level token that can be read and written directly to a Reader/Writer.
Token types might more naturally be represented as a series of traits implemented by the actual tokens, but that would require instantiating wrapper objects for the tokens, which would hurt performance.
A way to create new TreeNodes in some concrete implementation.
A way to create new TreeNodes in some concrete implementation.
Implementing this trait provides a Writer
implementation via TreePickleWriter.
However, tree-based representations are both less efficient and less secure than stream-based ones.
the base concrete type of the nodes created by this factory.
Like TokenType, but for reified trees, with Object and Array nodes instead of Object/Array Start/End.
A way to analyze a reified tree of nodes, with a base concrete type of Node
,
representing pickled primitive values.
A Reader implementation for a reified tree of nodes representing pickled primitive values.
Implements a Writer if given a way to build nodes in a tree-based representation.
Implicit definitions of picklers for tuples of all sizes.
Implicit picklers for collection types.
The default picklers whose definitions should always be available.
Implicit definitions of picklers for standard types.
Entrypoint for the Pickler autogeneration macro. See the documentation in the project's README.md.