A Moption
is a mutable option, like 'a option ref
, but with a more efficient
implementation; in particular, set_some
does not allocate.
include sig ... end
val sexp_of_t : ('a ‑> Base.Sexp.t) ‑> 'a t ‑> Base.Sexp.t
include Core_kernel__.Import.Invariant.S1 with type a t := a t
val invariant : 'a Base__.Invariant_intf.inv ‑> 'a t Base__.Invariant_intf.inv
module Optional_syntax : Optional_syntax.S1 with type a t := a t with type a value := a Core_kernel__.Import.identity
val create : Core_kernel__.Import.unit ‑> _ t
val is_none : _ t ‑> Core_kernel__.Import.bool
val is_some : _ t ‑> Core_kernel__.Import.bool
val get : 'a t ‑> 'a Core_kernel__.Import.option
val get_some_exn : 'a t ‑> 'a
val set : 'a t ‑> 'a Core_kernel__.Import.option ‑> Core_kernel__.Import.unit
val set_none : _ t ‑> Core_kernel__.Import.unit
val set_some : 'a t ‑> 'a ‑> Core_kernel__.Import.unit