package core

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

The Expert module is for building efficient out-of-module Iobuf abstractions.

val fillf_float : (Core.read_write, Iobuf.seek) Iobuf.t -> c_format:string -> float -> [ `Ok | `Truncated | `Format_error ]

fillf_float t ~c_format float attempts to fill a string representation of a float into an iobuf at the current position. The representation is specified by standard C printf formatting codes.

The highest available byte of the window is unusable and will be set to 0 in the case that a properly formatted string would otherwise fully fill the window.

If there is enough room in (window - 1) to format the float as specified then `Ok is returned and the window is advanced past the written bytes.

If there is not enough room in (window - 1) to format as specified then `Truncated is returned.

If C snprintf indicates a format error then `Format_error is returned.

Operation is unsafe if a format code not intended for a double precision float is used (e.g., %s) or if more than one format specifier is provided, etc.

val to_iovec_shared : ?pos:int -> ?len:int -> (_, _) Iobuf.t -> Core.Bigstring.t Core.Unix.IOVec.t
OCaml

Innovation. Community. Security.