com.fsist

safepickle

package safepickle

Visibility
  1. Public
  2. All

Type Members

  1. class Autogen extends AnyRef

    Entrypoint for the Pickler autogeneration macro.

    Entrypoint for the Pickler autogeneration macro. See the documentation in the project's README.md.

  2. trait CollectionPicklersMixin extends TuplePicklers

    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.

  3. abstract class ConvertPickler[T, Other] extends Pickler[T]

    Pickles values of type T by converting them to values of type Other, which has an otherPickler provided.

  4. abstract class ConvertToStringPickler[T] extends ConvertPickler[T, String]

    A refining of ConvertPickler for converting types to Strings using their toString method.

  5. case class Name(value: String) extends Annotation with StaticAnnotation with Product with Serializable

    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.

  6. trait PickleReader extends AnyRef

    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.

  7. trait PickleWriter[+Repr] extends AnyRef

    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).

  8. trait Pickler[T] extends AnyRef

    A way to pickle or unpickle a type.

  9. trait PicklerBackend extends AnyRef

    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.

  10. trait PrimitivePicklersMixin extends AnyRef

    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.

  11. class SingletonPickler[T] extends Pickler[T]

    A pickler for a value T that pickles it to the fixed string name.

  12. sealed trait TokenType extends AnyRef

    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.

  13. trait TreeBuilder[Base] extends AnyRef

    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.

    Base

    the base concrete type of the nodes created by this factory.

  14. sealed trait TreeNodeType extends AnyRef

    Like TokenType, but for reified trees, with Object and Array nodes instead of Object/Array Start/End.

  15. trait TreeParser[Node] extends AnyRef

    A way to analyze a reified tree of nodes, with a base concrete type of Node, representing pickled primitive values.

  16. class TreePickleReader[Node] extends PickleReader

    A Reader implementation for a reified tree of nodes representing pickled primitive values.

  17. class TreePickleWriter[Base] extends PickleWriter[Base]

    Implements a Writer if given a way to build nodes in a tree-based representation.

  18. trait TuplePicklers extends AnyRef

    Implicit definitions of picklers for tuples of all sizes.

  19. case class UnexpectedEofException(expected: String) extends UnpicklingException with Product with Serializable

  20. class UnpicklingException extends Exception

Value Members

  1. object Autogen

  2. object CollectionPicklers extends CollectionPicklersMixin

    Implicit picklers for collection types.

  3. object DefaultPicklers extends PrimitivePicklersMixin with CollectionPicklersMixin

    The default picklers whose definitions should always be available.

  4. object Pickler extends PrimitivePicklersMixin with CollectionPicklersMixin

  5. object PrimitivePicklers extends PrimitivePicklersMixin

    Implicit definitions of picklers for standard types.

  6. object TokenType

  7. object TreeNodeType

  8. object TreePickleReader

  9. object TuplePicklersGen

  10. object UnpicklingException extends Serializable

Ungrouped