package scid

  1. Overview
  2. Docs
Sierra Chart's Intraday Data File Format library

Install

Dune Dependency

Authors

Maintainers

Sources

1.0.tar.gz
sha256=17ff400b8358295ab603813d96e4f81f65c8ba790ce8d555ffed58dab7e556b2
md5=6fb1bd0e286c36d92bb0cf5c6e7c0c35

doc/scid/Scid/E/index.html

Module Scid.E

type dst =
  1. | Channel of out_channel
  2. | Buffer of Buffer.t
  3. | Manual
    (*

    The type for output destinations.

    *)
type t

The type for R encoders.

val make : dst -> t

encoder dst is an encoder that outputs to dst.

type encode =
  1. | Await
  2. | End
  3. | R of R.t
val encode : t -> encode -> [ `Ok | `Partial ]

encode e v is :

  • `Partial iff e has a `Manual destination and needs more output storage. The client must use Manual.dst to provide a new buffer and then call encode with `Await until `Ok is returned.
  • `Ok when the encoder is ready to encode a new `R or `End.

For `Manual destinations, encoding `End always returns `Partial, continue with `Await until `Ok is returned at which point Manual.dst_rem e is guaranteed to be the size of the last provided buffer (i.e. nothing was written).

Raises. Invalid_argument if a non well-formed sequence of lexemes is encoded or if a `Lexeme or `End is encoded after a `Partial encode.

module Manual : sig ... end

Manual destinations.

OCaml

Innovation. Community. Security.