mirage-block-combinators

Block signatures and implementations for MirageOS using Lwt
IN THIS PACKAGE

Parameters

module B : Mirage_block.S

Signature

type t = B.t
type error = [
| Mirage_block.error
| `Unsafe of string
| `Private of B.error
]
val pp_error : Format.formatter -> [< `Disconnected | `Private of B.error | `Unsafe of string ] -> unit
type write_error = [
| Mirage_block.write_error
| `Unsafe of string
| `Private of B.write_error
]
val pp_write_error : Format.formatter -> [< `Disconnected | `Is_read_only | `Private of B.write_error | `Unsafe of string ] -> unit
val get_info : B.t -> Mirage_block.info Lwt.t
val disconnect : B.t -> unit Lwt.t
val lift_error : ( 'a, [> Mirage_block.error ] as 'b ) result -> ( 'c, [> `Disconnected | `Private of 'd ] ) result
val lift_write_error : ( 'a, [> Mirage_block.write_error ] as 'b ) result -> ( 'c, [> `Disconnected | `Is_read_only | `Private of 'd ] ) result
val (>>*=) : ( 'a, 'b ) result Lwt.t -> ( 'c -> ( 'd, 'e ) result Lwt.t ) -> ( 'd, 'e ) result Lwt.t
val fatalf : ( 'a, unit, string, ( 'b, [> `Unsafe of string ] ) result Lwt.t ) format4 -> 'c
val check_buffer : string -> int -> Cstruct.t -> ( unit, [> `Unsafe of string ] ) result Lwt.t
val check_buffers : string -> int -> Cstruct.t list -> ( unit, [> `Unsafe of string ] ) result Lwt.t
val check_in_range : string -> int64 -> int64 -> ( unit, [> `Unsafe of string ] ) result Lwt.t
val check : string -> int -> int64 -> int64 -> Cstruct.t list -> ( unit, [> `Unsafe of string ] ) result Lwt.t
val unsafe_read : B.t -> int64 -> Cstruct.t list -> ( unit, B.error ) result Lwt.t
val unsafe_write : B.t -> int64 -> Cstruct.t list -> ( unit, B.write_error ) result Lwt.t
val read : B.t -> int64 -> Cstruct.t list -> ( unit, [> `Disconnected | `Private of B.error | `Unsafe of string ] ) result Lwt.t
val write : B.t -> int64 -> Cstruct.t list -> ( unit, [> `Disconnected | `Is_read_only | `Private of B.write_error | `Unsafe of string ] ) result Lwt.t