Skip to content

Commit

Permalink
Fix warnings about documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
dinosaure committed Jul 1, 2019
1 parent 9456613 commit 10e82ae
Showing 1 changed file with 41 additions and 30 deletions.
71 changes: 41 additions & 30 deletions lib/pecu.mli
Expand Up @@ -19,17 +19,21 @@ val decoder : src -> decoder
(** [decoder src] is a decoder that inputs from [src]. *)

val decode : decoder -> decode
(** [decode d] is: {ul {- [`Await] if [d] has a [`Manual] input source and
awaits for more input. The client must use {!src} to provide it.} {- [`End]
if the end of input was reached.} {- [`Malformed bytes] if the [bytes]
sequence is malformed according to the decoded quoted-printable encoding
scheme. If you are interested in a best-effort decoding you can still
continue to decode after an error until the decode synchronizes again on
valid bytes.} {- [`Data data] if a [data] sequence value was decoded.} {-
[`Line line] if a [line sequence value plus a line-break was decoded.]}}
{b Note.} Repeated invocation always eventually returns [`End], even in
case of errors. *)
(** [decode d] is:
{ul
{- [`Await] if [d] has a [`Manual] input source and awaits for more input.
The client must use {!src} to provide it.}
{- [`End] if the end of input was reached.}
{- [`Malformed bytes] if the [bytes] sequence is malformed according to the
decoded quoted-printable encoding scheme. If you are interested in a
best-effort decoding you can still continue to decode after an error until
the decode synchronizes again on valid bytes.}
{- [`Data data] if a [data] sequence value was decoded.}
{- [`Line line] if a [line sequence value plus a line-break was decoded.]}}
{b Note.} Repeated invocation always eventually returns [`End], even in case
of errors. *)

val decoder_byte_count : decoder -> int
(** [decoder_byte_count d] is the number of characters already decoded on [d]
Expand Down Expand Up @@ -64,18 +68,22 @@ module Inline : sig
(** [decoder src] is a decoder that inputs from [src]. *)

val decode : decoder -> decode
(** [decode d] is: {ul {- [`Await] if [d] has a [`Manual] input source and
awaits for more input. The client must use {!src} to provide it.} {-
[`End] if the end of input was reached.} {- [`Malformed bytes] if the
[bytes] sequence is malformed according to the decoded quoted-printable
encoding scheme. If you are interested in a best-effort decoding you can
still continue to decode after an error until the decode synchronizes
again on valid bytes.} {- [`Data data] if a [data] sequence value was
decoded.} {- [`Line line] if a [line sequence value plus a line-break was
decoded.]}}
(** [decode d] is:
{ul
{- [`Await] if [d] has a [`Manual] input source and awaits for more input.
The client must use {!src} to provide it.}
{- [`End] if the end of input was reached.}
{- [`Malformed bytes] if the [bytes] sequence is malformed according to
the decoded quoted-printable encoding scheme. If you are interested in a
best-effort decoding you can still continue to decode after an error until
the decode synchronizes again on valid bytes.}
{- [`Data data] if a [data] sequence value was decoded.}
{- [`Line line] if a [line sequence value plus a line-break was
decoded.]}}
{b Note.} Repeated invocation always eventually returns [`End], even in
case of errors. *)
case of errors. *)

val decoder_byte_count : decoder -> int
(** [decoder_byte_count d] is the number of characters already decoded on [d]
Expand Down Expand Up @@ -113,19 +121,22 @@ val encoder : dst -> encoder
(** [encoder dst] is an encoder for quoted-printable that outputs to [dst]. *)

val encode : encoder -> encode -> [`Ok | `Partial]
(** [encode e v]: is {ul {- [`Partial] iff [e] has a [`Manual] destination and
needs more output storage. The client must use {!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 [`Char], [`Line_break] or
[`End]}}
(** [encode e v]: is
{ul
{- [`Partial] iff [e] has a [`Manual] destination and needs more output
storage. The client must use {!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 [`Char], [`Line_break] or
[`End]}}
For [`Manual] destination, encoding [`End] always return [`Partial], the
client should continue as usual with [`Await] until [`Ok] is returned at
which point {!dst_rem} [encoder] is guaranteed to be the sode of the last
provided buffer (i.e. nothing was written).
client should continue as usual with [`Await] until [`Ok] is returned at
which point {!dst_rem} [encoder] is guaranteed to be the sode of the last
provided buffer (i.e. nothing was written).
{b Raises.} [Invalid_argument] if a [`Char], [`Line_break] or [`End] is
encoded after a [`Partial] encode. *)
encoded after a [`Partial] encode. *)

val encoder_dst : encoder -> dst
(** [encoder_dst encoder] is [encoder]'s output destination. *)
Expand Down

0 comments on commit 10e82ae

Please sign in to comment.