package mirage-block-lwt

  1. Overview
  2. Docs

Copy bytes between blocks

Parameters

module A : S
module B : S

Signature

type error = private [>
  1. | `Is_read_only
  2. | `Different_sizes
]

The type for copy errors.

val pp_error : error Fmt.t

pp_error is the pretty-printer for copy errors.

val v : src:A.t -> dst:B.t -> (unit, error) Result.result Lwt.t

Copy all data from a source BLOCK device to a destination BLOCK device.

Fails with `Different_sizes if the source and destination are not exactly the same size.

Fails with `Is_read_only if the destination device is read-only.

OCaml

Innovation. Community. Security.