package tezos-lwt-result-stdlib

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
include Bare_sigs.Result.S
type ('a, 'e) t = ('a, 'e) Stdlib.result =
  1. | Ok of 'a
  2. | Error of 'e
val ok : 'a -> ('a, 'e) Stdlib.result
val ok_s : 'a -> ('a, 'e) Stdlib.result Lwt.t
val error : 'e -> ('a, 'e) Stdlib.result
val error_s : 'e -> ('a, 'e) Stdlib.result Lwt.t
val value : ('a, 'e) Stdlib.result -> default:'a -> 'a
val value_f : ('a, 'e) Stdlib.result -> default:(unit -> 'a) -> 'a
val bind : ('a, 'e) Stdlib.result -> ('a -> ('b, 'e) Stdlib.result) -> ('b, 'e) Stdlib.result
val bind_s : ('a, 'e) Stdlib.result -> ('a -> ('b, 'e) Stdlib.result Lwt.t) -> ('b, 'e) Stdlib.result Lwt.t
val bind_error : ('a, 'e) Stdlib.result -> ('e -> ('a, 'f) Stdlib.result) -> ('a, 'f) Stdlib.result
val bind_error_s : ('a, 'e) Stdlib.result -> ('e -> ('a, 'f) Stdlib.result Lwt.t) -> ('a, 'f) Stdlib.result Lwt.t
val join : (('a, 'e) Stdlib.result, 'e) Stdlib.result -> ('a, 'e) Stdlib.result
val map : ('a -> 'b) -> ('a, 'e) Stdlib.result -> ('b, 'e) Stdlib.result
val map_e : ('a -> ('b, 'e) Stdlib.result) -> ('a, 'e) Stdlib.result -> ('b, 'e) Stdlib.result
val map_s : ('a -> 'b Lwt.t) -> ('a, 'e) Stdlib.result -> ('b, 'e) Stdlib.result Lwt.t
val map_es : ('a -> ('b, 'e) Stdlib.result Lwt.t) -> ('a, 'e) Stdlib.result -> ('b, 'e) Stdlib.result Lwt.t
val map_error : ('e -> 'f) -> ('a, 'e) Stdlib.result -> ('a, 'f) Stdlib.result
val map_error_e : ('e -> ('a, 'f) Stdlib.result) -> ('a, 'e) Stdlib.result -> ('a, 'f) Stdlib.result
val map_error_s : ('e -> 'f Lwt.t) -> ('a, 'e) Stdlib.result -> ('a, 'f) Stdlib.result Lwt.t
val map_error_es : ('e -> ('a, 'f) Stdlib.result Lwt.t) -> ('a, 'e) Stdlib.result -> ('a, 'f) Stdlib.result Lwt.t
val fold : ok:('a -> 'c) -> error:('e -> 'c) -> ('a, 'e) Stdlib.result -> 'c
val iter : ('a -> unit) -> ('a, 'e) Stdlib.result -> unit
val iter_s : ('a -> unit Lwt.t) -> ('a, 'e) Stdlib.result -> unit Lwt.t
val iter_error : ('e -> unit) -> ('a, 'e) Stdlib.result -> unit
val iter_error_s : ('e -> unit Lwt.t) -> ('a, 'e) Stdlib.result -> unit Lwt.t
val is_ok : ('a, 'e) Stdlib.result -> bool
val is_error : ('a, 'e) Stdlib.result -> bool
val equal : ok:('a -> 'a -> bool) -> error:('e -> 'e -> bool) -> ('a, 'e) Stdlib.result -> ('a, 'e) Stdlib.result -> bool
val compare : ok:('a -> 'a -> int) -> error:('e -> 'e -> int) -> ('a, 'e) Stdlib.result -> ('a, 'e) Stdlib.result -> int
val to_option : ('a, 'e) Stdlib.result -> 'a option
val of_option : error:'e -> 'a option -> ('a, 'e) Stdlib.result
val to_list : ('a, 'e) Stdlib.result -> 'a list
val to_seq : ('a, 'e) Stdlib.result -> 'a Stdlib.Seq.t
OCaml

Innovation. Community. Security.