

stdlib
======

 Packages

 * [stdlib](https://stdlib.ponylang.io/stdlib--index/)
* [assert](assert--index)
* [backpressure](backpressure--index)
* [buffered](buffered--index)
* [builtin](builtin--index)
* [bureaucracy](bureaucracy--index)
* [capsicum](capsicum--index)
* [cli](cli--index)
* [collections](collections--index)
* [collections/persistent](collections-persistent--index)
* [debug](debug--index)
* [encode/base64](encode-base64--index)
* [files](files--index)
* [format](format--index)
* [ini](ini--index)
* [itertools](itertools--index)
* [json](json--index)
* [logger](logger--index)
* [math](math--index)
* [net](net--index)
* [options](options--index)
* [ponybench](ponybench--index)
* [ponytest](ponytest--index)
* [process](process--index)
* [promises](promises--index)
* [random](random--index)
* [serialise](serialise--index)
* [signals](signals--index)
* [strings](strings--index)
* [term](term--index)
* [time](time--index)



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/>

Format package
==============

 The Format package provides support for formatting strings. It can be used to set things like width, padding and alignment, as well as controlling the way numbers are displayed (decimal, octal, hexadecimal).

 Example program
===============

 
```
use "format"

actor Main
  fun disp(desc: String, v: I32, fmt: FormatInt = FormatDefault): String =>
    Format(desc where width = 10)
      + ":"
      + Format.int[I32](v where width = 10, align = AlignRight, fmt = fmt)

  new create(env: Env) =>
    try
      (let x, let y) = (env.args(1)?.i32()?, env.args(2)?.i32()?)
      env.out.print(disp("x", x))
      env.out.print(disp("y", y))
      env.out.print(disp("hex(x)", x, FormatHex))
      env.out.print(disp("hex(y)", y, FormatHex))
      env.out.print(disp("x * y", x * y))
    else
      let exe = try env.args(0)? else "fmt_example" end
      env.err.print("Usage: " + exe + " NUMBER1 NUMBER2")
    end

```
 Public Types
------------

 * [trait PrefixSpec](format-prefixspec)
* [primitive PrefixDefault](format-prefixdefault)
* [primitive PrefixSpace](format-prefixspace)
* [primitive PrefixSign](format-prefixsign)
* [type PrefixNumber](format-prefixnumber)
* [trait FormatSpec](format-formatspec)
* [primitive FormatDefault](format-formatdefault)
* [primitive FormatUTF32](format-formatutf32)
* [primitive FormatBinary](format-formatbinary)
* [primitive FormatBinaryBare](format-formatbinarybare)
* [primitive FormatOctal](format-formatoctal)
* [primitive FormatOctalBare](format-formatoctalbare)
* [primitive FormatHex](format-formathex)
* [primitive FormatHexBare](format-formathexbare)
* [primitive FormatHexSmall](format-formathexsmall)
* [primitive FormatHexSmallBare](format-formathexsmallbare)
* [type FormatInt](format-formatint)
* [primitive FormatExp](format-formatexp)
* [primitive FormatExpLarge](format-formatexplarge)
* [primitive FormatFix](format-formatfix)
* [primitive FormatFixLarge](format-formatfixlarge)
* [primitive FormatGeneral](format-formatgeneral)
* [primitive FormatGeneralLarge](format-formatgenerallarge)
* [type FormatFloat](format-formatfloat)
* [primitive Format](format-format)
* [primitive AlignLeft](format-alignleft)
* [primitive AlignRight](format-alignright)
* [primitive AlignCenter](format-aligncenter)
* [type Align](format-align)



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/format--index>

Files package
=============

 The Files package provides classes for working with files and directories.

 Files are identified by `FilePath` objects, which represent both the path to the file and the capabilites for accessing the file at that path. `FilePath` objects can be used with the `CreateFile` and `OpenFile` primitives and the `File` class to get a reference to a file that can be used to write to and/or read from the file. It can also be used with the `Directory` object to get a reference to a directory object that can be used for directory operations.

 The `FileLines` class allows a file to be accessed one line at a time.

 The `FileStream` actor provides the ability to asynchronously write to a file.

 The `Path` primitive can be used to do path-related operations on strings and characters.

 Example program
===============

 This program opens the files that are given as command line arguments and prints their contents.

 
```
use "files"

actor Main
  new create(env: Env) =>
    try
      for file_name in env.args.slice(1).values() do
        let path = FilePath(env.root as AmbientAuth, file_name)?
        match OpenFile(path)
        | let file: File =>
          while file.errno() is FileOK do
            env.out.write(file.read(1024))
          end
        else
          env.err.print("Error opening file '" + file_name + "'")
        end
      end
    end

```
 Public Types
------------

 * [primitive Path](files-path)
* [actor FileStream](files-filestream)
* [interface WalkHandler](files-walkhandler)
* [class FilePath](files-filepath)
* [class FileMode](files-filemode)
* [class FileLines](files-filelines)
* [class FileInfo](files-fileinfo)
* [primitive FileCreate](files-filecreate)
* [primitive FileChmod](files-filechmod)
* [primitive FileChown](files-filechown)
* [primitive FileLink](files-filelink)
* [primitive FileLookup](files-filelookup)
* [primitive FileMkdir](files-filemkdir)
* [primitive FileRead](files-fileread)
* [primitive FileRemove](files-fileremove)
* [primitive FileRename](files-filerename)
* [primitive FileSeek](files-fileseek)
* [primitive FileStat](files-filestat)
* [primitive FileSync](files-filesync)
* [primitive FileTime](files-filetime)
* [primitive FileTruncate](files-filetruncate)
* [primitive FileWrite](files-filewrite)
* [primitive FileExec](files-fileexec)
* [type FileCaps](files-filecaps)
* [primitive FileOK](files-fileok)
* [primitive FileError](files-fileerror)
* [primitive FileEOF](files-fileeof)
* [primitive FileBadFileNumber](files-filebadfilenumber)
* [primitive FileExists](files-fileexists)
* [primitive FilePermissionDenied](files-filepermissiondenied)
* [type FileErrNo](files-fileerrno)
* [primitive CreateFile](files-createfile)
* [primitive OpenFile](files-openfile)
* [class File](files-file)
* [class Directory](files-directory)



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/files--index>

Assert package
==============

 Contains runtime assertions. If you are looking for assertion that only run when your code was compiled with the `debug` flag, check out `Assert`. For assertions that are always enabled, check out `Fact`.

 Public Types
------------

 * [primitive Assert](assert-assert)
* [primitive Fact](assert-fact)



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/assert--index>

Ini package
===========

 The Ini package provides support for parsing [INI file](https://en.wikipedia.org/wiki/INI_file) formatted text.

 * Currently *does not* support multi-line entries.
* Any keys not in a section will be placed in the section ""

 Example code
============

 
```
// Parses the file 'example.ini' in the current working directory
// Output all the content
use "ini"
use "files"

actor Main
  new create(env:Env) =>
    try
      let ini_file = File(FilePath(env.root as AmbientAuth, "example.ini")?)
      let sections = IniParse(ini_file.lines())?
      for section in sections.keys() do
        env.out.print("Section name is: " + section)
        for key in sections(section)?.keys() do
          env.out.print(key + " = " + sections(section)?(key)?)
        end
      end
    end

```
 Public Types
------------

 * [type IniMap](ini-inimap)
* [primitive IniParse](ini-iniparse)
* [primitive IniIncompleteSection](ini-iniincompletesection)
* [primitive IniNoDelimiter](ini-ininodelimiter)
* [type IniError](ini-inierror)
* [interface IniNotify](ini-ininotify)
* [primitive Ini](ini-ini)



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/ini--index>

Bureaucracy package
===================

 It happens to almost every program. It starts small, tiny if you will, like a village where every actor knows every other actor and shutdown is easy. One day you realize your program is no longer a cute seaside hamlet, its a bustling metropolis and you are doing way too much work to keep track of everything. What do you do? Call for a little bureaucracy.

 The bureaucracy contains objects designed to ease your bookkeeping burdens. Need to shutdown a number of actors together? Check out `Custodian`. Need to keep track of a lot of stuff and be able to look it up by name? Check out `Registrar`.

 Put bureaucracy to use today and before long, your sprawling metropolis of a code base will be manageable again in no time.

 Public Types
------------

 * [actor Registrar](bureaucracy-registrar)
* [actor Custodian](bureaucracy-custodian)



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/bureaucracy--index>

Options package
===============

 The Options package provides support for parsing command line arguments.

 Deprectation warning
--------------------

 This package is deprecated and will be removed in a future release. Use the [cli](cli--index) package instead.

 Example program
---------------

 
```
use "options"

actor Main
  let _env: Env
  // Some values we can set via command line options
  var _a_string: String = "default"
  var _a_number: USize = 0
  var _a_unumber: USize = 0
  var _a_float: Float = F64(0.0)

  new create(env: Env) =>
    _env = env
    try
      arguments()?
    end

    _env.out.print("The String is " + _a_string)
    _env.out.print("The Number is " + _a_number.string())
    _env.out.print("The UNumber is " + _a_unumber.string())
    _env.out.print("The Float is " + _a_float.string())

  fun ref arguments() ? =>
    var options = Options(_env.args)

    options
      .add("string", "t", StringArgument)
      .add("number", "i", I64Argument)
      .add("unumber", "u", U64Argument)
      .add("float", "c", F64Argument)

    for option in options do
      match option
      | ("string", let arg: String) => _a_string = arg
      | ("number", let arg: I64) => _a_number = arg.usize()
      | ("unumber", let arg: U64) => _a_unumber = arg.usize()
      | ("float", let arg: F64) => _a_float = arg
      | let err: ParseError => err.report(_env.out) ; usage() ; error
      end
    end

  fun ref usage() =>
    // this exists inside a doc-string to create the docs you are reading
    // in real code, we would use a single string literal for this but
    // docstrings are themselves string literals and you can't put a
    // string literal in a string literal. That would lead to total
    // protonic reversal. In your own code, use a string literal instead
    // of string concatenation for this.
    _env.out.print(
      "program [OPTIONS]\n" +
      "  --string      N   a string argument. Defaults to 'default'.\n" +
      "  --number      N   a number argument. Defaults to 0.\n" +
      "  --unumber     N   a unsigned number argument. Defaults to 0.\n" +
      "  --float       N   a floating point argument. Defaults to 0.0.\n"
      )

```
 Public Types
------------

 * [primitive StringArgument](options-stringargument)
* [primitive I64Argument](options-i64argument)
* [primitive U64Argument](options-u64argument)
* [primitive F64Argument](options-f64argument)
* [primitive Required](options-required)
* [primitive Optional](options-optional)
* [primitive UnrecognisedOption](options-unrecognisedoption)
* [primitive AmbiguousMatch](options-ambiguousmatch)
* [primitive MissingArgument](options-missingargument)
* [primitive InvalidArgument](options-invalidargument)
* [type ArgumentType](options-argumenttype)
* [type ErrorReason](options-errorreason)
* [type ParsedOption](options-parsedoption)
* [interface ParseError](options-parseerror)
* [class Options](options-options)
* [primitive EnvVars](options-envvars)



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/options--index>

Itertools Package
=================

 The itertools package provides the `Iter` class for doing useful things with iterators. It is Inspired by Python's itertools library, Rust's Iterator, and Elixir's Enum and Stream.

 Iter
----

 The Iter class wraps iterators so that additional methods may be applied to it. Some methods, such as fold and collect, run through the underlying iterator in order to return a result. Others, such as map and filter, are lazy. This means that they return another Iter so that the resulting values are computed one by one as needed. Lazy methods return Iter types.

 For example, the following code creates an Iter from the values of an array containing the numbers 1 through 5, increments each number by one, filters out any odd numbers, and prints the rest.

 
```
let xs = Iter[I64]([1; 2; 3; 4; 5].values())
  .map[I64]({(x) => x + 1 })
  .filter({(x) => (x % 2) == 0 })
  .map[None]({(x) => env.out.print(x.string()) })

```
 This will result in an iterator that prints the numbers 2, 4, and 6. However, due to the lazy nature of the map and filter, no iteration has actually occurred and nothing will be printed. One solution to this would be to loop over the resulting Iter as so:

 
```
for x in xs do
  None
end

```
 This will trigger the iteration and print out the values 2, 4, and 6. This is where the `run` method comes in handy by doing the iteration without the need for a loop. So the final code would be as follows:

 
```
Iter[I64]([1; 2; 3; 4; 5].values())
  .map[I64]({(x) => x + 1 })
  .filter({(x) => (x % 2) == 0 })
  .map[None]({(x) => env.out.print(x.string()) })
  .run()

```
 Output:

 
```
2
4
6

```
 Public Types
------------

 * [class Iter](itertools-iter)



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/itertools--index>

Package
=======

 No package doc string provided for capsicum.

 Public Types
------------

 * [type CapRights](capsicum-caprights)
* [class CapRights0](capsicum-caprights0)
* [primitive Cap](capsicum-cap)



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/capsicum--index>

Debug package
=============

 Provides facilities to create output to either `STDOUT` or `STDERR` that will only appear when the platform is debug configured. To create a binary with debug configured, pass the `-d` flag to `ponyc` when compiling e.g.:

 `ponyc -d`

 Example code
------------

 
```
actor Main
  new create(env: Env) =>
    Debug.out("This will only be seen when configured for debug info")
    env.out.print("This will always be seen")

```
 Public Types
------------

 * [primitive DebugOut](debug-debugout)
* [primitive DebugErr](debug-debugerr)
* [type DebugStream](debug-debugstream)
* [primitive Debug](debug-debug)



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/debug--index>

JSON Package
============

 The `json` package provides the [JsonDoc](json-jsondoc) class both as a container for a JSON document and as means of parsing from and writing to [String](builtin-string).

 JSON Representation
-------------------

 JSON is represented in Pony as the following types:

 * object - [JsonObject](json-jsonobject)
* array - [JsonArray](json-jsonarray)
* string - [String](builtin-string)
* integer - [I64](builtin-i64)
* float - [F64](builtin-f64)
* boolean - [Bool](builtin-bool)
* null - [None](builtin-none)

 The collection types JsonObject and JsonArray can contain any other JSON structures arbitrarily nested.

 [JsonType](json-jsontype) is used to subsume all possible JSON types. It can also be used to describe everything that can be serialized using this package.

 Parsing JSON
------------

 For getting JSON from a String into proper Pony data structures, [JsonDoc.parse](json-jsondoc#parse) needs to be used. This will populate the public field `JsonDoc.data`, which is [None](builtin-none), if [parse](json-jsondoc#parse) has not been called yet.

 Every call to [parse](json-jsondoc#parse) overwrites the `data` field, so one JsonDoc instance can be used to parse multiple JSON Strings one by one.

 
```
let doc = JsonDoc
// parsing
doc.parse("{\"key\":\"value\", \"property\": true, \"array\":[1, 2.5, false]}")?

// extracting values from a JSON structure
let json: JsonObject  = doc.data as JsonObject
let key: String       = json.data("key")? as String
let property: Bool    = json.data("property")? as Bool
let array: JsonArray  = json.data("array")? as JsonArray
let first: I64        = array.data(0)? as I64
let second: F64       = array.data(1)? as F64
let last: Bool        = array.data(2)? as Bool

```
 ### Sending JSON

 [JsonDoc](json-jsondoc) has the `ref` reference capability, which means it is not sendable by default. If you need to send it to another actor you need to recover it to a sendable reference capability (either `val` or `iso`). For the sake of simplicity it is recommended to do the parsing already in the recover block:

 
```
// sending an iso doc
let json_string = "{\"array\":[1, true, null]}"
let sendable_doc: JsonDoc iso = recover iso JsonDoc.>parse(json_string)? end
some_actor.send(consume sendable_doc)

// sending a val doc
let val_doc: JsonDoc val = recover val JsonDoc.>parse(json_string)? end
some_actor.send_val(val_doc)

```
 When sending an `iso` JsonDoc it is important to recover it to a `ref` on the receiving side in order to be able to properly access the json structures in `data`.

 Writing JSON
------------

 JSON is written using the [JsonDoc.string](json-jsondoc#string) method. This will serialize the contents of the `data` field to [String](builtin-string).

 
```
// building up the JSON data structure
let doc = JsonDoc
let obj = JsonObject
obj.data("key") = "value"
obj.data("property") = true
obj.data("array") = JsonArray.from_array([ as JsonType: I64(1); F64(2.5); false])
doc.data = obj

// writing to String
env.out.print(
  doc.string(where indent="  ", pretty_print=true)
)


```
 Public Types
------------

 * [type JsonType](json-jsontype)
* [class JsonArray](json-jsonarray)
* [class JsonObject](json-jsonobject)
* [class JsonDoc](json-jsondoc)



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/json--index>

Buffered Package
================

 The Buffered package provides two classes, `Writer` and `Reader`, for writing and reading messages using common encodings. These classes are useful when dealing with things like network data and binary file formats.

 Example program
---------------

 
```
use "buffered"

actor Main
  new create(env: Env) =>
    let reader = Reader
    let writer = Writer

    writer.u32_be(42)
    writer.f32_be(3.14)

    let b = recover iso Array[U8] end

    for chunk in writer.done().values() do
      b.append(chunk)
    end

    reader.append(consume b)

    try
      env.out.print(reader.u32_be()?.string()) // prints 42
      env.out.print(reader.f32_be()?.string()) // prints 3.14
    end

```
 Public Types
------------

 * [class Writer](buffered-writer)
* [class Reader](buffered-reader)



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/buffered--index>

Package
=======

 No package doc string provided for collections.

 Public Types
------------

 * [primitive Sort](collections-sort)
* [type Set](collections-set)
* [type SetIs](collections-setis)
* [class HashSet](collections-hashset)
* [class SetValues](collections-setvalues)
* [class RingBuffer](collections-ringbuffer)
* [class Reverse](collections-reverse)
* [class Range](collections-range)
* [type Map](collections-map)
* [type MapIs](collections-mapis)
* [class HashMap](collections-hashmap)
* [class MapKeys](collections-mapkeys)
* [class MapValues](collections-mapvalues)
* [class MapPairs](collections-mappairs)
* [class ListNode](collections-listnode)
* [class List](collections-list)
* [class ListNodes](collections-listnodes)
* [class ListValues](collections-listvalues)
* [type MinHeap](collections-minheap)
* [type MaxHeap](collections-maxheap)
* [class BinaryHeap](collections-binaryheap)
* [type BinaryHeapPriority](collections-binaryheappriority)
* [primitive MinHeapPriority](collections-minheappriority)
* [primitive MaxHeapPriority](collections-maxheappriority)
* [interface Hashable](collections-hashable)
* [interface Hashable64](collections-hashable64)
* [interface HashFunction](collections-hashfunction)
* [interface HashFunction64](collections-hashfunction64)
* [primitive HashEq](collections-hasheq)
* [primitive HashEq64](collections-hasheq64)
* [primitive HashIs](collections-hashis)
* [primitive HashByteSeq](collections-hashbyteseq)
* [interface Flag](collections-flag)
* [class Flags](collections-flags)



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/collections--index>

Base64 package
==============

 The Base64 package contains support for doing Base64 binary-to-text encodings. We currently have support 3 encodings: PEM, MIME and URL.

 To learn more about Base64, we suggest you check out the [wikipedia entry](https://en.wikipedia.org/wiki/Base64).

 Example code
------------

 
```
use "encode/base64"

actor Main
  new create(env: Env) =>
    env.out.print(Base64.encode("foobar"))
    try
      env.out.print(Base64.decode[String iso]("Zm9vYmFy")?)
    end

```
 Public Types
------------

 * [primitive Base64](encode-base64-base64)



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/encode-base64--index>

Builtin package
===============

 The builtin package is home to the following standard library members:

 1. Types the compiler needs to know exist, such as None.
2. Types with "magic" internal workings that must be supplied directly by the compiler, such as U32.
3. Any types needed by others in builtin.

 The public types that are defined in this package will always be in scope for every Pony source file. For details on specific packages, see their individual entity entries.

 Public Types
------------

 * [primitive U8](builtin-u8)
* [primitive U16](builtin-u16)
* [primitive U32](builtin-u32)
* [primitive U64](builtin-u64)
* [primitive ULong](builtin-ulong)
* [primitive USize](builtin-usize)
* [primitive U128](builtin-u128)
* [type Unsigned](builtin-unsigned)
* [interface Stringable](builtin-stringable)
* [class String](builtin-string)
* [class StringBytes](builtin-stringbytes)
* [class StringRunes](builtin-stringrunes)
* [interface InputNotify](builtin-inputnotify)
* [interface InputStream](builtin-inputstream)
* [actor Stdin](builtin-stdin)
* [type ByteSeq](builtin-byteseq)
* [interface ByteSeqIter](builtin-byteseqiter)
* [interface OutStream](builtin-outstream)
* [actor StdStream](builtin-stdstream)
* [interface SourceLoc](builtin-sourceloc)
* [primitive I8](builtin-i8)
* [primitive I16](builtin-i16)
* [primitive I32](builtin-i32)
* [primitive I64](builtin-i64)
* [primitive ILong](builtin-ilong)
* [primitive ISize](builtin-isize)
* [primitive I128](builtin-i128)
* [type Signed](builtin-signed)
* [interface Seq](builtin-seq)
* [struct RuntimeOptions](builtin-runtimeoptions)
* [trait Real](builtin-real)
* [trait Integer](builtin-integer)
* [trait SignedInteger](builtin-signedinteger)
* [trait UnsignedInteger](builtin-unsignedinteger)
* [trait FloatingPoint](builtin-floatingpoint)
* [type Number](builtin-number)
* [type Int](builtin-int)
* [interface ReadSeq](builtin-readseq)
* [interface ReadElement](builtin-readelement)
* [struct Pointer](builtin-pointer)
* [primitive Platform](builtin-platform)
* [struct NullablePointer](builtin-nullablepointer)
* [primitive None](builtin-none)
* [interface Iterator](builtin-iterator)
* [primitive F32](builtin-f32)
* [primitive F64](builtin-f64)
* [type Float](builtin-float)
* [class Env](builtin-env)
* [primitive DoNotOptimise](builtin-donotoptimise)
* [interface DisposableActor](builtin-disposableactor)
* [primitive Less](builtin-less)
* [primitive Equal](builtin-equal)
* [primitive Greater](builtin-greater)
* [type Compare](builtin-compare)
* [interface HasEq](builtin-haseq)
* [interface Equatable](builtin-equatable)
* [interface Comparable](builtin-comparable)
* [primitive Bool](builtin-bool)
* [type AsioEventID](builtin-asioeventid)
* [interface AsioEventNotify](builtin-asioeventnotify)
* [primitive AsioEvent](builtin-asioevent)
* [class Array](builtin-array)
* [class ArrayKeys](builtin-arraykeys)
* [class ArrayValues](builtin-arrayvalues)
* [class ArrayPairs](builtin-arraypairs)
* [interface Any](builtin-any)
* [primitive AmbientAuth](builtin-ambientauth)



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/builtin--index>

Persistent Collections Package
==============================

 List - A persistent list with functional transformations.

 Map - A persistent map based on the Compressed Hash Array Mapped Prefix-tree from 'Optimizing Hash-Array Mapped Tries for Fast and Lean Immutable JVM Collections' by Michael J. Steindorfer and Jurgen J. Vinju.

 Set - A persistent set implemented as a persistent map of an alias of a type to itself.

 Vec - A persistent vector based on the Hash Array Mapped Trie from 'Ideal Hash Trees' by Phil Bagwell.

 Public Types
------------

 * [class Vec](collections-persistent-vec)
* [class VecKeys](collections-persistent-veckeys)
* [class VecValues](collections-persistent-vecvalues)
* [class VecPairs](collections-persistent-vecpairs)
* [type Set](collections-persistent-set)
* [type SetIs](collections-persistent-setis)
* [class HashSet](collections-persistent-hashset)
* [type Map](collections-persistent-map)
* [type MapIs](collections-persistent-mapis)
* [class HashMap](collections-persistent-hashmap)
* [class MapKeys](collections-persistent-mapkeys)
* [class MapValues](collections-persistent-mapvalues)
* [class MapPairs](collections-persistent-mappairs)
* [type List](collections-persistent-list)
* [primitive Lists](collections-persistent-lists)
* [primitive Nil](collections-persistent-nil)
* [class Cons](collections-persistent-cons)
* [primitive CollisionHash](collections-persistent-collisionhash)



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/collections-persistent--index>

Math package
============

 Given the name `Math` for this package, you'd expect it have a broad and grand scope. Surprise! Not currently. However, we do have the most useful of all programming language math constructs: fibonacci!

 People like to make fun of fibonacci but let's face it, no fibonacci, no benchmarks. We hear from some of our engineer friends that math is very important to programming, we call upon that particular class of engineer friends to help us fill out this package with more maths than you can shake a stick at. Btw, in case you are wondering, yes we can shake a stick at a lot of maths.

 Public Types
------------

 * [class Fibonacci](math-fibonacci)



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/math--index>

Backpressure Package
====================

 The Backpressure package allows Pony programmers to participate in Pony's runtime backpressure system. The goal of the backpressure system is to prevent an actor's mailbox from growing at an unbounded rate.

 At a high level, the runtime backpressure system works by adjusting the scheduling of actors. When an actor becomes overloaded, the Pony runtime will deprioritize scheduling the actors that are sending to it. This change in scheduling allows the overloaded actor to catch up.

 The Pony runtime can detect overloading based on message queue size. However, the overloading of some types of actors is harder to detect. Let's take the case of actors like `TCPConnection`.

 `TCPConnection` manages a socket for sending data to and receiving data from another process. TCP connections can experience backpressure from outside our Pony program that prevents them from sending. There's no way for the Pony runtime to detect this, so intervention by the programmer is needed.

 `TCPConnection` is a single example. This Backpressure package exists to allow a programmer to indicate to the runtime that a given actor is experiencing pressure and sending messages to it should be adjusted accordingly.

 Any actor that needs to be able to tell the runtime to "send me messages slower" due to external conditions can do so via this package. Additionally, actors that maintain their own internal queues of any sort, say for buffering, are also prime candidates for using this package. If an actor's internal queue grows too large, it can call `Backpressure.apply` to let the runtime know it is under pressure.

 Example program
---------------

 
```
// Here we have a TCPConnectionNotify that upon construction
// is given a BackpressureAuth token. This allows the notifier
// to inform the Pony runtime when to apply and release backpressure
// as the connection experiences it.
// Note the calls to
//
// Backpressure.apply(_auth)
// Backpressure.release(_auth)
//
// that apply and release backpressure as needed

use "backpressure"
use "collections"
use "net"

class SlowDown is TCPConnectionNotify
  let _auth: BackpressureAuth
  let _out: StdStream

  new iso create(auth: BackpressureAuth, out: StdStream) =>
    _auth = auth
    _out = out

  fun ref throttled(connection: TCPConnection ref) =>
    _out.print("Experiencing backpressure!")
    Backpressure.apply(_auth)

  fun ref unthrottled(connection: TCPConnection ref) =>
    _out.print("Releasing backpressure!")
    Backpressure.release(_auth)

  fun ref connect_failed(conn: TCPConnection ref) =>
    None

actor Main
  new create(env: Env) =>
    try
      let auth = env.root as AmbientAuth
      let socket = TCPConnection(auth, recover SlowDown(auth, env.out) end,
        "", "7669")
    end

```
 Caveat
------

 The runtime backpressure is a powerful system. By intervening, programmers can create deadlocks. Any call to `Backpressure.apply` should be matched by a corresponding call to `Backpressure.release`. Authorization via the `ApplyReleaseBackpressureAuth` capability is required to apply or release backpressure. By requiring that the caller have a token to apply or release a backpressure, rouge 3rd party library code can't run wild and unknowingly interfere with the runtime.

 Public Types
------------

 * [type BackpressureAuth](backpressure-backpressureauth)
* [primitive Backpressure](backpressure-backpressure)
* [primitive ApplyReleaseBackpressureAuth](backpressure-applyreleasebackpressureauth)



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/backpressure--index>

CLI Package
===========

 The CLI package provides enhanced Posix+GNU command line parsing with the feature of commands that can be specified in a hierarchy.

 See [RFC-0038](https://github.com/ponylang/rfcs/blob/master/text/0038-cli-format.md) for more background.

 The general EBNF of a command line is:

 
```
  command_line ::= root_command (option | command)* (option | arg)*
  command ::= alphanum_word
  alphanum_word ::= alphachar(alphachar | numchar | '_' | '-')*
  option ::= longoption | shortoptionset
  longoption ::= '--'alphanum_word['='arg | ' 'arg]
  shortoptionset := '-'alphachar[alphachar]...['='arg | ' 'arg]
  arg := boolarg | intarg | floatarg | stringarg
  boolarg := 'true' | 'false'
  intarg> := ['-'] numchar...
  floatarg ::= ['-'] numchar... ['.' numchar...]
  stringarg ::= anychar

```
 Some examples:

 
```
  usage: ls [<options>] [<args> ...]
  usage: make [<options>] <command> [<options>] [<args> ...]
  usage: chat [<options>] <command>  <subcommand> [<options>] [<args> ...]

```
 Usage
-----

 The types in the cli package are broken down into three groups:

 ### Specs

 Pony programs use constructors to create the spec objects to specify their command line syntax. Many aspects of the spec are checked for correctness at compile time, and the result represents everything the parser needs to know when parsing a command line or forming syntax help messages.

 #### Option and Arg value types

 Options and Args parse values from the command line as one of four Pony types: `Bool`, `String`, `I64` and `F64`. Values of each of these types can then be retrieved using the corresponding accessor funtions.

 In addition, there is a string\_seq type that accepts string values from the command line and collects them into a sequence which can then be retrieved as a `ReadSeq[String]` using the `string_seq()` accessor function.

 Some specific details:

 * bool Options: have a default value of 'true' if no value is given. That is, `-f` is equivalent to `-f=true`.
* string\_seq Options: the option prefix has to be used each time, like: `--file=f1 --file=f2 --file=f3` with the results being collected into a single sequence.
* string\_seq Args: there is no way to indicate termination, so a string\_seq Arg should be the last arg for a command, and will consume all remaining command line arguments.

 ### Parser

 Programs then use the CommandSpec they've built to instantiate a parser to parse any given command line. This is often env.args(), but could also be commands from files or other input sources. The result of a parse is either a parsed command, a command help, or a syntax error object.

 ### Commands

 Programs then match the object returned by the parser to determine what kind it is. Errors and help requests typically print messages and exit. For commands, the fullname can be matched and the effective values for the command's options and arguments can be retrieved.

 Example program
===============

 This program echos its command line arguments with the option of uppercasing them.

 
```
use "cli"

actor Main
  new create(env: Env) =>
    let cs =
      try
        CommandSpec.leaf("echo", "A sample echo program", [
          OptionSpec.bool("upper", "Uppercase words"
            where short' = 'U', default' = false)
        ], [
          ArgSpec.string_seq("words", "The words to echo")
        ])? .> add_help()?
      else
        env.exitcode(-1)  // some kind of coding error
        return
      end

    let cmd =
      match CommandParser(cs).parse(env.args, env.vars)
      | let c: Command => c
      | let ch: CommandHelp =>
          ch.print_help(env.out)
          env.exitcode(0)
          return
      | let se: SyntaxError =>
          env.out.print(se.string())
          env.exitcode(1)
          return
      end

    let upper = cmd.option("upper").bool()
    let words = cmd.arg("words").string_seq()
    for word in words.values() do
      env.out.write(if upper then word.upper() else word end + " ")
    end
    env.out.print("")

```
 Public Types
------------

 * [primitive EnvVars](cli-envvars)
* [class CommandSpec](cli-commandspec)
* [class OptionSpec](cli-optionspec)
* [class ArgSpec](cli-argspec)
* [class CommandParser](cli-commandparser)
* [primitive Help](cli-help)
* [class CommandHelp](cli-commandhelp)
* [class Command](cli-command)
* [class Option](cli-option)
* [class Arg](cli-arg)
* [class SyntaxError](cli-syntaxerror)



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/cli--index>

Net package
===========

 The Net package provides support for creating UDP and TCP clients and servers, reading and writing network data, and establishing UDP and TCP connections.

 Public Types
------------

 * [type UDPSocketAuth](net-udpsocketauth)
* [actor UDPSocket](net-udpsocket)
* [interface UDPNotify](net-udpnotify)
* [type TCPListenerAuth](net-tcplistenerauth)
* [actor TCPListener](net-tcplistener)
* [interface TCPListenNotify](net-tcplistennotify)
* [interface TCPConnectionNotify](net-tcpconnectionnotify)
* [type TCPConnectionAuth](net-tcpconnectionauth)
* [actor TCPConnection](net-tcpconnection)
* [interface Proxy](net-proxy)
* [class NoProxy](net-noproxy)
* [primitive OSSockOpt](net-ossockopt)
* [class NetAddress](net-netaddress)
* [type DNSLookupAuth](net-dnslookupauth)
* [primitive DNS](net-dns)
* [primitive NetAuth](net-netauth)
* [primitive DNSAuth](net-dnsauth)
* [primitive UDPAuth](net-udpauth)
* [primitive TCPAuth](net-tcpauth)
* [primitive TCPListenAuth](net-tcplistenauth)
* [primitive TCPConnectAuth](net-tcpconnectauth)



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/net--index>

Logger package
==============

 Provides basic logging facilities. For most use cases, the `StringLogger` class will be used. On construction, it takes 2 parameters and a 3rd optional parameter:

 * LogLevel below which no output will be logged
* OutStream to log to
* Optional LogFormatter

 If you need to log arbitrary objects, take a look at `ObjectLogger[A]` which can log arbitrary objects so long as you provide it a lambda to covert from A to String.

 API Philosophy
--------------

 The API for using Logger is an attempt to abide by the Pony philosophy of first, be correct and secondly, aim for performance. One of the ways that logging can slow your system down is by having to evaluate expressions to be logged whether they will be logged or not (based on the level of logging). For example:

 `logger.log(Warn, name + ": " + reason)`

 will construct a new String regardless of whether we will end up logging the message or not.

 The Logger API uses boolean short circuiting to avoid this.

 `logger(Warn) and logger.log(name + ": " + reason)`

 will not evaluate the expression to be logged unless the log level Warn is at or above the overall log level for our logging. This is as close as we can get to zero cost for items that aren't going to end up being logged.

 Example programs
----------------

 ### String Logger

 The following program will output 'my warn message' and 'my error message' to STDOUT in the standard default log format.

 
```
use "logger"

actor Main
  new create(env: Env) =>
    let logger = StringLogger(
      Warn,
      env.out)

    logger(Fine) and logger.log("my fine message")
    logger(Info) and logger.log("my info message")
    logger(Warn) and logger.log("my warn message")
    logger(Error) and logger.log("my error message")

```
 ### Logger[A]

 The following program will output '42' to STDOUT in the standard default log format.

 
```
use "logger"

actor Main
  new create(env: Env) =>
    let logger = Logger[U64](Fine, env.out, {(a) => a.string() })

    logger(Error) and logger.log(U64(42))

```
 Custom formatting your logs
---------------------------

 The Logger package provides an interface for formatting logs. If you wish to override the standard formatting, you can create an object that implements:

 
```
interface val LogFormatter
  fun apply(
    msg: String,
    file_name: String,
    file_linenum: String,
    file_linepos: String): String

```
 This can either be a class or because the interface only has a single apply method, can also be a lambda.

 Public Types
------------

 * [type LogLevel](logger-loglevel)
* [primitive Fine](logger-fine)
* [primitive Info](logger-info)
* [primitive Warn](logger-warn)
* [primitive Error](logger-error)
* [class Logger](logger-logger)
* [primitive StringLogger](logger-stringlogger)
* [interface LogFormatter](logger-logformatter)
* [primitive DefaultLogFormatter](logger-defaultlogformatter)



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/logger--index>

Serialise package
=================

 This package provides support for serialising and deserialising arbitrary data structures.

 The API is designed to require capability tokens, as otherwise serialising would leak the bit patterns of all private information in a type (since the resulting Array[U8] could be examined.

 Deserialisation is fundamentally unsafe currently: there isn't yet a verification pass to check that the resulting object graph maintains a well-formed heap or that individual objects maintain any expected local invariants. However, if only "trusted" data (i.e. data produced by Pony serialisation from the same binary) is deserialised, it will always maintain a well-formed heap and all object invariants.

 Note that serialised data is not usable between different Pony binaries. This is due to the use of type identifiers rather than a heavy-weight self-describing serialisation schema. This also means it isn't safe to deserialise something serialised by the same program compiled for a different platform.

 The Serialise.signature method is provided for the purposes of comparing communicating Pony binaries to determine if they are the same. Confirming this before deserialising data can help mitigate the risk of accidental serialisation across different Pony binaries, but does not on its own address the security issues of accepting data from untrusted sources.

 Public Types
------------

 * [primitive Serialise](serialise-serialise)
* [primitive SerialiseAuth](serialise-serialiseauth)
* [primitive DeserialiseAuth](serialise-deserialiseauth)
* [primitive OutputSerialisedAuth](serialise-outputserialisedauth)
* [primitive InputSerialisedAuth](serialise-inputserialisedauth)
* [class Serialised](serialise-serialised)



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/serialise--index>

Process package
===============

 The Process package provides support for handling Unix style processes. For each external process that you want to handle, you need to create a `ProcessMonitor` and a corresponding `ProcessNotify` object. Each ProcessMonitor runs as it own actor and upon receiving data will call its corresponding `ProcessNotify`'s method.

 Example program
---------------

 The following program will spawn an external program and write to it's STDIN. Output received on STDOUT of the child process is forwarded to the ProcessNotify client and printed.

 
```
use "process"
use "files"

actor Main
  new create(env: Env) =>
    // create a notifier
    let client = ProcessClient(env)
    let notifier: ProcessNotify iso = consume client
    // define the binary to run
    try
      let path = FilePath(env.root as AmbientAuth, "/bin/cat")?
      // define the arguments; first arg is always the binary name
      let args: Array[String] val = ["cat"]
      // define the environment variable for the execution
      let vars: Array[String] val = ["HOME=/"; "PATH=/bin"]
      // create a ProcessMonitor and spawn the child process
      let auth = env.root as AmbientAuth
      let pm: ProcessMonitor = ProcessMonitor(auth, auth, consume notifier,
      path, args, vars)
      // write to STDIN of the child process
      pm.write("one, two, three")
      pm.done_writing() // closing stdin allows cat to terminate
    else
      env.out.print("Could not create FilePath!")
    end

// define a client that implements the ProcessNotify interface
class ProcessClient is ProcessNotify
  let _env: Env

  new iso create(env: Env) =>
    _env = env

  fun ref stdout(process: ProcessMonitor ref, data: Array[U8] iso) =>
    let out = String.from_array(consume data)
    _env.out.print("STDOUT: " + out)

  fun ref stderr(process: ProcessMonitor ref, data: Array[U8] iso) =>
    let err = String.from_array(consume data)
    _env.out.print("STDERR: " + err)

  fun ref failed(process: ProcessMonitor ref, err: ProcessError) =>
    _env.out.print(err.string())

  fun ref dispose(process: ProcessMonitor ref, child_exit_status: ProcessExitStatus) =>
    let code: I32 = consume child_exit_code
    match child_exit_status
    | let exited: Exited =>
      _env.out.print("Child exit code: " + exited.exit_code().string())
    | let signaled: Signaled =>
      _env.out.print("Child terminated by signal: " + signaled.signal().string())
    end

```
 Process portability
-------------------

 The ProcessMonitor supports spawning processes on Linux, FreeBSD, OSX and Windows.

 Shutting down ProcessMonitor and external process
-------------------------------------------------

 When a process is spawned using ProcessMonitor, and it is not necessary to communicate to it any further using `stdin` and `stdout` or `stderr`, calling [done\_writing()](process-processmonitor#done_writing) will close stdin to the child process. Processes expecting input will be notified of an `EOF` on their `stdin` and can terminate.

 If a running program needs to be canceled and the [ProcessMonitor](process-processmonitor) should be shut down, calling [dispose](process-processmonitor#dispose) will terminate the child process and clean up all resources.

 Once the child process is detected to be closed, the process exit status is retrieved and [ProcessNotify.dispose](process-processnotify#dispose) is called.

 The process exit status can be either an instance of [Exited](process-exited) containing the process exit code in case the program exited on its own, or (only on posix systems like linux, osx or bsd) an instance of [Signaled](process-signaled) containing the signal number that terminated the process.

 Public Types
------------

 * [interface ProcessNotify](process-processnotify)
* [type ProcessMonitorAuth](process-processmonitorauth)
* [actor ProcessMonitor](process-processmonitor)
* [class ProcessError](process-processerror)
* [type ProcessErrorType](process-processerrortype)
* [primitive ExecveError](process-execveerror)
* [primitive PipeError](process-pipeerror)
* [primitive ForkError](process-forkerror)
* [primitive WaitpidError](process-waitpiderror)
* [primitive WriteError](process-writeerror)
* [primitive KillError](process-killerror)
* [primitive CapError](process-caperror)
* [primitive ChdirError](process-chdirerror)
* [primitive UnknownError](process-unknownerror)
* [primitive StartProcessAuth](process-startprocessauth)
* [class Exited](process-exited)
* [class Signaled](process-signaled)
* [type ProcessExitStatus](process-processexitstatus)



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/process--index>

Promises Package
================

 A `Promise` represents a value that will be available at a later time. `Promise`s can either be fulfilled with a value or rejected. Any number of function handlers can be added to the `Promise`, to be called when the `Promise` is fulfilled or rejected. These handlers themselves are also wrapped in `Promise`s so that they can be chained together in order for the fulfilled value of one `Promise` to be used to compute a value which will be used to fulfill the next `Promise` in the chain, or so that if the `Promise` is rejected then the subsequent reject functions will also be called. The input and output types of a fulfill handler do not have to be the same, so a chain of fulfill handlers can transform the original value into something new.

 Fulfill and reject handlers can either be specified as classes that implment the `Fulfill` and `Reject` interfaces, or as functions with the same signatures as the `apply` methods in `Fulfill` and `Reject`.

 In the following code, the fulfillment of the `Promise` causes the execution of several fulfillment functions. The output is:

 
```
fulfilled + foo
fulfilled + bar
fulfilled + baz

```
 
```
use "promises"

class PrintFulfill is Fulfill[String, String]
  let _env: Env
  let _msg: String
  new create(env: Env, msg: String) =>
    _env = env
    _msg = msg
  fun apply(s: String): String =>
    _env.out.print(" + ".join([s; _msg].values()))
    s

actor Main
  new create(env: Env) =>
     let promise = Promise[String]
     promise.next[String](recover PrintFulfill(env, "foo") end)
     promise.next[String](recover PrintFulfill(env, "bar") end)
     promise.next[String](recover PrintFulfill(env, "baz") end)
     promise("fulfilled")

```
 In the following code, the fulfill functions are chained together so that the fulfilled value of the first one is used to generate a value which fulfills the second one, which in turn is used to compute a value which fulfills the third one, which in turn is used to compute a value which fulfills the fourth one. The output is the average length of the words passed on the command line or `0` if there are no command line arguments.

 
```
use "promises"

primitive Computation
  fun tag string_to_strings(s: String): Array[String] val =>
    recover s.split() end
  fun tag strings_to_sizes(sa: Array[String] val): Array[USize] val =>
    recover
      let len = Array[USize]
      for s in sa.values() do
        len.push(s.size())
      end
      len
    end
  fun tag sizes_to_avg(sza: Array[USize] val): USize =>
    var acc = USize(0)
    for sz in sza.values() do
      acc = acc + sz
    end
    acc / sza.size()
  fun tag output(env: Env, sz: USize): None =>
    env.out.print(sz.string())

actor Main
  new create(env: Env) =>
     let promise = Promise[String]
     promise.next[Array[String] val](recover Computation~string_to_strings() end)
            .next[Array[USize] val](recover Computation~strings_to_sizes() end)
            .next[USize](recover Computation~sizes_to_avg() end)
            .next[None](recover Computation~output(env) end)
     promise(" ".join(env.args.slice(1).values()))

```
 Public Types
------------

 * [actor Promise](promises-promise)
* [primitive Promises](promises-promises)
* [interface Fulfill](promises-fulfill)
* [interface Reject](promises-reject)
* [class FulfillIdentity](promises-fulfillidentity)
* [class RejectAlways](promises-rejectalways)



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/promises--index>

PrefixSpec
==========

 [[Source]](https://stdlib.ponylang.io/src/format/prefix_spec/#L1)

 
```
trait val PrefixSpec

```


 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/format-PrefixSpec>

Time Package
============

 The Time Package provides classes and methods for timing operations, dealing with dates and times, and scheduling tasks.

 Public Types
------------

 * [actor Timers](time-timers)
* [interface TimerNotify](time-timernotify)
* [class Timer](time-timer)
* [primitive Time](time-time)
* [class PosixDate](time-posixdate)
* [primitive Nanos](time-nanos)



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/time--index>

FormatUTF32
===========

 [[Source]](https://stdlib.ponylang.io/src/format/format_spec/#L5)

 
```
primitive val FormatUTF32 is
  FormatSpec val

```
 #### Implements

 * [FormatSpec](format-formatspec) val

 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/format/format_spec/#L5)

 
```
new val create()
: FormatUTF32 val^

```
 #### Returns

 * [FormatUTF32](index) val^

 Public Functions
----------------

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/format/format_spec/#L6)

 
```
fun box eq(
  that: FormatUTF32 val)
: Bool val

```
 #### Parameters

 * that: [FormatUTF32](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/format/format_spec/#L6)

 
```
fun box ne(
  that: FormatUTF32 val)
: Bool val

```
 #### Parameters

 * that: [FormatUTF32](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/format-FormatUTF32>

PrefixNumber
============

 [[Source]](https://stdlib.ponylang.io/src/format/prefix_spec/#L8)

 
```
type PrefixNumber is
  (PrefixDefault val | PrefixSpace val | PrefixSign val)

```
 #### Type Alias For

 * ([PrefixDefault](format-prefixdefault) val | [PrefixSpace](format-prefixspace) val | [PrefixSign](format-prefixsign) val)



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/format-PrefixNumber>

PrefixSign
==========

 [[Source]](https://stdlib.ponylang.io/src/format/prefix_spec/#L6)

 
```
primitive val PrefixSign is
  PrefixSpec val

```
 #### Implements

 * [PrefixSpec](format-prefixspec) val

 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/format/prefix_spec/#L6)

 
```
new val create()
: PrefixSign val^

```
 #### Returns

 * [PrefixSign](index) val^

 Public Functions
----------------

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/format/prefix_spec/#L8)

 
```
fun box eq(
  that: PrefixSign val)
: Bool val

```
 #### Parameters

 * that: [PrefixSign](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/format/prefix_spec/#L8)

 
```
fun box ne(
  that: PrefixSign val)
: Bool val

```
 #### Parameters

 * that: [PrefixSign](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/format-PrefixSign>

PonyTest package
================

 The PonyTest package provides a unit testing framework. It is designed to be as simple as possible to use, both for the unit test writer and the user running the tests.

 To help simplify test writing and distribution this package depends on as few other packages as possible. Currently the required packages are:

 * builtin
* time
* collections

 Each unit test is a class, with a single test function. By default all tests run concurrently.

 Each test run is provided with a helper object. This provides logging and assertion functions. By default log messages are only shown for tests that fail.

 When any assertion function fails the test is counted as a fail. However, tests can also indicate failure by raising an error in the test function.

 Example program
---------------

 To use PonyTest simply write a class for each test and a TestList type that tells the PonyTest object about the tests. Typically the TestList will be Main for the package.

 The following is a complete program with 2 trivial tests.

 
```
use "ponytest"

actor Main is TestList
  new create(env: Env) =>
    PonyTest(env, this)

  new make() =>
    None

  fun tag tests(test: PonyTest) =>
    test(_TestAdd)
    test(_TestSub)

class iso _TestAdd is UnitTest
  fun name():String => "addition"

  fun apply(h: TestHelper) =>
    h.assert_eq[U32](4, 2 + 2)

class iso _TestSub is UnitTest
  fun name():String => "subtraction"

  fun apply(h: TestHelper) =>
    h.assert_eq[U32](2, 4 - 2)

```
 The make() constructor is not needed for this example. However, it allows for easy aggregation of tests (see below) so it is recommended that all test Mains provide it.

 Main.create() is called only for program invocations on the current package. Main.make() is called during aggregation. If so desired extra code can be added to either of these constructors to perform additional tasks.

 Test names
----------

 Tests are identified by names, which are used when printing test results and on the command line to select which tests to run. These names are independent of the names of the test classes in the Pony source code.

 Arbitrary strings can be used for these names, but for large projects it is strongly recommended to use a hierarchical naming scheme to make it easier to select groups of tests.

 You can skip any tests whose names start with a given string by using the `--exclude=[prefix]` command line option.

 You can run only tests whose names start with a given string by using the `--only=[prefix]` command line option.

 Aggregation
-----------

 Often it is desirable to run a collection of unit tests from multiple different source files. For example, if several packages within a bundle each have their own unit tests it may be useful to run all tests for the bundle together.

 This can be achieved by writing an aggregate test list class, which calls the list function for each package. The following is an example that aggregates the tests from packages `foo` and `bar`.

 
```
use "ponytest"
use foo = "foo"
use bar = "bar"

actor Main is TestList
  new create(env: Env) =>
    PonyTest(env, this)

  new make() =>
    None

  fun tag tests(test: PonyTest) =>
    foo.Main.make().tests(test)
    bar.Main.make().tests(test)

```
 Aggregate test classes may themselves be aggregated. Every test list class may contain any combination of its own tests and aggregated lists.

 Long tests
----------

 Simple tests run within a single function. When that function exits, either returning or raising an error, the test is complete. This is not viable for tests that need to use actors.

 Long tests allow for delayed completion. Any test can call long\_test() on its TestHelper to indicate that it needs to keep running. When the test is finally complete it calls complete() on its TestHelper.

 The complete() function takes a Bool parameter to specify whether the test was a success. If any asserts fail then the test will be considered a failure regardless of the value of this parameter. However, complete() must still be called.

 Since failing tests may hang, a timeout must be specified for each long test. When the test function exits a timer is started with the specified timeout. If this timer fires before complete() is called the test is marked as a failure and the timeout is reported.

 On a timeout the timed\_out() function is called on the unit test object. This should perform whatever test specific tidy up is required to allow the program to exit. There is no need to call complete() if a timeout occurs, although it is not an error to do so.

 Note that the timeout is only relevant when a test hangs and would otherwise prevent the test program from completing. Setting a very long timeout on tests that should not be able to hang is perfectly acceptable and will not make the test take any longer if successful.

 Timeouts should not be used as the standard method of detecting if a test has failed.

 Exclusion groups
----------------

 By default all tests are run concurrently. This may be a problem for some tests, eg if they manipulate an external file or use a system resource. To fix this issue any number of tests may be put into an exclusion group.

 No tests that are in the same exclusion group will be run concurrently.

 Exclusion groups are identified by name, arbitrary strings may be used. Multiple exclusion groups may be used and tests in different groups may run concurrently. Tests that do not specify an exclusion group may be run concurrently with any other tests.

 The command line option "--sequential" prevents any tests from running concurrently, regardless of exclusion groups. This is intended for debugging rather than standard use.

 Labels
------

 Test can have label. Labels are used to filter which tests are run, by setting command line argument `--label=[some custom label]`. It can be used to separate unit tests from integration tests.

 By default label is empty. You can set it up by overriding `label(): String` method in unit test.

 
```
use "ponytest"

class iso _I8AddTest is UnitTest
  fun name(): String => "_I8AddTest"
  fun label(): String => "simple"
  fun apply(h: TestHelper) =>
    h.assert_eq[I8](1, 1)


```
 Setting up and tearing down a test environment
----------------------------------------------

 ### Set Up

 Any kind of fixture or environment necessary for executing a [UnitTest](ponytest-unittest) can be set up either in the tests constructor or in a function called [set\_up()](ponytest-unittest#set_up).

 [set\_up()](ponytest-unittest#set_up) is called before the test is executed. It is partial, if it errors, the test is not executed but reported as failing during set up. The test's [TestHelper](ponytest-testhelper) is handed to [set\_up()](ponytest-unittest#set_up) in order to log messages or access the tests [Env](builtin-env) via [TestHelper.env](ponytest-testhelper#let-env-env-val).

 ### Tear Down

 Each unit test object may define a [tear\_down()](ponytest-unittest#tear_down) function. This is called after the test has finished to allow tearing down of any complex environment that had to be set up for the test.

 The [tear\_down()](ponytest-unittest#tear_down) function is called for each test regardless of whether it passed or failed. If a test times out [tear\_down()](ponytest-unittest#tear_down) will be called after timed\_out() returns.

 When a test is in an exclusion group, the [tear\_down()](ponytest-unittest#tear_down) call is considered part of the tests run. The next test in the exclusion group will not start until after [tear\_down()](ponytest-unittest#tear_down) returns on the current test.

 The test's [TestHelper](ponytest-testhelper) is handed to [tear\_down()](ponytest-unittest#tear_down) and it is permitted to log messages and call assert functions during tear down.

 ### Example

 The following example creates a temporary directory in the [set\_up()](ponytest-unittest#set_up) function and removes it in the [tear\_down()](ponytest-unittest#tear_down) function, thus simplifying the test function itself:

 
```
use "ponytest"
use "files"

class iso TempDirTest
  var tmp_dir: (FilePath | None) = None

  fun name(): String => "temp-dir"

  fun ref set_up(h: TestHelper)? =>
    tmp_dir = FilePath.mkdtemp(h.env.root as AmbientAuth, "temp-dir")?

  fun ref tear_down(h: TestHelper) =>
    try
      (tmp_dir as FilePath).remove()
    end

  fun apply(h: TestHelper)? =>
    let dir = tmp_dir as FilePath
    // do something inside the temporary directory

```
 Public Types
------------

 * [trait UnitTest](ponytest-unittest)
* [trait TestList](ponytest-testlist)
* [interface ITest](ponytest-itest)
* [class TestHelper](ponytest-testhelper)
* [actor PonyTest](ponytest-ponytest)



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/ponytest--index>

Package
=======

 No package doc string provided for strings.

 Public Types
------------

 * [primitive CommonPrefix](strings-commonprefix)



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/strings--index>

Package
=======

 PonyBench provides a microbenchmarking framework. It is designed to measure the runtime of synchronous and asynchronous operations.

 Example Program
---------------

 The following is a complete program with multiple trivial benchmarks followed by their output.

 
```
use "time"

actor Main is BenchmarkList
  new create(env: Env) =>
    PonyBench(env, this)

  fun tag benchmarks(bench: PonyBench) =>
    bench(_Nothing)
    bench(_Fib(5))
    bench(_Fib(10))
    bench(_Fib(20))
    bench(_Timer(10_000))

class iso _Nothing is MicroBenchmark
  // Benchmark absolutely nothing.
  fun name(): String => "Nothing"

  fun apply() =>
    // prevent compiler from optimizing out this operation
    DoNotOptimise[None](None)
    DoNotOptimise.observe()

class iso _Fib is MicroBenchmark
  // Benchmark non-tail-recursive fibonacci
  let _n: U64

  new iso create(n: U64) =>
    _n = n

  fun name(): String =>
    "_Fib(" + _n.string() + ")"

  fun apply() =>
    DoNotOptimise[U64](_fib(_n))
    DoNotOptimise.observe()

  fun _fib(n: U64): U64 =>
    if n < 2 then 1
    else _fib(n - 1) + _fib(n - 2)
    end

class iso _Timer is AsyncMicroBenchmark
  // Asynchronous benchmark of timer.
  let _ts: Timers = Timers
  let _ns: U64

  new iso create(ns: U64) =>
    _ns = ns

  fun name(): String =>
    "_Timer (" + _ns.string() + " ns)"

  fun apply(c: AsyncBenchContinue) =>
    _ts(Timer(
      object iso is TimerNotify
        fun apply(timer: Timer, count: U64 = 0): Bool =>
          // signal completion of async benchmark iteration when timer fires
          c.complete()
          false
      end,
      _ns))


```
 By default, the results are printed to stdout like so:

 
```
Benchmark results will have their mean and median adjusted for overhead.
You may disable this with --noadjust.

Benchmark                                   mean            median   deviation  iterations
Nothing                                     1 ns              1 ns      ±0.87%     3000000
_Fib(5)                                    12 ns             12 ns      ±1.02%     2000000
_Fib(10)                                  185 ns            184 ns      ±1.03%     1000000
_Fib(20)                                23943 ns          23898 ns      ±1.11%       10000
_Timer (10000ns)                        10360 ns          10238 ns      ±3.25%       10000

```
 The `--noadjust` option outputs results of the overhead measured prior to each benchmark run followed by the unadjusted benchmark result. An example of the output of this program with `--noadjust` is as follows:

 
```
Benchmark                                   mean            median   deviation  iterations
Benchmark Overhead                        604 ns            603 ns      ±0.58%      300000
Nothing                                   553 ns            553 ns      ±0.30%      300000
Benchmark Overhead                        555 ns            555 ns      ±0.51%      300000
_Fib(5)                                   574 ns            574 ns      ±0.43%      300000
Benchmark Overhead                        554 ns            556 ns      ±0.48%      300000
_Fib(10)                                  822 ns            821 ns      ±0.39%      200000
Benchmark Overhead                        554 ns            553 ns      ±0.65%      300000
_Fib(20)                                30470 ns          30304 ns      ±1.55%        5000
Benchmark Overhead                        552 ns            552 ns      ±0.39%      300000
_Timer (10000 ns)                       10780 ns          10800 ns      ±3.60%       10000

```
 It is recommended that a PonyBench program is compiled with the `--runtimebc` option, if possible, and run with the `--ponynoyield` option.

 Public Types
------------

 * [actor PonyBench](ponybench-ponybench)
* [type Benchmark](ponybench-benchmark)
* [trait MicroBenchmark](ponybench-microbenchmark)
* [trait AsyncMicroBenchmark](ponybench-asyncmicrobenchmark)
* [interface BenchmarkList](ponybench-benchmarklist)
* [class BenchConfig](ponybench-benchconfig)
* [class OverheadBenchmark](ponybench-overheadbenchmark)
* [class AsyncOverheadBenchmark](ponybench-asyncoverheadbenchmark)
* [class AsyncBenchContinue](ponybench-asyncbenchcontinue)



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/ponybench--index>

Signals package
===============

 The Signals package provides support for handling Unix style signals. For each signal that you want to handle, you need to create a `SignalHandler` and a corresponding `SignalNotify` object. Each SignalHandler runs as it own actor and upon receiving the signal will call its corresponding `SignalNotify`'s apply method.

 Example program
---------------

 The following program will listen for the TERM signal and output a message to standard out if it is received.

 
```
use "signals"

actor Main
  new create(env: Env) =>
    // Create a TERM handler
    let signal = SignalHandler(TermHandler(env), Sig.term())
    // Raise TERM signal
    signal.raise()

class TermHandler is SignalNotify
  let _env: Env

  new iso create(env: Env) =>
    _env = env

  fun ref apply(count: U32): Bool =>
    _env.out.print("TERM signal received")
    true

```
 Signal portability
------------------

 The `Sig` primitive provides support for portable signal handling across Linux, FreeBSD and OSX. Signals are not supported on Windows and attempting to use them will cause a compilation error.

 Shutting down handlers
----------------------

 Unlike a `TCPConnection` and other forms of input receiving, creating a `SignalHandler` will not keep your program running. As such, you are not required to call `dispose` on your signal handlers in order to shutdown your program.

 Public Types
------------

 * [interface SignalNotify](signals-signalnotify)
* [primitive SignalRaise](signals-signalraise)
* [actor SignalHandler](signals-signalhandler)
* [primitive Sig](signals-sig)



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/signals--index>

Random package
==============

 The Random package provides support generating random numbers. The package provides random number generators you can use in your code, a dice roller and a trait for implementing your own random number generator.

 If your application does not require a specific generator, use Rand.

 Seed values can contain up to 128 bits of randomness in the form of two U64s. A common non-cryptographically secure way to seed a generator is with `Time.now`.

 
```
let rand = Rand
let n = rand.next()

```
 Public Types
------------

 * [class XorShift128Plus](random-xorshift128plus)
* [class XorOshiro128Plus](random-xoroshiro128plus)
* [class XorOshiro128StarStar](random-xoroshiro128starstar)
* [class SplitMix64](random-splitmix64)
* [type Rand](random-rand)
* [trait Random](random-random)
* [class MT](random-mt)
* [class Dice](random-dice)



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/random--index>

PrefixSpace
===========

 [[Source]](https://stdlib.ponylang.io/src/format/prefix_spec/#L5)

 
```
primitive val PrefixSpace is
  PrefixSpec val

```
 #### Implements

 * [PrefixSpec](format-prefixspec) val

 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/format/prefix_spec/#L5)

 
```
new val create()
: PrefixSpace val^

```
 #### Returns

 * [PrefixSpace](index) val^

 Public Functions
----------------

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/format/prefix_spec/#L6)

 
```
fun box eq(
  that: PrefixSpace val)
: Bool val

```
 #### Parameters

 * that: [PrefixSpace](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/format/prefix_spec/#L6)

 
```
fun box ne(
  that: PrefixSpace val)
: Bool val

```
 #### Parameters

 * that: [PrefixSpace](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/format-PrefixSpace>

Package
=======

 No package doc string provided for term.

 Public Types
------------

 * [interface ReadlineNotify](term-readlinenotify)
* [class Readline](term-readline)
* [actor ANSITerm](term-ansiterm)
* [interface ANSINotify](term-ansinotify)
* [primitive ANSI](term-ansi)



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/term--index>

PrefixDefault
=============

 [[Source]](https://stdlib.ponylang.io/src/format/prefix_spec/#L3)

 
```
primitive val PrefixDefault is
  PrefixSpec val

```
 #### Implements

 * [PrefixSpec](format-prefixspec) val

 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/format/prefix_spec/#L3)

 
```
new val create()
: PrefixDefault val^

```
 #### Returns

 * [PrefixDefault](index) val^

 Public Functions
----------------

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/format/prefix_spec/#L5)

 
```
fun box eq(
  that: PrefixDefault val)
: Bool val

```
 #### Parameters

 * that: [PrefixDefault](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/format/prefix_spec/#L5)

 
```
fun box ne(
  that: PrefixDefault val)
: Bool val

```
 #### Parameters

 * that: [PrefixDefault](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/format-PrefixDefault>

FormatSpec
==========

 [[Source]](https://stdlib.ponylang.io/src/format/format_spec/#L1)

 
```
trait val FormatSpec

```


 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/format-FormatSpec>

FormatDefault
=============

 [[Source]](https://stdlib.ponylang.io/src/format/format_spec/#L3)

 
```
primitive val FormatDefault is
  FormatSpec val

```
 #### Implements

 * [FormatSpec](format-formatspec) val

 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/format/format_spec/#L3)

 
```
new val create()
: FormatDefault val^

```
 #### Returns

 * [FormatDefault](index) val^

 Public Functions
----------------

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/format/format_spec/#L5)

 
```
fun box eq(
  that: FormatDefault val)
: Bool val

```
 #### Parameters

 * that: [FormatDefault](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/format/format_spec/#L5)

 
```
fun box ne(
  that: FormatDefault val)
: Bool val

```
 #### Parameters

 * that: [FormatDefault](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/format-FormatDefault>

FormatBinary
============

 [[Source]](https://stdlib.ponylang.io/src/format/format_spec/#L6)

 
```
primitive val FormatBinary is
  FormatSpec val

```
 #### Implements

 * [FormatSpec](format-formatspec) val

 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/format/format_spec/#L6)

 
```
new val create()
: FormatBinary val^

```
 #### Returns

 * [FormatBinary](index) val^

 Public Functions
----------------

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/format/format_spec/#L7)

 
```
fun box eq(
  that: FormatBinary val)
: Bool val

```
 #### Parameters

 * that: [FormatBinary](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/format/format_spec/#L7)

 
```
fun box ne(
  that: FormatBinary val)
: Bool val

```
 #### Parameters

 * that: [FormatBinary](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/format-FormatBinary>

FormatBinaryBare
================

 [[Source]](https://stdlib.ponylang.io/src/format/format_spec/#L7)

 
```
primitive val FormatBinaryBare is
  FormatSpec val

```
 #### Implements

 * [FormatSpec](format-formatspec) val

 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/format/format_spec/#L7)

 
```
new val create()
: FormatBinaryBare val^

```
 #### Returns

 * [FormatBinaryBare](index) val^

 Public Functions
----------------

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/format/format_spec/#L8)

 
```
fun box eq(
  that: FormatBinaryBare val)
: Bool val

```
 #### Parameters

 * that: [FormatBinaryBare](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/format/format_spec/#L8)

 
```
fun box ne(
  that: FormatBinaryBare val)
: Bool val

```
 #### Parameters

 * that: [FormatBinaryBare](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/format-FormatBinaryBare>

FormatExp
=========

 [[Source]](https://stdlib.ponylang.io/src/format/format_spec/#L27)

 
```
primitive val FormatExp is
  FormatSpec val

```
 #### Implements

 * [FormatSpec](format-formatspec) val

 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/format/format_spec/#L27)

 
```
new val create()
: FormatExp val^

```
 #### Returns

 * [FormatExp](index) val^

 Public Functions
----------------

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/format/format_spec/#L28)

 
```
fun box eq(
  that: FormatExp val)
: Bool val

```
 #### Parameters

 * that: [FormatExp](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/format/format_spec/#L28)

 
```
fun box ne(
  that: FormatExp val)
: Bool val

```
 #### Parameters

 * that: [FormatExp](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/format-FormatExp>

FormatHexBare
=============

 [[Source]](https://stdlib.ponylang.io/src/format/format_spec/#L11)

 
```
primitive val FormatHexBare is
  FormatSpec val

```
 #### Implements

 * [FormatSpec](format-formatspec) val

 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/format/format_spec/#L11)

 
```
new val create()
: FormatHexBare val^

```
 #### Returns

 * [FormatHexBare](index) val^

 Public Functions
----------------

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/format/format_spec/#L12)

 
```
fun box eq(
  that: FormatHexBare val)
: Bool val

```
 #### Parameters

 * that: [FormatHexBare](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/format/format_spec/#L12)

 
```
fun box ne(
  that: FormatHexBare val)
: Bool val

```
 #### Parameters

 * that: [FormatHexBare](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/format-FormatHexBare>

FormatHex
=========

 [[Source]](https://stdlib.ponylang.io/src/format/format_spec/#L10)

 
```
primitive val FormatHex is
  FormatSpec val

```
 #### Implements

 * [FormatSpec](format-formatspec) val

 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/format/format_spec/#L10)

 
```
new val create()
: FormatHex val^

```
 #### Returns

 * [FormatHex](index) val^

 Public Functions
----------------

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/format/format_spec/#L11)

 
```
fun box eq(
  that: FormatHex val)
: Bool val

```
 #### Parameters

 * that: [FormatHex](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/format/format_spec/#L11)

 
```
fun box ne(
  that: FormatHex val)
: Bool val

```
 #### Parameters

 * that: [FormatHex](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/format-FormatHex>

FormatHexSmall
==============

 [[Source]](https://stdlib.ponylang.io/src/format/format_spec/#L12)

 
```
primitive val FormatHexSmall is
  FormatSpec val

```
 #### Implements

 * [FormatSpec](format-formatspec) val

 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/format/format_spec/#L12)

 
```
new val create()
: FormatHexSmall val^

```
 #### Returns

 * [FormatHexSmall](index) val^

 Public Functions
----------------

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/format/format_spec/#L13)

 
```
fun box eq(
  that: FormatHexSmall val)
: Bool val

```
 #### Parameters

 * that: [FormatHexSmall](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/format/format_spec/#L13)

 
```
fun box ne(
  that: FormatHexSmall val)
: Bool val

```
 #### Parameters

 * that: [FormatHexSmall](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/format-FormatHexSmall>

FormatOctal
===========

 [[Source]](https://stdlib.ponylang.io/src/format/format_spec/#L8)

 
```
primitive val FormatOctal is
  FormatSpec val

```
 #### Implements

 * [FormatSpec](format-formatspec) val

 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/format/format_spec/#L8)

 
```
new val create()
: FormatOctal val^

```
 #### Returns

 * [FormatOctal](index) val^

 Public Functions
----------------

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/format/format_spec/#L9)

 
```
fun box eq(
  that: FormatOctal val)
: Bool val

```
 #### Parameters

 * that: [FormatOctal](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/format/format_spec/#L9)

 
```
fun box ne(
  that: FormatOctal val)
: Bool val

```
 #### Parameters

 * that: [FormatOctal](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/format-FormatOctal>

FormatFix
=========

 [[Source]](https://stdlib.ponylang.io/src/format/format_spec/#L29)

 
```
primitive val FormatFix is
  FormatSpec val

```
 #### Implements

 * [FormatSpec](format-formatspec) val

 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/format/format_spec/#L29)

 
```
new val create()
: FormatFix val^

```
 #### Returns

 * [FormatFix](index) val^

 Public Functions
----------------

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/format/format_spec/#L30)

 
```
fun box eq(
  that: FormatFix val)
: Bool val

```
 #### Parameters

 * that: [FormatFix](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/format/format_spec/#L30)

 
```
fun box ne(
  that: FormatFix val)
: Bool val

```
 #### Parameters

 * that: [FormatFix](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/format-FormatFix>

FormatGeneral
=============

 [[Source]](https://stdlib.ponylang.io/src/format/format_spec/#L31)

 
```
primitive val FormatGeneral is
  FormatSpec val

```
 #### Implements

 * [FormatSpec](format-formatspec) val

 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/format/format_spec/#L31)

 
```
new val create()
: FormatGeneral val^

```
 #### Returns

 * [FormatGeneral](index) val^

 Public Functions
----------------

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/format/format_spec/#L32)

 
```
fun box eq(
  that: FormatGeneral val)
: Bool val

```
 #### Parameters

 * that: [FormatGeneral](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/format/format_spec/#L32)

 
```
fun box ne(
  that: FormatGeneral val)
: Bool val

```
 #### Parameters

 * that: [FormatGeneral](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/format-FormatGeneral>

FormatFixLarge
==============

 [[Source]](https://stdlib.ponylang.io/src/format/format_spec/#L30)

 
```
primitive val FormatFixLarge is
  FormatSpec val

```
 #### Implements

 * [FormatSpec](format-formatspec) val

 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/format/format_spec/#L30)

 
```
new val create()
: FormatFixLarge val^

```
 #### Returns

 * [FormatFixLarge](index) val^

 Public Functions
----------------

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/format/format_spec/#L31)

 
```
fun box eq(
  that: FormatFixLarge val)
: Bool val

```
 #### Parameters

 * that: [FormatFixLarge](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/format/format_spec/#L31)

 
```
fun box ne(
  that: FormatFixLarge val)
: Bool val

```
 #### Parameters

 * that: [FormatFixLarge](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/format-FormatFixLarge>

FormatOctalBare
===============

 [[Source]](https://stdlib.ponylang.io/src/format/format_spec/#L9)

 
```
primitive val FormatOctalBare is
  FormatSpec val

```
 #### Implements

 * [FormatSpec](format-formatspec) val

 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/format/format_spec/#L9)

 
```
new val create()
: FormatOctalBare val^

```
 #### Returns

 * [FormatOctalBare](index) val^

 Public Functions
----------------

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/format/format_spec/#L10)

 
```
fun box eq(
  that: FormatOctalBare val)
: Bool val

```
 #### Parameters

 * that: [FormatOctalBare](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/format/format_spec/#L10)

 
```
fun box ne(
  that: FormatOctalBare val)
: Bool val

```
 #### Parameters

 * that: [FormatOctalBare](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/format-FormatOctalBare>

FormatHexSmallBare
==================

 [[Source]](https://stdlib.ponylang.io/src/format/format_spec/#L13)

 
```
primitive val FormatHexSmallBare is
  FormatSpec val

```
 #### Implements

 * [FormatSpec](format-formatspec) val

 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/format/format_spec/#L13)

 
```
new val create()
: FormatHexSmallBare val^

```
 #### Returns

 * [FormatHexSmallBare](index) val^

 Public Functions
----------------

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/format/format_spec/#L15)

 
```
fun box eq(
  that: FormatHexSmallBare val)
: Bool val

```
 #### Parameters

 * that: [FormatHexSmallBare](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/format/format_spec/#L15)

 
```
fun box ne(
  that: FormatHexSmallBare val)
: Bool val

```
 #### Parameters

 * that: [FormatHexSmallBare](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/format-FormatHexSmallBare>

FormatFloat
===========

 [[Source]](https://stdlib.ponylang.io/src/format/format_spec/#L34)

 
```
type FormatFloat is
  (FormatDefault val | FormatExp val | FormatExpLarge val | FormatFix val | FormatFixLarge val | FormatGeneral val | FormatGeneralLarge val)

```
 #### Type Alias For

 * ([FormatDefault](format-formatdefault) val | [FormatExp](format-formatexp) val | [FormatExpLarge](format-formatexplarge) val | [FormatFix](format-formatfix) val | [FormatFixLarge](format-formatfixlarge) val | [FormatGeneral](format-formatgeneral) val | [FormatGeneralLarge](format-formatgenerallarge) val)



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/format-FormatFloat>

FormatExpLarge
==============

 [[Source]](https://stdlib.ponylang.io/src/format/format_spec/#L28)

 
```
primitive val FormatExpLarge is
  FormatSpec val

```
 #### Implements

 * [FormatSpec](format-formatspec) val

 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/format/format_spec/#L28)

 
```
new val create()
: FormatExpLarge val^

```
 #### Returns

 * [FormatExpLarge](index) val^

 Public Functions
----------------

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/format/format_spec/#L29)

 
```
fun box eq(
  that: FormatExpLarge val)
: Bool val

```
 #### Parameters

 * that: [FormatExpLarge](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/format/format_spec/#L29)

 
```
fun box ne(
  that: FormatExpLarge val)
: Bool val

```
 #### Parameters

 * that: [FormatExpLarge](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/format-FormatExpLarge>

FormatGeneralLarge
==================

 [[Source]](https://stdlib.ponylang.io/src/format/format_spec/#L32)

 
```
primitive val FormatGeneralLarge is
  FormatSpec val

```
 #### Implements

 * [FormatSpec](format-formatspec) val

 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/format/format_spec/#L32)

 
```
new val create()
: FormatGeneralLarge val^

```
 #### Returns

 * [FormatGeneralLarge](index) val^

 Public Functions
----------------

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/format/format_spec/#L34)

 
```
fun box eq(
  that: FormatGeneralLarge val)
: Bool val

```
 #### Parameters

 * that: [FormatGeneralLarge](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/format/format_spec/#L34)

 
```
fun box ne(
  that: FormatGeneralLarge val)
: Bool val

```
 #### Parameters

 * that: [FormatGeneralLarge](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/format-FormatGeneralLarge>

AlignRight
==========

 [[Source]](https://stdlib.ponylang.io/src/format/align/#L2)

 
```
primitive val AlignRight

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/format/align/#L2)

 
```
new val create()
: AlignRight val^

```
 #### Returns

 * [AlignRight](index) val^

 Public Functions
----------------

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/format/align/#L3)

 
```
fun box eq(
  that: AlignRight val)
: Bool val

```
 #### Parameters

 * that: [AlignRight](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/format/align/#L3)

 
```
fun box ne(
  that: AlignRight val)
: Bool val

```
 #### Parameters

 * that: [AlignRight](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/format-AlignRight>

AlignLeft
=========

 [[Source]](https://stdlib.ponylang.io/src/format/align/#L1)

 
```
primitive val AlignLeft

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/format/align/#L1)

 
```
new val create()
: AlignLeft val^

```
 #### Returns

 * [AlignLeft](index) val^

 Public Functions
----------------

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/format/align/#L2)

 
```
fun box eq(
  that: AlignLeft val)
: Bool val

```
 #### Parameters

 * that: [AlignLeft](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/format/align/#L2)

 
```
fun box ne(
  that: AlignLeft val)
: Bool val

```
 #### Parameters

 * that: [AlignLeft](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/format-AlignLeft>

Format
======

 [[Source]](https://stdlib.ponylang.io/src/format/format/#L37)

 Provides functions for generating formatted strings.

 * fmt. Format to use.
* prefix. Prefix to use.
* prec. Precision to use. The exact meaning of this depends on the type, but is generally the number of characters used for all, or part, of the string. A value of -1 indicates that the default for the type should be used.
* width. The minimum number of characters that will be in the produced string. If necessary the string will be padded with the fill character to make it long enough. *align. Specify whether fill characters should be added at the beginning or end of the generated string, or both.* fill: The character to pad a string with if is is shorter than width.

 
```
primitive val Format

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/format/format/#L37)

 
```
new val create()
: Format val^

```
 #### Returns

 * [Format](index) val^

 Public Functions
----------------

 ### apply

 [[Source]](https://stdlib.ponylang.io/src/format/format/#L54)

 
```
fun box apply(
  str: String val,
  fmt: FormatDefault val = reference,
  prefix: PrefixDefault val = reference,
  prec: USize val = call,
  width: USize val = 0,
  align: (AlignLeft val | AlignRight val | AlignCenter val) = reference,
  fill: U32 val = 32)
: String iso^

```
 #### Parameters

 * str: [String](builtin-string) val
* fmt: [FormatDefault](format-formatdefault) val = reference
* prefix: [PrefixDefault](format-prefixdefault) val = reference
* prec: [USize](builtin-usize) val = call
* width: [USize](builtin-usize) val = 0
* align: ([AlignLeft](format-alignleft) val | [AlignRight](format-alignright) val | [AlignCenter](format-aligncenter) val) = reference
* fill: [U32](builtin-u32) val = 32

 #### Returns

 * [String](builtin-string) iso^

 ### int[A: (([I8](builtin-i8) val | [I16](builtin-i16) val | [I32](builtin-i32) val | [I64](builtin-i64) val | [I128](builtin-i128) val | [ILong](builtin-ilong) val | [ISize](builtin-isize) val | [U8](builtin-u8) val | [U16](builtin-u16) val | [U32](builtin-u32) val | [U64](builtin-u64) val | [U128](builtin-u128) val | [ULong](builtin-ulong) val | [USize](builtin-usize) val) & [Integer](builtin-integer)[A])]

 [[Source]](https://stdlib.ponylang.io/src/format/format/#L94)

 
```
fun box int[A: ((I8 val | I16 val | I32 val | 
    I64 val | I128 val | ILong val | 
    ISize val | U8 val | U16 val | 
    U32 val | U64 val | U128 val | 
    ULong val | USize val) & Integer[A])](
  x: A,
  fmt: (FormatDefault val | FormatUTF32 val | FormatBinary val | 
    FormatBinaryBare val | FormatOctal val | FormatOctalBare val | 
    FormatHex val | FormatHexBare val | FormatHexSmall val | 
    FormatHexSmallBare val) = reference,
  prefix: (PrefixDefault val | PrefixSpace val | PrefixSign val) = reference,
  prec: USize val = call,
  width: USize val = 0,
  align: (AlignLeft val | AlignRight val | AlignCenter val) = reference,
  fill: U32 val = 32)
: String iso^

```
 #### Parameters

 * x: A
* fmt: ([FormatDefault](format-formatdefault) val | [FormatUTF32](format-formatutf32) val | [FormatBinary](format-formatbinary) val | [FormatBinaryBare](format-formatbinarybare) val | [FormatOctal](format-formatoctal) val | [FormatOctalBare](format-formatoctalbare) val | [FormatHex](format-formathex) val | [FormatHexBare](format-formathexbare) val | [FormatHexSmall](format-formathexsmall) val | [FormatHexSmallBare](format-formathexsmallbare) val) = reference
* prefix: ([PrefixDefault](format-prefixdefault) val | [PrefixSpace](format-prefixspace) val | [PrefixSign](format-prefixsign) val) = reference
* prec: [USize](builtin-usize) val = call
* width: [USize](builtin-usize) val = 0
* align: ([AlignLeft](format-alignleft) val | [AlignRight](format-alignright) val | [AlignCenter](format-aligncenter) val) = reference
* fill: [U32](builtin-u32) val = 32

 #### Returns

 * [String](builtin-string) iso^

 ### float[A: (([F32](builtin-f32) val | [F64](builtin-f64) val) & [FloatingPoint](builtin-floatingpoint)[A])]

 [[Source]](https://stdlib.ponylang.io/src/format/format/#L135)

 
```
fun box float[A: ((F32 val | F64 val) & FloatingPoint[A])](
  x: A,
  fmt: (FormatDefault val | FormatExp val | FormatExpLarge val | 
    FormatFix val | FormatFixLarge val | FormatGeneral val | 
    FormatGeneralLarge val) = reference,
  prefix: (PrefixDefault val | PrefixSpace val | PrefixSign val) = reference,
  prec: USize val = 6,
  width: USize val = 0,
  align: (AlignLeft val | AlignRight val | AlignCenter val) = reference,
  fill: U32 val = 32)
: String iso^

```
 #### Parameters

 * x: A
* fmt: ([FormatDefault](format-formatdefault) val | [FormatExp](format-formatexp) val | [FormatExpLarge](format-formatexplarge) val | [FormatFix](format-formatfix) val | [FormatFixLarge](format-formatfixlarge) val | [FormatGeneral](format-formatgeneral) val | [FormatGeneralLarge](format-formatgenerallarge) val) = reference
* prefix: ([PrefixDefault](format-prefixdefault) val | [PrefixSpace](format-prefixspace) val | [PrefixSign](format-prefixsign) val) = reference
* prec: [USize](builtin-usize) val = 6
* width: [USize](builtin-usize) val = 0
* align: ([AlignLeft](format-alignleft) val | [AlignRight](format-alignright) val | [AlignCenter](format-aligncenter) val) = reference
* fill: [U32](builtin-u32) val = 32

 #### Returns

 * [String](builtin-string) iso^

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/format/format/#L54)

 
```
fun box eq(
  that: Format val)
: Bool val

```
 #### Parameters

 * that: [Format](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/format/format/#L54)

 
```
fun box ne(
  that: Format val)
: Bool val

```
 #### Parameters

 * that: [Format](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/format-Format>

FormatInt
=========

 [[Source]](https://stdlib.ponylang.io/src/format/format_spec/#L15)

 
```
type FormatInt is
  (FormatDefault val | FormatUTF32 val | FormatBinary val | FormatBinaryBare val | FormatOctal val | FormatOctalBare val | FormatHex val | FormatHexBare val | FormatHexSmall val | FormatHexSmallBare val)

```
 #### Type Alias For

 * ([FormatDefault](format-formatdefault) val | [FormatUTF32](format-formatutf32) val | [FormatBinary](format-formatbinary) val | [FormatBinaryBare](format-formatbinarybare) val | [FormatOctal](format-formatoctal) val | [FormatOctalBare](format-formatoctalbare) val | [FormatHex](format-formathex) val | [FormatHexBare](format-formathexbare) val | [FormatHexSmall](format-formathexsmall) val | [FormatHexSmallBare](format-formathexsmallbare) val)



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/format-FormatInt>

AlignCenter
===========

 [[Source]](https://stdlib.ponylang.io/src/format/align/#L3)

 
```
primitive val AlignCenter

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/format/align/#L3)

 
```
new val create()
: AlignCenter val^

```
 #### Returns

 * [AlignCenter](index) val^

 Public Functions
----------------

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/format/align/#L5)

 
```
fun box eq(
  that: AlignCenter val)
: Bool val

```
 #### Parameters

 * that: [AlignCenter](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/format/align/#L5)

 
```
fun box ne(
  that: AlignCenter val)
: Bool val

```
 #### Parameters

 * that: [AlignCenter](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/format-AlignCenter>

Align
=====

 [[Source]](https://stdlib.ponylang.io/src/format/align/#L5)

 
```
type Align is
  (AlignLeft val | AlignRight val | AlignCenter val)

```
 #### Type Alias For

 * ([AlignLeft](format-alignleft) val | [AlignRight](format-alignright) val | [AlignCenter](format-aligncenter) val)



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/format-Align>

FileStream
==========

 [[Source]](https://stdlib.ponylang.io/src/files/file_stream/#L1)

 Asynchronous access to a File object. Wraps file operations print, write, printv and writev. The File will be disposed through File.\_final.

 
```
actor tag FileStream is
  OutStream tag

```
 #### Implements

 * [OutStream](builtin-outstream) tag

 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/files/file_stream/#L8)

 
```
new tag create(
  file: File iso)
: FileStream tag^

```
 #### Parameters

 * file: [File](files-file) iso

 #### Returns

 * [FileStream](index) tag^

 Public Behaviours
-----------------

 ### print

 [[Source]](https://stdlib.ponylang.io/src/files/file_stream/#L11)

 Print some bytes and insert a newline afterwards.

 
```
be print(
  data: (String val | Array[U8 val] val))

```
 #### Parameters

 * data: ([String](builtin-string) val | [Array](builtin-array)[[U8](builtin-u8) val] val)

 ### write

 [[Source]](https://stdlib.ponylang.io/src/files/file_stream/#L17)

 Print some bytes without inserting a newline afterwards.

 
```
be write(
  data: (String val | Array[U8 val] val))

```
 #### Parameters

 * data: ([String](builtin-string) val | [Array](builtin-array)[[U8](builtin-u8) val] val)

 ### printv

 [[Source]](https://stdlib.ponylang.io/src/files/file_stream/#L23)

 Print an iterable collection of ByteSeqs.

 
```
be printv(
  data: ByteSeqIter val)

```
 #### Parameters

 * data: [ByteSeqIter](builtin-byteseqiter) val

 ### writev

 [[Source]](https://stdlib.ponylang.io/src/files/file_stream/#L29)

 Write an iterable collection of ByteSeqs.

 
```
be writev(
  data: ByteSeqIter val)

```
 #### Parameters

 * data: [ByteSeqIter](builtin-byteseqiter) val

 ### flush

 [[Source]](https://stdlib.ponylang.io/src/files/file_stream/#L35)

 Flush pending data to write.

 
```
be flush()

```


 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/files-FileStream>

Path
====

 [[Source]](https://stdlib.ponylang.io/src/files/path/#L10)

 Operations on paths that do not require a capability. The operations can be used to manipulate path names, but give no access to the resulting paths.

 
```
primitive val Path

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/files/path/#L10)

 
```
new val create()
: Path val^

```
 #### Returns

 * [Path](index) val^

 Public Functions
----------------

 ### is\_sep

 [[Source]](https://stdlib.ponylang.io/src/files/path/#L15)

 Determine if a byte is a path separator.

 
```
fun box is_sep(
  c: U8 val)
: Bool val

```
 #### Parameters

 * c: [U8](builtin-u8) val

 #### Returns

 * [Bool](builtin-bool) val

 ### sep

 [[Source]](https://stdlib.ponylang.io/src/files/path/#L25)

 Return the path separator as a string.

 
```
fun tag sep()
: String val

```
 #### Returns

 * [String](builtin-string) val

 ### is\_abs

 [[Source]](https://stdlib.ponylang.io/src/files/path/#L31)

 Return true if the path is an absolute path.

 
```
fun box is_abs(
  path: String val)
: Bool val

```
 #### Parameters

 * path: [String](builtin-string) val

 #### Returns

 * [Bool](builtin-bool) val

 ### join

 [[Source]](https://stdlib.ponylang.io/src/files/path/#L45)

 Join two paths together. If the next\_path is absolute, simply return it. The returned path will be cleaned.

 
```
fun box join(
  path: String val,
  next_path: String val)
: String val

```
 #### Parameters

 * path: [String](builtin-string) val
* next\_path: [String](builtin-string) val

 #### Returns

 * [String](builtin-string) val

 ### clean

 [[Source]](https://stdlib.ponylang.io/src/files/path/#L69)

 Replace multiple separators with a single separator. Convert / to the OS separator. Remove instances of . from the path. Remove instances of .. and the preceding path element from the path. The result will have no trailing slash unless it is a root directory. If the result would be empty, "." will be returned instead.

 
```
fun box clean(
  path: String val)
: String val

```
 #### Parameters

 * path: [String](builtin-string) val

 #### Returns

 * [String](builtin-string) val

 ### normcase

 [[Source]](https://stdlib.ponylang.io/src/files/path/#L188)

 Normalizes the case of path for the runtime platform.

 
```
fun box normcase(
  path: String val)
: String val

```
 #### Parameters

 * path: [String](builtin-string) val

 #### Returns

 * [String](builtin-string) val

 ### cwd

 [[Source]](https://stdlib.ponylang.io/src/files/path/#L200)

 Returns the program's working directory. Setting the working directory is not supported, as it is not concurrency-safe.

 
```
fun box cwd()
: String val

```
 #### Returns

 * [String](builtin-string) val

 ### abs

 [[Source]](https://stdlib.ponylang.io/src/files/path/#L207)

 Returns a cleaned, absolute path.

 
```
fun box abs(
  path: String val)
: String val

```
 #### Parameters

 * path: [String](builtin-string) val

 #### Returns

 * [String](builtin-string) val

 ### rel

 [[Source]](https://stdlib.ponylang.io/src/files/path/#L217)

 Returns a path such that Path.join(to, Path.rel(to, target)) == target. Raises an error if this isn't possible.

 
```
fun box rel(
  to: String val,
  target: String val)
: String val ?

```
 #### Parameters

 * to: [String](builtin-string) val
* target: [String](builtin-string) val

 #### Returns

 * [String](builtin-string) val ?

 ### split

 [[Source]](https://stdlib.ponylang.io/src/files/path/#L307)

 Splits the path into a pair, (head, tail) where tail is the last pathname component and head is everything leading up to that. The tail part will never contain a slash; if path ends in a slash, tail will be empty. If there is no slash in path, head will be empty. If path is empty, both head and tail are empty. The path in head will be cleaned before it is returned. In all cases, join(head, tail) returns a path to the same location as path (but the strings may differ). Also see the functions dir() and base().

 
```
fun box split(
  path: String val,
  separator: String val = call)
: (String val , String val)

```
 #### Parameters

 * path: [String](builtin-string) val
* separator: [String](builtin-string) val = call

 #### Returns

 * ([String](builtin-string) val , [String](builtin-string) val)

 ### base

 [[Source]](https://stdlib.ponylang.io/src/files/path/#L324)

 Return the path after the last separator, or the whole path if there is no separator. If `with_ext` is `false`, the extension as defined by the `ext()` method will be omitted from the result.

 
```
fun box base(
  path: String val,
  with_ext: Bool val = true)
: String val

```
 #### Parameters

 * path: [String](builtin-string) val
* with\_ext: [Bool](builtin-bool) val = true

 #### Returns

 * [String](builtin-string) val

 ### dir

 [[Source]](https://stdlib.ponylang.io/src/files/path/#L349)

 Return a cleaned path before the last separator, or the whole path if there is no separator.

 
```
fun box dir(
  path: String val)
: String val

```
 #### Parameters

 * path: [String](builtin-string) val

 #### Returns

 * [String](builtin-string) val

 ### ext

 [[Source]](https://stdlib.ponylang.io/src/files/path/#L360)

 Return the file extension, i.e. the part after the last dot as long as that dot is after all separators. Return an empty string for no extension.

 
```
fun box ext(
  path: String val)
: String val

```
 #### Parameters

 * path: [String](builtin-string) val

 #### Returns

 * [String](builtin-string) val

 ### volume

 [[Source]](https://stdlib.ponylang.io/src/files/path/#L380)

 On Windows, this returns the drive letter or UNC base at the beginning of the path, if there is one. Otherwise, this returns an empty string.

 
```
fun box volume(
  path: String val)
: String val

```
 #### Parameters

 * path: [String](builtin-string) val

 #### Returns

 * [String](builtin-string) val

 ### from\_slash

 [[Source]](https://stdlib.ponylang.io/src/files/path/#L441)

 Changes each / in the path to the OS specific separator.

 
```
fun box from_slash(
  path: String val)
: String val

```
 #### Parameters

 * path: [String](builtin-string) val

 #### Returns

 * [String](builtin-string) val

 ### to\_slash

 [[Source]](https://stdlib.ponylang.io/src/files/path/#L465)

 Changes each OS specific separator in the path to /.

 
```
fun box to_slash(
  path: String val)
: String val

```
 #### Parameters

 * path: [String](builtin-string) val

 #### Returns

 * [String](builtin-string) val

 ### canonical

 [[Source]](https://stdlib.ponylang.io/src/files/path/#L489)

 Return the equivalent canonical absolute path. Raise an error if there isn't one.

 
```
fun box canonical(
  path: String val)
: String val ?

```
 #### Parameters

 * path: [String](builtin-string) val

 #### Returns

 * [String](builtin-string) val ?

 ### is\_list\_sep

 [[Source]](https://stdlib.ponylang.io/src/files/path/#L503)

 Determine if a byte is a path list separator.

 
```
fun box is_list_sep(
  c: U8 val)
: Bool val

```
 #### Parameters

 * c: [U8](builtin-u8) val

 #### Returns

 * [Bool](builtin-bool) val

 ### list\_sep

 [[Source]](https://stdlib.ponylang.io/src/files/path/#L509)

 Return the path list separator as a string.

 
```
fun box list_sep()
: String val

```
 #### Returns

 * [String](builtin-string) val

 ### split\_list

 [[Source]](https://stdlib.ponylang.io/src/files/path/#L515)

 Separate a list of paths into an array of cleaned paths.

 
```
fun box split_list(
  path: String val)
: Array[String val] iso^

```
 #### Parameters

 * path: [String](builtin-string) val

 #### Returns

 * [Array](builtin-array)[[String](builtin-string) val] iso^

 ### random

 [[Source]](https://stdlib.ponylang.io/src/files/path/#L534)

 Returns a pseudo-random base, suitable as a temporary file name or directory name, but not guaranteed to not already exist.

 
```
fun box random(
  len: USize val = 6)
: String val

```
 #### Parameters

 * len: [USize](builtin-usize) val = 6

 #### Returns

 * [String](builtin-string) val

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/files/path/#L15)

 
```
fun box eq(
  that: Path val)
: Bool val

```
 #### Parameters

 * that: [Path](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/files/path/#L15)

 
```
fun box ne(
  that: Path val)
: Bool val

```
 #### Parameters

 * that: [Path](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/files-Path>

WalkHandler
===========

 [[Source]](https://stdlib.ponylang.io/src/files/file_path/#L3)

 A handler for `FilePath.walk`.

 
```
interface ref WalkHandler

```
 Public Functions
----------------

 ### apply

 [[Source]](https://stdlib.ponylang.io/src/files/file_path/#L7)

 
```
fun ref apply(
  dir_path: FilePath val,
  dir_entries: Array[String val] ref)
: None val

```
 #### Parameters

 * dir\_path: [FilePath](files-filepath) val
* dir\_entries: [Array](builtin-array)[[String](builtin-string) val] ref

 #### Returns

 * [None](builtin-none) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/files-WalkHandler>

FileLines
=========

 [[Source]](https://stdlib.ponylang.io/src/files/file_lines/#L3)

 Iterate over the lines in a file.

 Returns lines without trailing line breaks. Advances the file cursor to the end of each line returned from `next`.

 This class buffers the file contents to accumulate full lines. If the file does not contain linebreaks, the whole file content is read and buffered, which might exceed memory resources. Take care.

 
```
class ref FileLines is
  Iterator[String iso^] ref

```
 #### Implements

 * [Iterator](builtin-iterator)[[String](builtin-string) iso^] ref

 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/files/file_lines/#L24)

 Create a FileLines instance on a given file.

 This instance returns lines from the position of the given `file` at the time this constructor is called. Later manipulation of the file position is not accounted for. As a result iterating with this class will always return the full file content without gaps or repeated lines.

 `min_read_size` determines the minimum amount of bytes to read from the file in one go. This class keeps track of the line lengths in the current file and uses the length of the last line as amount of bytes to read next, but it will never read less than `min_read_size`.

 
```
new ref create(
  file: File ref,
  min_read_size: USize val = 256)
: FileLines ref^

```
 #### Parameters

 * file: [File](files-file) ref
* min\_read\_size: [USize](builtin-usize) val = 256

 #### Returns

 * [FileLines](index) ref^

 Public Functions
----------------

 ### has\_next

 [[Source]](https://stdlib.ponylang.io/src/files/file_lines/#L45)

 
```
fun ref has_next()
: Bool val

```
 #### Returns

 * [Bool](builtin-bool) val

 ### next

 [[Source]](https://stdlib.ponylang.io/src/files/file_lines/#L48)

 Returns the next line in the file.

 
```
fun ref next()
: String iso^ ?

```
 #### Returns

 * [String](builtin-string) iso^ ?



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/files-FileLines>

FileMode
========

 [[Source]](https://stdlib.ponylang.io/src/files/file_mode/#L1)

 This stores a UNIX-style mode broken out into a Bool for each bit. For other operating systems, the mapping will be approximate. For example, on Windows, if the file is readable all the read Bools will be set, and if the file is writeable, all the write Bools will be set.

 The default mode is read/write for the owner, read-only for everyone else.

 
```
class ref FileMode

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/files/file_mode/#L1)

 
```
new iso create()
: FileMode iso^

```
 #### Returns

 * [FileMode](index) iso^

 Public fields
-------------

 ### var setuid: [Bool](builtin-bool) val

 [[Source]](https://stdlib.ponylang.io/src/files/file_mode/#L10)

 `true` if the SETUID bit is set.

 ### var setgid: [Bool](builtin-bool) val

 [[Source]](https://stdlib.ponylang.io/src/files/file_mode/#L13)

 `true` if the SETGID bit is set.

 ### var sticky: [Bool](builtin-bool) val

 [[Source]](https://stdlib.ponylang.io/src/files/file_mode/#L16)

 `true` if the sticky bit is set.

 ### var owner\_read: [Bool](builtin-bool) val

 [[Source]](https://stdlib.ponylang.io/src/files/file_mode/#L19)

 `true` if the owning user can read the file.

 ### var owner\_write: [Bool](builtin-bool) val

 [[Source]](https://stdlib.ponylang.io/src/files/file_mode/#L22)

 `true` if the owning user can write to the file.

 ### var owner\_exec: [Bool](builtin-bool) val

 [[Source]](https://stdlib.ponylang.io/src/files/file_mode/#L25)

 `true` if the owning user can execute the file.

 ### var group\_read: [Bool](builtin-bool) val

 [[Source]](https://stdlib.ponylang.io/src/files/file_mode/#L28)

 `true` if members of the owning group can read the file.

 ### var group\_write: [Bool](builtin-bool) val

 [[Source]](https://stdlib.ponylang.io/src/files/file_mode/#L31)

 `true` if members of the owning group can write to the file.

 ### var group\_exec: [Bool](builtin-bool) val

 [[Source]](https://stdlib.ponylang.io/src/files/file_mode/#L34)

 `true` if members of the owning group can execute the file.

 ### var any\_read: [Bool](builtin-bool) val

 [[Source]](https://stdlib.ponylang.io/src/files/file_mode/#L37)

 `true` if every user can read the file.

 ### var any\_write: [Bool](builtin-bool) val

 [[Source]](https://stdlib.ponylang.io/src/files/file_mode/#L40)

 `true` if every user can write to the file.

 ### var any\_exec: [Bool](builtin-bool) val

 [[Source]](https://stdlib.ponylang.io/src/files/file_mode/#L43)

 `true if every user can execute the file.

 Public Functions
----------------

 ### exec

 [[Source]](https://stdlib.ponylang.io/src/files/file_mode/#L46)

 Set the executable flag for everyone.

 
```
fun ref exec()
: None val

```
 #### Returns

 * [None](builtin-none) val

 ### shared

 [[Source]](https://stdlib.ponylang.io/src/files/file_mode/#L54)

 Set the write flag for everyone to the same as owner\_write.

 
```
fun ref shared()
: None val

```
 #### Returns

 * [None](builtin-none) val

 ### group

 [[Source]](https://stdlib.ponylang.io/src/files/file_mode/#L61)

 Clear all of the any-user flags.

 
```
fun ref group()
: None val

```
 #### Returns

 * [None](builtin-none) val

 ### private

 [[Source]](https://stdlib.ponylang.io/src/files/file_mode/#L69)

 Clear all of the group and any-user flags.

 
```
fun ref private()
: None val

```
 #### Returns

 * [None](builtin-none) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/files-FileMode>

FileChown
=========

 [[Source]](https://stdlib.ponylang.io/src/files/file_caps/#L9)

 
```
primitive val FileChown

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/files/file_caps/#L9)

 
```
new val create()
: FileChown val^

```
 #### Returns

 * [FileChown](index) val^

 Public Functions
----------------

 ### value

 [[Source]](https://stdlib.ponylang.io/src/files/file_caps/#L10)

 
```
fun box value()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/files/file_caps/#L10)

 
```
fun box eq(
  that: FileChown val)
: Bool val

```
 #### Parameters

 * that: [FileChown](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/files/file_caps/#L10)

 
```
fun box ne(
  that: FileChown val)
: Bool val

```
 #### Parameters

 * that: [FileChown](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/files-FileChown>

FileCreate
==========

 [[Source]](https://stdlib.ponylang.io/src/files/file_caps/#L3)

 
```
primitive val FileCreate

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/files/file_caps/#L3)

 
```
new val create()
: FileCreate val^

```
 #### Returns

 * [FileCreate](index) val^

 Public Functions
----------------

 ### value

 [[Source]](https://stdlib.ponylang.io/src/files/file_caps/#L4)

 
```
fun box value()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/files/file_caps/#L4)

 
```
fun box eq(
  that: FileCreate val)
: Bool val

```
 #### Parameters

 * that: [FileCreate](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/files/file_caps/#L4)

 
```
fun box ne(
  that: FileCreate val)
: Bool val

```
 #### Parameters

 * that: [FileCreate](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/files-FileCreate>

FileLink
========

 [[Source]](https://stdlib.ponylang.io/src/files/file_caps/#L12)

 
```
primitive val FileLink

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/files/file_caps/#L12)

 
```
new val create()
: FileLink val^

```
 #### Returns

 * [FileLink](index) val^

 Public Functions
----------------

 ### value

 [[Source]](https://stdlib.ponylang.io/src/files/file_caps/#L13)

 
```
fun box value()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/files/file_caps/#L13)

 
```
fun box eq(
  that: FileLink val)
: Bool val

```
 #### Parameters

 * that: [FileLink](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/files/file_caps/#L13)

 
```
fun box ne(
  that: FileLink val)
: Bool val

```
 #### Parameters

 * that: [FileLink](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/files-FileLink>

FileInfo
========

 [[Source]](https://stdlib.ponylang.io/src/files/file_info/#L1)

 This contains file system metadata for a path.

 A symlink will report information about itself, other than the size which will be the size of the target. A broken symlink will report as much as it can and will set the broken flag.

 
```
class val FileInfo

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/files/file_info/#L86)

 This will raise an error if the FileStat capability isn't available or the path doesn't exist.

 
```
new val create(
  from: FilePath val)
: FileInfo val^ ?

```
 #### Parameters

 * from: [FilePath](files-filepath) val

 #### Returns

 * [FileInfo](index) val^ ?

 Public fields
-------------

 ### let filepath: [FilePath](files-filepath) val

 [[Source]](https://stdlib.ponylang.io/src/files/file_info/#L9)

 ### let mode: [FileMode](files-filemode) val

 [[Source]](https://stdlib.ponylang.io/src/files/file_info/#L11)

 UNIX-style file mode.

 ### let hard\_links: [U32](builtin-u32) val

 [[Source]](https://stdlib.ponylang.io/src/files/file_info/#L14)

 Number of hardlinks to this `filepath`.

 ### let device: [U64](builtin-u64) val

 [[Source]](https://stdlib.ponylang.io/src/files/file_info/#L17)

 OS id of the device containing this `filepath`. Device IDs consist of a major and minor device id, denoting the type of device and the instance of this type on the system.

 ### let inode: [U64](builtin-u64) val

 [[Source]](https://stdlib.ponylang.io/src/files/file_info/#L24)

 UNIX specific INODE number of `filepath`. Is 0 on Windows.

 ### let uid: [U32](builtin-u32) val

 [[Source]](https://stdlib.ponylang.io/src/files/file_info/#L27)

 UNIX-style user ID of the owner of `filepath`.

 ### let gid: [U32](builtin-u32) val

 [[Source]](https://stdlib.ponylang.io/src/files/file_info/#L30)

 UNIX-style user ID of the owning group of `filepath`.

 ### let size: [USize](builtin-usize) val

 [[Source]](https://stdlib.ponylang.io/src/files/file_info/#L33)

 Total size of `filepath` in bytes.

 In case of a symlink this is the size of the target, not the symlink itself.

 ### let access\_time: ([I64](builtin-i64) val , [I64](builtin-i64) val)

 [[Source]](https://stdlib.ponylang.io/src/files/file_info/#L40)

 Time of last access as a tuple of seconds and nanoseconds since the epoch:

 
```
(let a_secs: I64, let a_nanos: I64) = file_info.access_time

```
 ### let modified\_time: ([I64](builtin-i64) val , [I64](builtin-i64) val)

 [[Source]](https://stdlib.ponylang.io/src/files/file_info/#L49)

 Time of last modification as tuple of seconds and nanoseconds since the epoch:

 
```
(let m_secs: I64, let m_nanos: I64) = file_info.modified_time

```
 ### let change\_time: ([I64](builtin-i64) val , [I64](builtin-i64) val)

 [[Source]](https://stdlib.ponylang.io/src/files/file_info/#L58)

 Time of the last change either the attributes (number of links, owner, group, file mode, ...) or the content of `filepath` as a tuple of seconds and nanoseconds since the epoch:

 
```
(let c_secs: I64, let c_nanos: I64) = file_info.change_time

```
 On Windows this will be the file creation time.

 ### let file: [Bool](builtin-bool) val

 [[Source]](https://stdlib.ponylang.io/src/files/file_info/#L71)

 `true` if `filepath` points to an a regular file.

 ### let directory: [Bool](builtin-bool) val

 [[Source]](https://stdlib.ponylang.io/src/files/file_info/#L74)

 `true` if `filepath` points to a directory.

 ### let pipe: [Bool](builtin-bool) val

 [[Source]](https://stdlib.ponylang.io/src/files/file_info/#L77)

 `true` if `filepath` points to a named pipe.

 ### let symlink: [Bool](builtin-bool) val

 [[Source]](https://stdlib.ponylang.io/src/files/file_info/#L80)

 `true` if `filepath` points to a symbolic link.

 ### let broken: [Bool](builtin-bool) val

 [[Source]](https://stdlib.ponylang.io/src/files/file_info/#L83)

 `true` if `filepath` points to a broken symlink.



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/files-FileInfo>

FilePath
========

 [[Source]](https://stdlib.ponylang.io/src/files/file_path/#L9)

 A FilePath represents a capability to access a path. The path will be represented as an absolute path and a set of capabilities for operations on that path.

 
```
class val FilePath

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/files/file_path/#L24)

 Create a new path. The caller must either provide the root capability or an existing FilePath.

 If the root capability is provided, path' will be relative to the program's working directory. Otherwise, it will be relative to the existing FilePath, and the existing FilePath must be a prefix of the resulting path.

 The resulting FilePath will have capabilities that are the intersection of the supplied capabilities and the capabilities on the parent.

 
```
new val create(
  base: (FilePath val | AmbientAuth val),
  path': String val,
  caps': Flags[(FileCreate val | FileChmod val | FileChown val | FileLink val | FileLookup val | FileMkdir val | FileRead val | FileRemove val | FileRename val | FileSeek val | FileStat val | FileSync val | FileTime val | FileTruncate val | FileWrite val | FileExec val), U32 val] val = recover)
: FilePath val^ ?

```
 #### Parameters

 * base: ([FilePath](index) val | [AmbientAuth](builtin-ambientauth) val)
* path': [String](builtin-string) val
* caps': [Flags](collections-flags)[([FileCreate](files-filecreate) val | [FileChmod](files-filechmod) val | [FileChown](files-filechown) val | [FileLink](files-filelink) val | [FileLookup](files-filelookup) val | [FileMkdir](files-filemkdir) val | [FileRead](files-fileread) val | [FileRemove](files-fileremove) val | [FileRename](files-filerename) val | [FileSeek](files-fileseek) val | [FileStat](files-filestat) val | [FileSync](files-filesync) val | [FileTime](files-filetime) val | [FileTruncate](files-filetruncate) val | [FileWrite](files-filewrite) val | [FileExec](files-fileexec) val), [U32](builtin-u32) val] val = recover

 #### Returns

 * [FilePath](index) val^ ?

 ### mkdtemp

 [[Source]](https://stdlib.ponylang.io/src/files/file_path/#L60)

 Create a temporary directory and returns a path to it. The directory's name will begin with `prefix`. The caller must either provide the root capability or an existing FilePath.

 If AmbientAuth is provided, pattern will be relative to the program's working directory. Otherwise, it will be relative to the existing FilePath, and the existing FilePath must be a prefix of the resulting path.

 The resulting FilePath will have capabilities that are the intersection of the supplied capabilities and the capabilities on the base.

 
```
new val mkdtemp(
  base: (FilePath val | AmbientAuth val),
  prefix: String val = "",
  caps': Flags[(FileCreate val | FileChmod val | FileChown val | FileLink val | FileLookup val | FileMkdir val | FileRead val | FileRemove val | FileRename val | FileSeek val | FileStat val | FileSync val | FileTime val | FileTruncate val | FileWrite val | FileExec val), U32 val] val = recover)
: FilePath val^ ?

```
 #### Parameters

 * base: ([FilePath](index) val | [AmbientAuth](builtin-ambientauth) val)
* prefix: [String](builtin-string) val = ""
* caps': [Flags](collections-flags)[([FileCreate](files-filecreate) val | [FileChmod](files-filechmod) val | [FileChown](files-filechown) val | [FileLink](files-filelink) val | [FileLookup](files-filelookup) val | [FileMkdir](files-filemkdir) val | [FileRead](files-fileread) val | [FileRemove](files-fileremove) val | [FileRename](files-filerename) val | [FileSeek](files-fileseek) val | [FileStat](files-filestat) val | [FileSync](files-filesync) val | [FileTime](files-filetime) val | [FileTruncate](files-filetruncate) val | [FileWrite](files-filewrite) val | [FileExec](files-fileexec) val), [U32](builtin-u32) val] val = recover

 #### Returns

 * [FilePath](index) val^ ?

 Public fields
-------------

 ### let path: [String](builtin-string) val

 [[Source]](https://stdlib.ponylang.io/src/files/file_path/#L15)

 Absolute filesystem path.

 ### let caps: [Flags](collections-flags)[([FileCreate](files-filecreate) val | [FileChmod](files-filechmod) val | [FileChown](files-filechown) val | [FileLink](files-filelink) val | [FileLookup](files-filelookup) val | [FileMkdir](files-filemkdir) val | [FileRead](files-fileread) val | [FileRemove](files-fileremove) val | [FileRename](files-filerename) val | [FileSeek](files-fileseek) val | [FileStat](files-filestat) val | [FileSync](files-filesync) val | [FileTime](files-filetime) val | [FileTruncate](files-filetruncate) val | [FileWrite](files-filewrite) val | [FileExec](files-fileexec) val), [U32](builtin-u32) val] ref

 [[Source]](https://stdlib.ponylang.io/src/files/file_path/#L19)

 Set of capabilities for operations on `path`.

 Public Functions
----------------

 ### join

 [[Source]](https://stdlib.ponylang.io/src/files/file_path/#L102)

 Return a new path relative to this one.

 
```
fun val join(
  path': String val,
  caps': Flags[(FileCreate val | FileChmod val | FileChown val | FileLink val | FileLookup val | FileMkdir val | FileRead val | FileRemove val | FileRename val | FileSeek val | FileStat val | FileSync val | FileTime val | FileTruncate val | FileWrite val | FileExec val), U32 val] val = recover)
: FilePath val ?

```
 #### Parameters

 * path': [String](builtin-string) val
* caps': [Flags](collections-flags)[([FileCreate](files-filecreate) val | [FileChmod](files-filechmod) val | [FileChown](files-filechown) val | [FileLink](files-filelink) val | [FileLookup](files-filelookup) val | [FileMkdir](files-filemkdir) val | [FileRead](files-fileread) val | [FileRemove](files-fileremove) val | [FileRename](files-filerename) val | [FileSeek](files-fileseek) val | [FileStat](files-filestat) val | [FileSync](files-filesync) val | [FileTime](files-filetime) val | [FileTruncate](files-filetruncate) val | [FileWrite](files-filewrite) val | [FileExec](files-fileexec) val), [U32](builtin-u32) val] val = recover

 #### Returns

 * [FilePath](index) val ?

 ### walk

 [[Source]](https://stdlib.ponylang.io/src/files/file_path/#L112)

 Walks a directory structure starting at this.

 `handler(dir_path, dir_entries)` will be called for each directory starting with this one. The handler can control which subdirectories are expanded by removing them from the `dir_entries` list.

 
```
fun val walk(
  handler: WalkHandler ref,
  follow_links: Bool val = false)
: None val

```
 #### Parameters

 * handler: [WalkHandler](files-walkhandler) ref
* follow\_links: [Bool](builtin-bool) val = false

 #### Returns

 * [None](builtin-none) val

 ### canonical

 [[Source]](https://stdlib.ponylang.io/src/files/file_path/#L136)

 Return the equivalent canonical absolute path. Raise an error if there isn't one.

 
```
fun val canonical()
: FilePath val ?

```
 #### Returns

 * [FilePath](index) val ?

 ### exists

 [[Source]](https://stdlib.ponylang.io/src/files/file_path/#L143)

 Returns true if the path exists. Returns false for a broken symlink.

 
```
fun val exists()
: Bool val

```
 #### Returns

 * [Bool](builtin-bool) val

 ### mkdir

 [[Source]](https://stdlib.ponylang.io/src/files/file_path/#L153)

 Creates the directory. Will recursively create each element. Returns true if the directory exists when we're done, false if it does not. If we do not have the FileStat permission, this will return false even if the directory does exist.

 
```
fun val mkdir(
  must_create: Bool val = false)
: Bool val

```
 #### Parameters

 * must\_create: [Bool](builtin-bool) val = false

 #### Returns

 * [Bool](builtin-bool) val

 ### remove

 [[Source]](https://stdlib.ponylang.io/src/files/file_path/#L200)

 Remove the file or directory. The directory contents will be removed as well, recursively. Symlinks will be removed but not traversed.

 
```
fun val remove()
: Bool val

```
 #### Returns

 * [Bool](builtin-bool) val

 ### rename

 [[Source]](https://stdlib.ponylang.io/src/files/file_path/#L242)

 Rename a file or directory.

 
```
fun box rename(
  new_path: FilePath val)
: Bool val

```
 #### Parameters

 * new\_path: [FilePath](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### symlink

 [[Source]](https://stdlib.ponylang.io/src/files/file_path/#L252)

 Create a symlink to a file or directory.

 Note that on Windows a program must be running with elevated priviledges to be able to create symlinks.

 
```
fun val symlink(
  link_name: FilePath val)
: Bool val

```
 #### Parameters

 * link\_name: [FilePath](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### chmod

 [[Source]](https://stdlib.ponylang.io/src/files/file_path/#L325)

 Set the FileMode for a path.

 
```
fun box chmod(
  mode: FileMode box)
: Bool val

```
 #### Parameters

 * mode: [FileMode](files-filemode) box

 #### Returns

 * [Bool](builtin-bool) val

 ### chown

 [[Source]](https://stdlib.ponylang.io/src/files/file_path/#L341)

 Set the owner and group for a path. Does nothing on Windows.

 
```
fun box chown(
  uid: U32 val,
  gid: U32 val)
: Bool val

```
 #### Parameters

 * uid: [U32](builtin-u32) val
* gid: [U32](builtin-u32) val

 #### Returns

 * [Bool](builtin-bool) val

 ### touch

 [[Source]](https://stdlib.ponylang.io/src/files/file_path/#L355)

 Set the last access and modification times of a path to now.

 
```
fun box touch()
: Bool val

```
 #### Returns

 * [Bool](builtin-bool) val

 ### set\_time

 [[Source]](https://stdlib.ponylang.io/src/files/file_path/#L361)

 Set the last access and modification times of a path to the given values.

 
```
fun box set_time(
  atime: (I64 val , I64 val),
  mtime: (I64 val , I64 val))
: Bool val

```
 #### Parameters

 * atime: ([I64](builtin-i64) val , [I64](builtin-i64) val)
* mtime: ([I64](builtin-i64) val , [I64](builtin-i64) val)

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/files-FilePath>

FileRead
========

 [[Source]](https://stdlib.ponylang.io/src/files/file_caps/#L21)

 
```
primitive val FileRead

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/files/file_caps/#L21)

 
```
new val create()
: FileRead val^

```
 #### Returns

 * [FileRead](index) val^

 Public Functions
----------------

 ### value

 [[Source]](https://stdlib.ponylang.io/src/files/file_caps/#L22)

 
```
fun box value()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/files/file_caps/#L22)

 
```
fun box eq(
  that: FileRead val)
: Bool val

```
 #### Parameters

 * that: [FileRead](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/files/file_caps/#L22)

 
```
fun box ne(
  that: FileRead val)
: Bool val

```
 #### Parameters

 * that: [FileRead](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/files-FileRead>

FileLookup
==========

 [[Source]](https://stdlib.ponylang.io/src/files/file_caps/#L15)

 
```
primitive val FileLookup

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/files/file_caps/#L15)

 
```
new val create()
: FileLookup val^

```
 #### Returns

 * [FileLookup](index) val^

 Public Functions
----------------

 ### value

 [[Source]](https://stdlib.ponylang.io/src/files/file_caps/#L16)

 
```
fun box value()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/files/file_caps/#L16)

 
```
fun box eq(
  that: FileLookup val)
: Bool val

```
 #### Parameters

 * that: [FileLookup](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/files/file_caps/#L16)

 
```
fun box ne(
  that: FileLookup val)
: Bool val

```
 #### Parameters

 * that: [FileLookup](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/files-FileLookup>

FileRemove
==========

 [[Source]](https://stdlib.ponylang.io/src/files/file_caps/#L24)

 
```
primitive val FileRemove

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/files/file_caps/#L24)

 
```
new val create()
: FileRemove val^

```
 #### Returns

 * [FileRemove](index) val^

 Public Functions
----------------

 ### value

 [[Source]](https://stdlib.ponylang.io/src/files/file_caps/#L25)

 
```
fun box value()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/files/file_caps/#L25)

 
```
fun box eq(
  that: FileRemove val)
: Bool val

```
 #### Parameters

 * that: [FileRemove](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/files/file_caps/#L25)

 
```
fun box ne(
  that: FileRemove val)
: Bool val

```
 #### Parameters

 * that: [FileRemove](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/files-FileRemove>

FileChmod
=========

 [[Source]](https://stdlib.ponylang.io/src/files/file_caps/#L6)

 
```
primitive val FileChmod

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/files/file_caps/#L6)

 
```
new val create()
: FileChmod val^

```
 #### Returns

 * [FileChmod](index) val^

 Public Functions
----------------

 ### value

 [[Source]](https://stdlib.ponylang.io/src/files/file_caps/#L7)

 
```
fun box value()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/files/file_caps/#L7)

 
```
fun box eq(
  that: FileChmod val)
: Bool val

```
 #### Parameters

 * that: [FileChmod](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/files/file_caps/#L7)

 
```
fun box ne(
  that: FileChmod val)
: Bool val

```
 #### Parameters

 * that: [FileChmod](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/files-FileChmod>

FileRename
==========

 [[Source]](https://stdlib.ponylang.io/src/files/file_caps/#L27)

 
```
primitive val FileRename

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/files/file_caps/#L27)

 
```
new val create()
: FileRename val^

```
 #### Returns

 * [FileRename](index) val^

 Public Functions
----------------

 ### value

 [[Source]](https://stdlib.ponylang.io/src/files/file_caps/#L28)

 
```
fun box value()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/files/file_caps/#L28)

 
```
fun box eq(
  that: FileRename val)
: Bool val

```
 #### Parameters

 * that: [FileRename](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/files/file_caps/#L28)

 
```
fun box ne(
  that: FileRename val)
: Bool val

```
 #### Parameters

 * that: [FileRename](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/files-FileRename>

FileMkdir
=========

 [[Source]](https://stdlib.ponylang.io/src/files/file_caps/#L18)

 
```
primitive val FileMkdir

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/files/file_caps/#L18)

 
```
new val create()
: FileMkdir val^

```
 #### Returns

 * [FileMkdir](index) val^

 Public Functions
----------------

 ### value

 [[Source]](https://stdlib.ponylang.io/src/files/file_caps/#L19)

 
```
fun box value()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/files/file_caps/#L19)

 
```
fun box eq(
  that: FileMkdir val)
: Bool val

```
 #### Parameters

 * that: [FileMkdir](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/files/file_caps/#L19)

 
```
fun box ne(
  that: FileMkdir val)
: Bool val

```
 #### Parameters

 * that: [FileMkdir](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/files-FileMkdir>

FileSeek
========

 [[Source]](https://stdlib.ponylang.io/src/files/file_caps/#L30)

 
```
primitive val FileSeek

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/files/file_caps/#L30)

 
```
new val create()
: FileSeek val^

```
 #### Returns

 * [FileSeek](index) val^

 Public Functions
----------------

 ### value

 [[Source]](https://stdlib.ponylang.io/src/files/file_caps/#L31)

 
```
fun box value()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/files/file_caps/#L31)

 
```
fun box eq(
  that: FileSeek val)
: Bool val

```
 #### Parameters

 * that: [FileSeek](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/files/file_caps/#L31)

 
```
fun box ne(
  that: FileSeek val)
: Bool val

```
 #### Parameters

 * that: [FileSeek](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/files-FileSeek>

FileStat
========

 [[Source]](https://stdlib.ponylang.io/src/files/file_caps/#L33)

 
```
primitive val FileStat

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/files/file_caps/#L33)

 
```
new val create()
: FileStat val^

```
 #### Returns

 * [FileStat](index) val^

 Public Functions
----------------

 ### value

 [[Source]](https://stdlib.ponylang.io/src/files/file_caps/#L34)

 
```
fun box value()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/files/file_caps/#L34)

 
```
fun box eq(
  that: FileStat val)
: Bool val

```
 #### Parameters

 * that: [FileStat](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/files/file_caps/#L34)

 
```
fun box ne(
  that: FileStat val)
: Bool val

```
 #### Parameters

 * that: [FileStat](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/files-FileStat>

FileSync
========

 [[Source]](https://stdlib.ponylang.io/src/files/file_caps/#L36)

 
```
primitive val FileSync

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/files/file_caps/#L36)

 
```
new val create()
: FileSync val^

```
 #### Returns

 * [FileSync](index) val^

 Public Functions
----------------

 ### value

 [[Source]](https://stdlib.ponylang.io/src/files/file_caps/#L37)

 
```
fun box value()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/files/file_caps/#L37)

 
```
fun box eq(
  that: FileSync val)
: Bool val

```
 #### Parameters

 * that: [FileSync](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/files/file_caps/#L37)

 
```
fun box ne(
  that: FileSync val)
: Bool val

```
 #### Parameters

 * that: [FileSync](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/files-FileSync>

FileTime
========

 [[Source]](https://stdlib.ponylang.io/src/files/file_caps/#L39)

 
```
primitive val FileTime

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/files/file_caps/#L39)

 
```
new val create()
: FileTime val^

```
 #### Returns

 * [FileTime](index) val^

 Public Functions
----------------

 ### value

 [[Source]](https://stdlib.ponylang.io/src/files/file_caps/#L40)

 
```
fun box value()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/files/file_caps/#L40)

 
```
fun box eq(
  that: FileTime val)
: Bool val

```
 #### Parameters

 * that: [FileTime](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/files/file_caps/#L40)

 
```
fun box ne(
  that: FileTime val)
: Bool val

```
 #### Parameters

 * that: [FileTime](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/files-FileTime>

FileCaps
========

 [[Source]](https://stdlib.ponylang.io/src/files/file_caps/#L51)

 
```
type FileCaps is
  Flags[(FileCreate val | FileChmod val | FileChown val | FileLink val | FileLookup val | FileMkdir val | FileRead val | FileRemove val | FileRename val | FileSeek val | FileStat val | FileSync val | FileTime val | FileTruncate val | FileWrite val | FileExec val), U32 val] ref

```
 #### Type Alias For

 * [Flags](collections-flags)[([FileCreate](files-filecreate) val | [FileChmod](files-filechmod) val | [FileChown](files-filechown) val | [FileLink](files-filelink) val | [FileLookup](files-filelookup) val | [FileMkdir](files-filemkdir) val | [FileRead](files-fileread) val | [FileRemove](files-fileremove) val | [FileRename](files-filerename) val | [FileSeek](files-fileseek) val | [FileStat](files-filestat) val | [FileSync](files-filesync) val | [FileTime](files-filetime) val | [FileTruncate](files-filetruncate) val | [FileWrite](files-filewrite) val | [FileExec](files-fileexec) val), [U32](builtin-u32) val] ref



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/files-FileCaps>

FileWrite
=========

 [[Source]](https://stdlib.ponylang.io/src/files/file_caps/#L45)

 
```
primitive val FileWrite

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/files/file_caps/#L45)

 
```
new val create()
: FileWrite val^

```
 #### Returns

 * [FileWrite](index) val^

 Public Functions
----------------

 ### value

 [[Source]](https://stdlib.ponylang.io/src/files/file_caps/#L46)

 
```
fun box value()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/files/file_caps/#L46)

 
```
fun box eq(
  that: FileWrite val)
: Bool val

```
 #### Parameters

 * that: [FileWrite](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/files/file_caps/#L46)

 
```
fun box ne(
  that: FileWrite val)
: Bool val

```
 #### Parameters

 * that: [FileWrite](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/files-FileWrite>

FileEOF
=======

 [[Source]](https://stdlib.ponylang.io/src/files/file/#L26)

 
```
primitive val FileEOF

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/files/file/#L26)

 
```
new val create()
: FileEOF val^

```
 #### Returns

 * [FileEOF](index) val^

 Public Functions
----------------

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/files/file/#L27)

 
```
fun box eq(
  that: FileEOF val)
: Bool val

```
 #### Parameters

 * that: [FileEOF](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/files/file/#L27)

 
```
fun box ne(
  that: FileEOF val)
: Bool val

```
 #### Parameters

 * that: [FileEOF](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/files-FileEOF>

FileExists
==========

 [[Source]](https://stdlib.ponylang.io/src/files/file/#L28)

 
```
primitive val FileExists

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/files/file/#L28)

 
```
new val create()
: FileExists val^

```
 #### Returns

 * [FileExists](index) val^

 Public Functions
----------------

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/files/file/#L29)

 
```
fun box eq(
  that: FileExists val)
: Bool val

```
 #### Parameters

 * that: [FileExists](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/files/file/#L29)

 
```
fun box ne(
  that: FileExists val)
: Bool val

```
 #### Parameters

 * that: [FileExists](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/files-FileExists>

FileBadFileNumber
=================

 [[Source]](https://stdlib.ponylang.io/src/files/file/#L27)

 
```
primitive val FileBadFileNumber

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/files/file/#L27)

 
```
new val create()
: FileBadFileNumber val^

```
 #### Returns

 * [FileBadFileNumber](index) val^

 Public Functions
----------------

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/files/file/#L28)

 
```
fun box eq(
  that: FileBadFileNumber val)
: Bool val

```
 #### Parameters

 * that: [FileBadFileNumber](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/files/file/#L28)

 
```
fun box ne(
  that: FileBadFileNumber val)
: Bool val

```
 #### Parameters

 * that: [FileBadFileNumber](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/files-FileBadFileNumber>

FileTruncate
============

 [[Source]](https://stdlib.ponylang.io/src/files/file_caps/#L42)

 
```
primitive val FileTruncate

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/files/file_caps/#L42)

 
```
new val create()
: FileTruncate val^

```
 #### Returns

 * [FileTruncate](index) val^

 Public Functions
----------------

 ### value

 [[Source]](https://stdlib.ponylang.io/src/files/file_caps/#L43)

 
```
fun box value()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/files/file_caps/#L43)

 
```
fun box eq(
  that: FileTruncate val)
: Bool val

```
 #### Parameters

 * that: [FileTruncate](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/files/file_caps/#L43)

 
```
fun box ne(
  that: FileTruncate val)
: Bool val

```
 #### Parameters

 * that: [FileTruncate](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/files-FileTruncate>

FileOK
======

 [[Source]](https://stdlib.ponylang.io/src/files/file/#L24)

 
```
primitive val FileOK

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/files/file/#L24)

 
```
new val create()
: FileOK val^

```
 #### Returns

 * [FileOK](index) val^

 Public Functions
----------------

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/files/file/#L25)

 
```
fun box eq(
  that: FileOK val)
: Bool val

```
 #### Parameters

 * that: [FileOK](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/files/file/#L25)

 
```
fun box ne(
  that: FileOK val)
: Bool val

```
 #### Parameters

 * that: [FileOK](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/files-FileOK>

FileError
=========

 [[Source]](https://stdlib.ponylang.io/src/files/file/#L25)

 
```
primitive val FileError

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/files/file/#L25)

 
```
new val create()
: FileError val^

```
 #### Returns

 * [FileError](index) val^

 Public Functions
----------------

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/files/file/#L26)

 
```
fun box eq(
  that: FileError val)
: Bool val

```
 #### Parameters

 * that: [FileError](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/files/file/#L26)

 
```
fun box ne(
  that: FileError val)
: Bool val

```
 #### Parameters

 * that: [FileError](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/files-FileError>

Directory
=========

 [[Source]](https://stdlib.ponylang.io/src/files/directory/#L15)

 Operations on a directory.

 The directory-relative functions (open, etc) use the \*at interface on FreeBSD and Linux. This isn't available on OS X prior to 10.10, so it is not used. On FreeBSD, this allows the directory-relative functions to take advantage of Capsicum.

 
```
class ref Directory

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/files/directory/#L37)

 This will raise an error if the path doesn't exist or it is not a directory, or if FileRead or FileStat permission isn't available.

 
```
new ref create(
  from: FilePath val)
: Directory ref^ ?

```
 #### Parameters

 * from: [FilePath](files-filepath) val

 #### Returns

 * [Directory](index) ref^ ?

 Public fields
-------------

 ### let path: [FilePath](files-filepath) val

 [[Source]](https://stdlib.ponylang.io/src/files/directory/#L24)

 This is the filesystem path locating this directory on the file system and an object capability granting access to operate on this directory.

 Public Functions
----------------

 ### entries

 [[Source]](https://stdlib.ponylang.io/src/files/directory/#L77)

 The entries will include everything in the directory, but it is not recursive. The path for the entry will be relative to the directory, so it will contain no directory separators. The entries will not include "." or "..".

 
```
fun box entries()
: Array[String val] iso^ ?

```
 #### Returns

 * [Array](builtin-array)[[String](builtin-string) val] iso^ ?

 ### open

 [[Source]](https://stdlib.ponylang.io/src/files/directory/#L149)

 Open a directory relative to this one. Raises an error if the path is not within this directory hierarchy.

 
```
fun box open(
  target: String val)
: Directory iso^ ?

```
 #### Parameters

 * target: [String](builtin-string) val

 #### Returns

 * [Directory](index) iso^ ?

 ### mkdir

 [[Source]](https://stdlib.ponylang.io/src/files/directory/#L171)

 Creates a directory relative to this one. Returns false if the path is not within this directory hierarchy or if FileMkdir permission is missing.

 
```
fun box mkdir(
  target: String val)
: Bool val

```
 #### Parameters

 * target: [String](builtin-string) val

 #### Returns

 * [Bool](builtin-bool) val

 ### create\_file

 [[Source]](https://stdlib.ponylang.io/src/files/directory/#L210)

 Open for read/write, creating if it doesn't exist, preserving the contents if it does exist.

 
```
fun box create_file(
  target: String val)
: File iso^ ?

```
 #### Parameters

 * target: [String](builtin-string) val

 #### Returns

 * [File](files-file) iso^ ?

 ### open\_file

 [[Source]](https://stdlib.ponylang.io/src/files/directory/#L238)

 Open for read only, failing if it doesn't exist.

 
```
fun box open_file(
  target: String val)
: File iso^ ?

```
 #### Parameters

 * target: [String](builtin-string) val

 #### Returns

 * [File](files-file) iso^ ?

 ### info

 [[Source]](https://stdlib.ponylang.io/src/files/directory/#L261)

 Return a FileInfo for this directory. Raise an error if the fd is invalid or if we don't have FileStat permission.

 
```
fun box info()
: FileInfo val ?

```
 #### Returns

 * [FileInfo](files-fileinfo) val ?

 ### chmod

 [[Source]](https://stdlib.ponylang.io/src/files/directory/#L268)

 Set the FileMode for this directory.

 
```
fun box chmod(
  mode: FileMode box)
: Bool val

```
 #### Parameters

 * mode: [FileMode](files-filemode) box

 #### Returns

 * [Bool](builtin-bool) val

 ### chown

 [[Source]](https://stdlib.ponylang.io/src/files/directory/#L274)

 Set the owner and group for this directory. Does nothing on Windows.

 
```
fun box chown(
  uid: U32 val,
  gid: U32 val)
: Bool val

```
 #### Parameters

 * uid: [U32](builtin-u32) val
* gid: [U32](builtin-u32) val

 #### Returns

 * [Bool](builtin-bool) val

 ### touch

 [[Source]](https://stdlib.ponylang.io/src/files/directory/#L280)

 Set the last access and modification times of the directory to now.

 
```
fun box touch()
: Bool val

```
 #### Returns

 * [Bool](builtin-bool) val

 ### set\_time

 [[Source]](https://stdlib.ponylang.io/src/files/directory/#L286)

 Set the last access and modification times of the directory to the given values.

 
```
fun box set_time(
  atime: (I64 val , I64 val),
  mtime: (I64 val , I64 val))
: Bool val

```
 #### Parameters

 * atime: ([I64](builtin-i64) val , [I64](builtin-i64) val)
* mtime: ([I64](builtin-i64) val , [I64](builtin-i64) val)

 #### Returns

 * [Bool](builtin-bool) val

 ### infoat

 [[Source]](https://stdlib.ponylang.io/src/files/directory/#L293)

 Return a FileInfo for some path relative to this directory.

 
```
fun box infoat(
  target: String val)
: FileInfo val ?

```
 #### Parameters

 * target: [String](builtin-string) val

 #### Returns

 * [FileInfo](files-fileinfo) val ?

 ### chmodat

 [[Source]](https://stdlib.ponylang.io/src/files/directory/#L313)

 Set the FileMode for some path relative to this directory.

 
```
fun box chmodat(
  target: String val,
  mode: FileMode box)
: Bool val

```
 #### Parameters

 * target: [String](builtin-string) val
* mode: [FileMode](files-filemode) box

 #### Returns

 * [Bool](builtin-bool) val

 ### chownat

 [[Source]](https://stdlib.ponylang.io/src/files/directory/#L337)

 Set the FileMode for some path relative to this directory.

 
```
fun box chownat(
  target: String val,
  uid: U32 val,
  gid: U32 val)
: Bool val

```
 #### Parameters

 * target: [String](builtin-string) val
* uid: [U32](builtin-u32) val
* gid: [U32](builtin-u32) val

 #### Returns

 * [Bool](builtin-bool) val

 ### touchat

 [[Source]](https://stdlib.ponylang.io/src/files/directory/#L361)

 Set the last access and modification times of the directory to now.

 
```
fun box touchat(
  target: String val)
: Bool val

```
 #### Parameters

 * target: [String](builtin-string) val

 #### Returns

 * [Bool](builtin-bool) val

 ### set\_time\_at

 [[Source]](https://stdlib.ponylang.io/src/files/directory/#L367)

 Set the last access and modification times of the directory to the given values.

 
```
fun box set_time_at(
  target: String val,
  atime: (I64 val , I64 val),
  mtime: (I64 val , I64 val))
: Bool val

```
 #### Parameters

 * target: [String](builtin-string) val
* atime: ([I64](builtin-i64) val , [I64](builtin-i64) val)
* mtime: ([I64](builtin-i64) val , [I64](builtin-i64) val)

 #### Returns

 * [Bool](builtin-bool) val

 ### symlink

 [[Source]](https://stdlib.ponylang.io/src/files/directory/#L401)

 Link the source path to the link\_name, where the link\_name is relative to this directory.

 
```
fun box symlink(
  source: FilePath val,
  link_name: String val)
: Bool val

```
 #### Parameters

 * source: [FilePath](files-filepath) val
* link\_name: [String](builtin-string) val

 #### Returns

 * [Bool](builtin-bool) val

 ### remove

 [[Source]](https://stdlib.ponylang.io/src/files/directory/#L428)

 Remove the file or directory. The directory contents will be removed as well, recursively. Symlinks will be removed but not traversed.

 
```
fun box remove(
  target: String val)
: Bool val

```
 #### Parameters

 * target: [String](builtin-string) val

 #### Returns

 * [Bool](builtin-bool) val

 ### rename

 [[Source]](https://stdlib.ponylang.io/src/files/directory/#L467)

 Rename source (which is relative to this directory) to target (which is relative to the `to` directory).

 
```
fun box rename(
  source: String val,
  to: Directory box,
  target: String val)
: Bool val

```
 #### Parameters

 * source: [String](builtin-string) val
* to: [Directory](index) box
* target: [String](builtin-string) val

 #### Returns

 * [Bool](builtin-bool) val

 ### dispose

 [[Source]](https://stdlib.ponylang.io/src/files/directory/#L496)

 Close the directory.

 
```
fun ref dispose()
: None val

```
 #### Returns

 * [None](builtin-none) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/files-Directory>

FileExec
========

 [[Source]](https://stdlib.ponylang.io/src/files/file_caps/#L48)

 
```
primitive val FileExec

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/files/file_caps/#L48)

 
```
new val create()
: FileExec val^

```
 #### Returns

 * [FileExec](index) val^

 Public Functions
----------------

 ### value

 [[Source]](https://stdlib.ponylang.io/src/files/file_caps/#L49)

 
```
fun box value()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/files/file_caps/#L49)

 
```
fun box eq(
  that: FileExec val)
: Bool val

```
 #### Parameters

 * that: [FileExec](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/files/file_caps/#L49)

 
```
fun box ne(
  that: FileExec val)
: Bool val

```
 #### Parameters

 * that: [FileExec](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/files-FileExec>

FileErrNo
=========

 [[Source]](https://stdlib.ponylang.io/src/files/file/#L40)

 
```
type FileErrNo is
  (FileOK val | FileError val | FileEOF val | FileBadFileNumber val | FileExists val | FilePermissionDenied val)

```
 #### Type Alias For

 * ([FileOK](files-fileok) val | [FileError](files-fileerror) val | [FileEOF](files-fileeof) val | [FileBadFileNumber](files-filebadfilenumber) val | [FileExists](files-fileexists) val | [FilePermissionDenied](files-filepermissiondenied) val)



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/files-FileErrNo>

CreateFile
==========

 [[Source]](https://stdlib.ponylang.io/src/files/file/#L49)

 Open a File for read/write, creating if it doesn't exist, preserving the contents if it does exist.

 
```
primitive val CreateFile

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/files/file/#L49)

 
```
new val create()
: CreateFile val^

```
 #### Returns

 * [CreateFile](index) val^

 Public Functions
----------------

 ### apply

 [[Source]](https://stdlib.ponylang.io/src/files/file/#L54)

 
```
fun box apply(
  from: FilePath val)
: (File ref | FileOK val | FileError val | 
    FileEOF val | FileBadFileNumber val | FileExists val | 
    FilePermissionDenied val)

```
 #### Parameters

 * from: [FilePath](files-filepath) val

 #### Returns

 * ([File](files-file) ref | [FileOK](files-fileok) val | [FileError](files-fileerror) val | [FileEOF](files-fileeof) val | [FileBadFileNumber](files-filebadfilenumber) val | [FileExists](files-fileexists) val | [FilePermissionDenied](files-filepermissiondenied) val)

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/files/file/#L54)

 
```
fun box eq(
  that: CreateFile val)
: Bool val

```
 #### Parameters

 * that: [CreateFile](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/files/file/#L54)

 
```
fun box ne(
  that: CreateFile val)
: Bool val

```
 #### Parameters

 * that: [CreateFile](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/files-CreateFile>

File
====

 [[Source]](https://stdlib.ponylang.io/src/files/file/#L78)

 Operations on a file.

 
```
class ref File

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/files/file/#L101)

 Attempt to open for read/write, creating if it doesn't exist, preserving the contents if it does exist. Set errno according to result.

 
```
new ref create(
  from: FilePath val)
: File ref^

```
 #### Parameters

 * from: [FilePath](files-filepath) val

 #### Returns

 * [File](index) ref^

 ### open

 [[Source]](https://stdlib.ponylang.io/src/files/file/#L141)

 Open for read only. Set \_errno according to result.

 
```
new ref open(
  from: FilePath val)
: File ref^

```
 #### Parameters

 * from: [FilePath](files-filepath) val

 #### Returns

 * [File](index) ref^

 Public fields
-------------

 ### let path: [FilePath](files-filepath) val

 [[Source]](https://stdlib.ponylang.io/src/files/file/#L82)

 This is the filesystem path locating this file on the file system and an object capability granting access to operate on this file.

 ### let writeable: [Bool](builtin-bool) val

 [[Source]](https://stdlib.ponylang.io/src/files/file/#L88)

 `true` if the underlying file descriptor has been opened as writeable.

 Public Functions
----------------

 ### errno

 [[Source]](https://stdlib.ponylang.io/src/files/file/#L192)

 Returns the last error code set for this File

 
```
fun box errno()
: (FileOK val | FileError val | FileEOF val | 
    FileBadFileNumber val | FileExists val | FilePermissionDenied val)

```
 #### Returns

 * ([FileOK](files-fileok) val | [FileError](files-fileerror) val | [FileEOF](files-fileeof) val | [FileBadFileNumber](files-filebadfilenumber) val | [FileExists](files-fileexists) val | [FilePermissionDenied](files-filepermissiondenied) val)

 ### clear\_errno

 [[Source]](https://stdlib.ponylang.io/src/files/file/#L198)

 Clears the last error code set for this File. Clears the error indicator for the stream.

 
```
fun ref clear_errno()
: None val

```
 #### Returns

 * [None](builtin-none) val

 ### valid

 [[Source]](https://stdlib.ponylang.io/src/files/file/#L219)

 Returns true if the file is currently open.

 
```
fun box valid()
: Bool val

```
 #### Returns

 * [Bool](builtin-bool) val

 ### read

 [[Source]](https://stdlib.ponylang.io/src/files/file/#L226)

 Returns up to len bytes.

 
```
fun ref read(
  len: USize val)
: Array[U8 val] iso^

```
 #### Parameters

 * len: [USize](builtin-usize) val

 #### Returns

 * [Array](builtin-array)[[U8](builtin-u8) val] iso^

 ### read\_string

 [[Source]](https://stdlib.ponylang.io/src/files/file/#L252)

 Returns up to len bytes. The resulting string may have internal null characters.

 
```
fun ref read_string(
  len: USize val)
: String iso^

```
 #### Parameters

 * len: [USize](builtin-usize) val

 #### Returns

 * [String](builtin-string) iso^

 ### print

 [[Source]](https://stdlib.ponylang.io/src/files/file/#L277)

 Same as write, buts adds a newline.

 
```
fun ref print(
  data: (String box | Array[U8 val] box))
: Bool val

```
 #### Parameters

 * data: ([String](builtin-string) box | [Array](builtin-array)[[U8](builtin-u8) val] box)

 #### Returns

 * [Bool](builtin-bool) val

 ### printv

 [[Source]](https://stdlib.ponylang.io/src/files/file/#L286)

 Print an iterable collection of ByteSeqs.

 
```
fun ref printv(
  data: ByteSeqIter box)
: Bool val

```
 #### Parameters

 * data: [ByteSeqIter](builtin-byteseqiter) box

 #### Returns

 * [Bool](builtin-bool) val

 ### write

 [[Source]](https://stdlib.ponylang.io/src/files/file/#L297)

 Returns false if the file wasn't opened with write permission. Returns false and closes the file if not all the bytes were written.

 
```
fun ref write(
  data: (String box | Array[U8 val] box))
: Bool val

```
 #### Parameters

 * data: ([String](builtin-string) box | [Array](builtin-array)[[U8](builtin-u8) val] box)

 #### Returns

 * [Bool](builtin-bool) val

 ### writev

 [[Source]](https://stdlib.ponylang.io/src/files/file/#L306)

 Write an iterable collection of ByteSeqs.

 
```
fun ref writev(
  data: ByteSeqIter box)
: Bool val

```
 #### Parameters

 * data: [ByteSeqIter](builtin-byteseqiter) box

 #### Returns

 * [Bool](builtin-bool) val

 ### queue

 [[Source]](https://stdlib.ponylang.io/src/files/file/#L316)

 Queue data to be written NOTE: Queue'd data will always be written before normal print/write requested data

 
```
fun ref queue(
  data: (String box | Array[U8 val] box))
: None val

```
 #### Parameters

 * data: ([String](builtin-string) box | [Array](builtin-array)[[U8](builtin-u8) val] box)

 #### Returns

 * [None](builtin-none) val

 ### queuev

 [[Source]](https://stdlib.ponylang.io/src/files/file/#L325)

 Queue an iterable collection of ByteSeqs to be written NOTE: Queue'd data will always be written before normal print/write requested data

 
```
fun ref queuev(
  data: ByteSeqIter box)
: None val

```
 #### Parameters

 * data: [ByteSeqIter](builtin-byteseqiter) box

 #### Returns

 * [None](builtin-none) val

 ### flush

 [[Source]](https://stdlib.ponylang.io/src/files/file/#L335)

 Flush any queued data

 
```
fun ref flush()
: Bool val

```
 #### Returns

 * [Bool](builtin-bool) val

 ### position

 [[Source]](https://stdlib.ponylang.io/src/files/file/#L432)

 Return the current cursor position in the file.

 
```
fun ref position()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### size

 [[Source]](https://stdlib.ponylang.io/src/files/file/#L457)

 Return the total length of the file.

 
```
fun ref size()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### seek\_start

 [[Source]](https://stdlib.ponylang.io/src/files/file/#L467)

 Set the cursor position relative to the start of the file.

 
```
fun ref seek_start(
  offset: USize val)
: None val

```
 #### Parameters

 * offset: [USize](builtin-usize) val

 #### Returns

 * [None](builtin-none) val

 ### seek\_end

 [[Source]](https://stdlib.ponylang.io/src/files/file/#L475)

 Set the cursor position relative to the end of the file.

 
```
fun ref seek_end(
  offset: USize val)
: None val

```
 #### Parameters

 * offset: [USize](builtin-usize) val

 #### Returns

 * [None](builtin-none) val

 ### seek

 [[Source]](https://stdlib.ponylang.io/src/files/file/#L483)

 Move the cursor position.

 
```
fun ref seek(
  offset: ISize val)
: None val

```
 #### Parameters

 * offset: [ISize](builtin-isize) val

 #### Returns

 * [None](builtin-none) val

 ### sync

 [[Source]](https://stdlib.ponylang.io/src/files/file/#L491)

 Sync the file contents to physical storage.

 
```
fun ref sync()
: None val

```
 #### Returns

 * [None](builtin-none) val

 ### datasync

 [[Source]](https://stdlib.ponylang.io/src/files/file/#L511)

 Sync the file contents to physical storage.

 
```
fun ref datasync()
: None val

```
 #### Returns

 * [None](builtin-none) val

 ### set\_length

 [[Source]](https://stdlib.ponylang.io/src/files/file/#L530)

 Change the file size. If it is made larger, the new contents are undefined.

 
```
fun ref set_length(
  len: USize val)
: Bool val

```
 #### Parameters

 * len: [USize](builtin-usize) val

 #### Returns

 * [Bool](builtin-bool) val

 ### info

 [[Source]](https://stdlib.ponylang.io/src/files/file/#L560)

 Return a FileInfo for this directory. Raise an error if the fd is invalid or if we don't have FileStat permission.

 
```
fun box info()
: FileInfo val ?

```
 #### Returns

 * [FileInfo](files-fileinfo) val ?

 ### chmod

 [[Source]](https://stdlib.ponylang.io/src/files/file/#L567)

 Set the FileMode for this directory.

 
```
fun box chmod(
  mode: FileMode box)
: Bool val

```
 #### Parameters

 * mode: [FileMode](files-filemode) box

 #### Returns

 * [Bool](builtin-bool) val

 ### chown

 [[Source]](https://stdlib.ponylang.io/src/files/file/#L573)

 Set the owner and group for this directory. Does nothing on Windows.

 
```
fun box chown(
  uid: U32 val,
  gid: U32 val)
: Bool val

```
 #### Parameters

 * uid: [U32](builtin-u32) val
* gid: [U32](builtin-u32) val

 #### Returns

 * [Bool](builtin-bool) val

 ### touch

 [[Source]](https://stdlib.ponylang.io/src/files/file/#L579)

 Set the last access and modification times of the directory to now.

 
```
fun box touch()
: Bool val

```
 #### Returns

 * [Bool](builtin-bool) val

 ### set\_time

 [[Source]](https://stdlib.ponylang.io/src/files/file/#L585)

 Set the last access and modification times of the directory to the given values.

 
```
fun box set_time(
  atime: (I64 val , I64 val),
  mtime: (I64 val , I64 val))
: Bool val

```
 #### Parameters

 * atime: ([I64](builtin-i64) val , [I64](builtin-i64) val)
* mtime: ([I64](builtin-i64) val , [I64](builtin-i64) val)

 #### Returns

 * [Bool](builtin-bool) val

 ### lines

 [[Source]](https://stdlib.ponylang.io/src/files/file/#L592)

 Returns an iterator for reading lines from the file.

 
```
fun ref lines()
: FileLines ref

```
 #### Returns

 * [FileLines](files-filelines) ref

 ### dispose

 [[Source]](https://stdlib.ponylang.io/src/files/file/#L598)

 Close the file. Future operations will do nothing.

 
```
fun ref dispose()
: None val

```
 #### Returns

 * [None](builtin-none) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/files-File>

FilePermissionDenied
====================

 [[Source]](https://stdlib.ponylang.io/src/files/file/#L29)

 
```
primitive val FilePermissionDenied

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/files/file/#L29)

 
```
new val create()
: FilePermissionDenied val^

```
 #### Returns

 * [FilePermissionDenied](index) val^

 Public Functions
----------------

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/files/file/#L31)

 
```
fun box eq(
  that: FilePermissionDenied val)
: Bool val

```
 #### Parameters

 * that: [FilePermissionDenied](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/files/file/#L31)

 
```
fun box ne(
  that: FilePermissionDenied val)
: Bool val

```
 #### Parameters

 * that: [FilePermissionDenied](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/files-FilePermissionDenied>

OpenFile
========

 [[Source]](https://stdlib.ponylang.io/src/files/file/#L64)

 Open a File for read only.

 
```
primitive val OpenFile

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/files/file/#L64)

 
```
new val create()
: OpenFile val^

```
 #### Returns

 * [OpenFile](index) val^

 Public Functions
----------------

 ### apply

 [[Source]](https://stdlib.ponylang.io/src/files/file/#L68)

 
```
fun box apply(
  from: FilePath val)
: (File ref | FileOK val | FileError val | 
    FileEOF val | FileBadFileNumber val | FileExists val | 
    FilePermissionDenied val)

```
 #### Parameters

 * from: [FilePath](files-filepath) val

 #### Returns

 * ([File](files-file) ref | [FileOK](files-fileok) val | [FileError](files-fileerror) val | [FileEOF](files-fileeof) val | [FileBadFileNumber](files-filebadfilenumber) val | [FileExists](files-fileexists) val | [FilePermissionDenied](files-filepermissiondenied) val)

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/files/file/#L68)

 
```
fun box eq(
  that: OpenFile val)
: Bool val

```
 #### Parameters

 * that: [OpenFile](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/files/file/#L68)

 
```
fun box ne(
  that: OpenFile val)
: Bool val

```
 #### Parameters

 * that: [OpenFile](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/files-OpenFile>

Fact
====

 [[Source]](https://stdlib.ponylang.io/src/assert/assert/#L19)

 This is an assertion that is always enabled. If the test is false, it will print any supplied error message to stderr and raise an error.

 
```
primitive val Fact

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/assert/assert/#L19)

 
```
new val create()
: Fact val^

```
 #### Returns

 * [Fact](index) val^

 Public Functions
----------------

 ### apply

 [[Source]](https://stdlib.ponylang.io/src/assert/assert/#L24)

 
```
fun box apply(
  test: Bool val,
  msg: String val = "")
: None val ?

```
 #### Parameters

 * test: [Bool](builtin-bool) val
* msg: [String](builtin-string) val = ""

 #### Returns

 * [None](builtin-none) val ?

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/assert/assert/#L24)

 
```
fun box eq(
  that: Fact val)
: Bool val

```
 #### Parameters

 * that: [Fact](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/assert/assert/#L24)

 
```
fun box ne(
  that: Fact val)
: Bool val

```
 #### Parameters

 * that: [Fact](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/assert-Fact>

Assert
======

 [[Source]](https://stdlib.ponylang.io/src/assert/assert/#L9)

 This is a debug only assertion. If the test is false, it will print any supplied error message to stderr and raise an error.

 
```
primitive val Assert

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/assert/assert/#L9)

 
```
new val create()
: Assert val^

```
 #### Returns

 * [Assert](index) val^

 Public Functions
----------------

 ### apply

 [[Source]](https://stdlib.ponylang.io/src/assert/assert/#L14)

 
```
fun box apply(
  test: Bool val,
  msg: String val = "")
: None val ?

```
 #### Parameters

 * test: [Bool](builtin-bool) val
* msg: [String](builtin-string) val = ""

 #### Returns

 * [None](builtin-none) val ?

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/assert/assert/#L14)

 
```
fun box eq(
  that: Assert val)
: Bool val

```
 #### Parameters

 * that: [Assert](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/assert/assert/#L14)

 
```
fun box ne(
  that: Assert val)
: Bool val

```
 #### Parameters

 * that: [Assert](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/assert-Assert>

IniMap
======

 [[Source]](https://stdlib.ponylang.io/src/ini/ini_map/#L3)

 
```
type IniMap is
  HashMap[String val, HashMap[String val, String val, HashEq[String val] val] ref, HashEq[String val] val] ref

```
 #### Type Alias For

 * [HashMap](collections-hashmap)[[String](builtin-string) val, [HashMap](collections-hashmap)[[String](builtin-string) val, [String](builtin-string) val, [HashEq](collections-hasheq)[[String](builtin-string) val] val] ref, [HashEq](collections-hasheq)[[String](builtin-string) val] val] ref



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/ini-IniMap>

IniNotify
=========

 [[Source]](https://stdlib.ponylang.io/src/ini/ini/#L39)

 Notifications for INI parsing.

 
```
interface ref IniNotify

```
 Public Functions
----------------

 ### apply

 [[Source]](https://stdlib.ponylang.io/src/ini/ini/#L43)

 This is called for every valid entry in the INI file. If key/value pairs occur before a section name, the section can be an empty string. Return false to halt processing.

 
```
fun ref apply(
  section: String val,
  key: String val,
  value: String val)
: Bool val

```
 #### Parameters

 * section: [String](builtin-string) val
* key: [String](builtin-string) val
* value: [String](builtin-string) val

 #### Returns

 * [Bool](builtin-bool) val

 ### add\_section

 [[Source]](https://stdlib.ponylang.io/src/ini/ini/#L50)

 This is called for every valid section in the INI file. Return false to halt processing.

 
```
fun ref add_section(
  section: String val)
: Bool val

```
 #### Parameters

 * section: [String](builtin-string) val

 #### Returns

 * [Bool](builtin-bool) val

 ### errors

 [[Source]](https://stdlib.ponylang.io/src/ini/ini/#L57)

 This is called for each error encountered. Return false to halt processing.

 
```
fun ref errors(
  line: USize val,
  err: (IniIncompleteSection val | IniNoDelimiter val))
: Bool val

```
 #### Parameters

 * line: [USize](builtin-usize) val
* err: ([IniIncompleteSection](ini-iniincompletesection) val | [IniNoDelimiter](ini-ininodelimiter) val)

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/ini-IniNotify>

IniIncompleteSection
====================

 [[Source]](https://stdlib.ponylang.io/src/ini/ini/#L31)

 
```
primitive val IniIncompleteSection

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/ini/ini/#L31)

 
```
new val create()
: IniIncompleteSection val^

```
 #### Returns

 * [IniIncompleteSection](index) val^

 Public Functions
----------------

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/ini/ini/#L32)

 
```
fun box eq(
  that: IniIncompleteSection val)
: Bool val

```
 #### Parameters

 * that: [IniIncompleteSection](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/ini/ini/#L32)

 
```
fun box ne(
  that: IniIncompleteSection val)
: Bool val

```
 #### Parameters

 * that: [IniIncompleteSection](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/ini-IniIncompleteSection>

IniParse
========

 [[Source]](https://stdlib.ponylang.io/src/ini/ini_map/#L5)

 This is used to parse INI formatted text as a nested map of strings.

 
```
primitive val IniParse

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/ini/ini_map/#L5)

 
```
new val create()
: IniParse val^

```
 #### Returns

 * [IniParse](index) val^

 Public Functions
----------------

 ### apply

 [[Source]](https://stdlib.ponylang.io/src/ini/ini_map/#L9)

 This accepts a string iterator and returns a nested map of strings. If parsing fails, an error is raised.

 
```
fun box apply(
  lines: Iterator[String val] ref)
: HashMap[String val, HashMap[String val, String val, HashEq[String val] val] ref, HashEq[String val] val] ref^ ?

```
 #### Parameters

 * lines: [Iterator](builtin-iterator)[[String](builtin-string) val] ref

 #### Returns

 * [HashMap](collections-hashmap)[[String](builtin-string) val, [HashMap](collections-hashmap)[[String](builtin-string) val, [String](builtin-string) val, [HashEq](collections-hasheq)[[String](builtin-string) val] val] ref, [HashEq](collections-hasheq)[[String](builtin-string) val] val] ref^ ?

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/ini/ini_map/#L9)

 
```
fun box eq(
  that: IniParse val)
: Bool val

```
 #### Parameters

 * that: [IniParse](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/ini/ini_map/#L9)

 
```
fun box ne(
  that: IniParse val)
: Bool val

```
 #### Parameters

 * that: [IniParse](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/ini-IniParse>

Ini
===

 [[Source]](https://stdlib.ponylang.io/src/ini/ini/#L63)

 A streaming parser for INI formatted lines of test.

 
```
primitive val Ini

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/ini/ini/#L63)

 
```
new val create()
: Ini val^

```
 #### Returns

 * [Ini](index) val^

 Public Functions
----------------

 ### apply

 [[Source]](https://stdlib.ponylang.io/src/ini/ini/#L67)

 This accepts a string iterator and calls the IniNotify for each new entry. If any errors are encountered, this will return false. Otherwise, it returns true.

 
```
fun box apply(
  lines: Iterator[String box] ref,
  f: IniNotify ref)
: Bool val

```
 #### Parameters

 * lines: [Iterator](builtin-iterator)[[String](builtin-string) box] ref
* f: [IniNotify](ini-ininotify) ref

 #### Returns

 * [Bool](builtin-bool) val

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/ini/ini/#L67)

 
```
fun box eq(
  that: Ini val)
: Bool val

```
 #### Parameters

 * that: [Ini](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/ini/ini/#L67)

 
```
fun box ne(
  that: Ini val)
: Bool val

```
 #### Parameters

 * that: [Ini](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/ini-Ini>

IniNoDelimiter
==============

 [[Source]](https://stdlib.ponylang.io/src/ini/ini/#L32)

 
```
primitive val IniNoDelimiter

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/ini/ini/#L32)

 
```
new val create()
: IniNoDelimiter val^

```
 #### Returns

 * [IniNoDelimiter](index) val^

 Public Functions
----------------

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/ini/ini/#L34)

 
```
fun box eq(
  that: IniNoDelimiter val)
: Bool val

```
 #### Parameters

 * that: [IniNoDelimiter](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/ini/ini/#L34)

 
```
fun box ne(
  that: IniNoDelimiter val)
: Bool val

```
 #### Parameters

 * that: [IniNoDelimiter](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/ini-IniNoDelimiter>

StringArgument
==============

 [[Source]](https://stdlib.ponylang.io/src/options/options/#L69)

 
```
primitive val StringArgument

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/options/options/#L69)

 
```
new val create()
: StringArgument val^

```
 #### Returns

 * [StringArgument](index) val^

 Public Functions
----------------

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/options/options/#L70)

 
```
fun box eq(
  that: StringArgument val)
: Bool val

```
 #### Parameters

 * that: [StringArgument](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/options/options/#L70)

 
```
fun box ne(
  that: StringArgument val)
: Bool val

```
 #### Parameters

 * that: [StringArgument](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/options-StringArgument>

IniError
========

 [[Source]](https://stdlib.ponylang.io/src/ini/ini/#L34)

 
```
type IniError is
  (IniIncompleteSection val | IniNoDelimiter val)

```
 #### Type Alias For

 * ([IniIncompleteSection](ini-iniincompletesection) val | [IniNoDelimiter](ini-ininodelimiter) val)



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/ini-IniError>

Registrar
=========

 [[Source]](https://stdlib.ponylang.io/src/bureaucracy/registrar/#L4)

 A Registrar keeps a map of lookup string to anything. Generally, this is used to keep a directory of long-lived service-providing actors that can be looked up name.

 
```
actor tag Registrar

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/bureaucracy/registrar/#L4)

 
```
new tag create()
: Registrar tag^

```
 #### Returns

 * [Registrar](index) tag^

 Public Behaviours
-----------------

 ### update

 [[Source]](https://stdlib.ponylang.io/src/bureaucracy/registrar/#L12)

 Add, or change, a lookup mapping.

 
```
be update(
  key: String val,
  value: Any tag)

```
 #### Parameters

 * key: [String](builtin-string) val
* value: [Any](builtin-any) tag

 ### remove

 [[Source]](https://stdlib.ponylang.io/src/bureaucracy/registrar/#L18)

 Remove a mapping. This only takes effect if provided key currently maps to the provided value. If the key maps to some other value (perhaps after updating), the mapping won't be removed.

 
```
be remove(
  key: String val,
  value: Any tag)

```
 #### Parameters

 * key: [String](builtin-string) val
* value: [Any](builtin-any) tag

 Public Functions
----------------

 ### apply[optional A: [Any](builtin-any) tag]

 [[Source]](https://stdlib.ponylang.io/src/bureaucracy/registrar/#L30)

 Lookup by name. Returns a promise that will be fulfilled with the mapped value if it exists and is a subtype of A. Otherwise, the promise will be rejected.

 
```
fun tag apply[optional A: Any tag](
  key: String val)
: Promise[A] tag

```
 #### Parameters

 * key: [String](builtin-string) val

 #### Returns

 * [Promise](promises-promise)[A] tag



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/bureaucracy-Registrar>

I64Argument
===========

 [[Source]](https://stdlib.ponylang.io/src/options/options/#L70)

 
```
primitive val I64Argument

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/options/options/#L70)

 
```
new val create()
: I64Argument val^

```
 #### Returns

 * [I64Argument](index) val^

 Public Functions
----------------

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/options/options/#L71)

 
```
fun box eq(
  that: I64Argument val)
: Bool val

```
 #### Parameters

 * that: [I64Argument](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/options/options/#L71)

 
```
fun box ne(
  that: I64Argument val)
: Bool val

```
 #### Parameters

 * that: [I64Argument](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/options-I64Argument>

Custodian
=========

 [[Source]](https://stdlib.ponylang.io/src/bureaucracy/custodian/#L21)

 A Custodian keeps a set of actors to dispose. When the Custodian is disposed, it disposes of the actors in its set and then clears the set.

 Example program
---------------

 Imagine you have a program with 3 actors that you need to shutdown when it receives a TERM signal. We can set up a Custodian that knows about each of our actors and when a TERM signal is received, is disposed of.

 
```
use "bureaucracy"
use "signals"

actor Actor1
  be dispose() => None // dispose of resources here.

actor Actor2
  be dispose() => None // dispose of resources here.

actor Actor3
  be dispose() => None // dispose of resources here.

actor Main
  new create(env: Env) =>
    let actor1 = Actor1
    let actor2 = Actor2
    let actor3 = Actor3

    let custodian = Custodian
    custodian(actor1)
    custodian(actor2)
    custodian(actor3)

    SignalHandler(TermHandler(custodian), Sig.term())

class TermHandler is SignalNotify
  let _custodian: Custodian

  new iso create(custodian: Custodian) =>
    _custodian = custodian

  fun ref apply(count: U32): Bool =>
    _custodian.dispose()
    true

```
 
```
actor tag Custodian

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/bureaucracy/custodian/#L21)

 
```
new tag create()
: Custodian tag^

```
 #### Returns

 * [Custodian](index) tag^

 Public Behaviours
-----------------

 ### apply

 [[Source]](https://stdlib.ponylang.io/src/bureaucracy/custodian/#L71)

 Add an actor to be disposed of.

 
```
be apply(
  worker: DisposableActor tag)

```
 #### Parameters

 * worker: [DisposableActor](builtin-disposableactor) tag

 ### remove

 [[Source]](https://stdlib.ponylang.io/src/bureaucracy/custodian/#L77)

 Removes an actor from the set of things to be disposed.

 
```
be remove(
  worker: DisposableActor tag)

```
 #### Parameters

 * worker: [DisposableActor](builtin-disposableactor) tag

 ### dispose

 [[Source]](https://stdlib.ponylang.io/src/bureaucracy/custodian/#L83)

 Dispose of the actors in the set and then clear the set.

 
```
be dispose()

```


 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/bureaucracy-Custodian>

F64Argument
===========

 [[Source]](https://stdlib.ponylang.io/src/options/options/#L72)

 
```
primitive val F64Argument

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/options/options/#L72)

 
```
new val create()
: F64Argument val^

```
 #### Returns

 * [F64Argument](index) val^

 Public Functions
----------------

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/options/options/#L73)

 
```
fun box eq(
  that: F64Argument val)
: Bool val

```
 #### Parameters

 * that: [F64Argument](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/options/options/#L73)

 
```
fun box ne(
  that: F64Argument val)
: Bool val

```
 #### Parameters

 * that: [F64Argument](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/options-F64Argument>

Optional
========

 [[Source]](https://stdlib.ponylang.io/src/options/options/#L74)

 
```
primitive val Optional

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/options/options/#L74)

 
```
new val create()
: Optional val^

```
 #### Returns

 * [Optional](index) val^

 Public Functions
----------------

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/options/options/#L76)

 
```
fun box eq(
  that: Optional val)
: Bool val

```
 #### Parameters

 * that: [Optional](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/options/options/#L76)

 
```
fun box ne(
  that: Optional val)
: Bool val

```
 #### Parameters

 * that: [Optional](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/options-Optional>

U64Argument
===========

 [[Source]](https://stdlib.ponylang.io/src/options/options/#L71)

 
```
primitive val U64Argument

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/options/options/#L71)

 
```
new val create()
: U64Argument val^

```
 #### Returns

 * [U64Argument](index) val^

 Public Functions
----------------

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/options/options/#L72)

 
```
fun box eq(
  that: U64Argument val)
: Bool val

```
 #### Parameters

 * that: [U64Argument](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/options/options/#L72)

 
```
fun box ne(
  that: U64Argument val)
: Bool val

```
 #### Parameters

 * that: [U64Argument](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/options-U64Argument>

Required
========

 [[Source]](https://stdlib.ponylang.io/src/options/options/#L73)

 
```
primitive val Required

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/options/options/#L73)

 
```
new val create()
: Required val^

```
 #### Returns

 * [Required](index) val^

 Public Functions
----------------

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/options/options/#L74)

 
```
fun box eq(
  that: Required val)
: Bool val

```
 #### Parameters

 * that: [Required](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/options/options/#L74)

 
```
fun box ne(
  that: Required val)
: Bool val

```
 #### Parameters

 * that: [Required](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/options-Required>

AmbiguousMatch
==============

 [[Source]](https://stdlib.ponylang.io/src/options/options/#L77)

 
```
primitive val AmbiguousMatch

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/options/options/#L77)

 
```
new val create()
: AmbiguousMatch val^

```
 #### Returns

 * [AmbiguousMatch](index) val^

 Public Functions
----------------

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/options/options/#L78)

 
```
fun box eq(
  that: AmbiguousMatch val)
: Bool val

```
 #### Parameters

 * that: [AmbiguousMatch](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/options/options/#L78)

 
```
fun box ne(
  that: AmbiguousMatch val)
: Bool val

```
 #### Parameters

 * that: [AmbiguousMatch](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/options-AmbiguousMatch>

ArgumentType
============

 [[Source]](https://stdlib.ponylang.io/src/options/options/#L81)

 
```
type ArgumentType is
  (None val | StringArgument val | I64Argument val | U64Argument val | F64Argument val)

```
 #### Type Alias For

 * ([None](builtin-none) val | [StringArgument](options-stringargument) val | [I64Argument](options-i64argument) val | [U64Argument](options-u64argument) val | [F64Argument](options-f64argument) val)



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/options-ArgumentType>

ParsedOption
============

 [[Source]](https://stdlib.ponylang.io/src/options/options/#L96)

 
```
type ParsedOption is
  (String val , (None val | String val | I64 val | U64 val | F64 val))

```
 #### Type Alias For

 * ([String](builtin-string) val , ([None](builtin-none) val | [String](builtin-string) val | [I64](builtin-i64) val | [U64](builtin-u64) val | [F64](builtin-f64) val))



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/options-ParsedOption>

MissingArgument
===============

 [[Source]](https://stdlib.ponylang.io/src/options/options/#L78)

 
```
primitive val MissingArgument

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/options/options/#L78)

 
```
new val create()
: MissingArgument val^

```
 #### Returns

 * [MissingArgument](index) val^

 Public Functions
----------------

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/options/options/#L79)

 
```
fun box eq(
  that: MissingArgument val)
: Bool val

```
 #### Parameters

 * that: [MissingArgument](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/options/options/#L79)

 
```
fun box ne(
  that: MissingArgument val)
: Bool val

```
 #### Parameters

 * that: [MissingArgument](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/options-MissingArgument>

ErrorReason
===========

 [[Source]](https://stdlib.ponylang.io/src/options/options/#L89)

 
```
type ErrorReason is
  (UnrecognisedOption val | MissingArgument val | InvalidArgument val | AmbiguousMatch val)

```
 #### Type Alias For

 * ([UnrecognisedOption](options-unrecognisedoption) val | [MissingArgument](options-missingargument) val | [InvalidArgument](options-invalidargument) val | [AmbiguousMatch](options-ambiguousmatch) val)



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/options-ErrorReason>

UnrecognisedOption
==================

 [[Source]](https://stdlib.ponylang.io/src/options/options/#L76)

 
```
primitive val UnrecognisedOption

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/options/options/#L76)

 
```
new val create()
: UnrecognisedOption val^

```
 #### Returns

 * [UnrecognisedOption](index) val^

 Public Functions
----------------

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/options/options/#L77)

 
```
fun box eq(
  that: UnrecognisedOption val)
: Bool val

```
 #### Parameters

 * that: [UnrecognisedOption](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/options/options/#L77)

 
```
fun box ne(
  that: UnrecognisedOption val)
: Bool val

```
 #### Parameters

 * that: [UnrecognisedOption](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/options-UnrecognisedOption>

InvalidArgument
===============

 [[Source]](https://stdlib.ponylang.io/src/options/options/#L79)

 
```
primitive val InvalidArgument

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/options/options/#L79)

 
```
new val create()
: InvalidArgument val^

```
 #### Returns

 * [InvalidArgument](index) val^

 Public Functions
----------------

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/options/options/#L81)

 
```
fun box eq(
  that: InvalidArgument val)
: Bool val

```
 #### Parameters

 * that: [InvalidArgument](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/options/options/#L81)

 
```
fun box ne(
  that: InvalidArgument val)
: Bool val

```
 #### Parameters

 * that: [InvalidArgument](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/options-InvalidArgument>

CapRights0
==========

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap_rights/#L5)

 Version 0 of the capsicum cap\_rights\_t structure.

 
```
class ref CapRights0

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap_rights/#L12)

 Initialises with no rights.

 
```
new ref create()
: CapRights0 ref^

```
 #### Returns

 * [CapRights0](index) ref^

 ### from

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap_rights/#L18)

 Initialises with the rights from a FileCaps.

 
```
new ref from(
  caps: Flags[(FileCreate val | FileChmod val | FileChown val | FileLink val | FileLookup val | FileMkdir val | FileRead val | FileRemove val | FileRename val | FileSeek val | FileStat val | FileSync val | FileTime val | FileTruncate val | FileWrite val | FileExec val), U32 val] box)
: CapRights0 ref^

```
 #### Parameters

 * caps: [Flags](collections-flags)[([FileCreate](files-filecreate) val | [FileChmod](files-filechmod) val | [FileChown](files-filechown) val | [FileLink](files-filelink) val | [FileLookup](files-filelookup) val | [FileMkdir](files-filemkdir) val | [FileRead](files-fileread) val | [FileRemove](files-fileremove) val | [FileRename](files-filerename) val | [FileSeek](files-fileseek) val | [FileStat](files-filestat) val | [FileSync](files-filesync) val | [FileTime](files-filetime) val | [FileTruncate](files-filetruncate) val | [FileWrite](files-filewrite) val | [FileExec](files-fileexec) val), [U32](builtin-u32) val] box

 #### Returns

 * [CapRights0](index) ref^

 ### descriptor

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap_rights/#L52)

 Initialises with the rights on the given file descriptor.

 
```
new ref descriptor(
  fd: I32 val)
: CapRights0 ref^

```
 #### Parameters

 * fd: [I32](builtin-i32) val

 #### Returns

 * [CapRights0](index) ref^

 Public Functions
----------------

 ### set

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap_rights/#L60)

 
```
fun ref set(
  cap: U64 val)
: None val

```
 #### Parameters

 * cap: [U64](builtin-u64) val

 #### Returns

 * [None](builtin-none) val

 ### unset

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap_rights/#L65)

 
```
fun ref unset(
  cap: U64 val)
: None val

```
 #### Parameters

 * cap: [U64](builtin-u64) val

 #### Returns

 * [None](builtin-none) val

 ### limit

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap_rights/#L70)

 Limits the fd to the encoded rights.

 
```
fun box limit(
  fd: I32 val)
: Bool val

```
 #### Parameters

 * fd: [I32](builtin-i32) val

 #### Returns

 * [Bool](builtin-bool) val

 ### merge

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap_rights/#L80)

 Merge the rights in that into this.

 
```
fun ref merge(
  that: CapRights0 ref)
: None val

```
 #### Parameters

 * that: [CapRights0](index) ref

 #### Returns

 * [None](builtin-none) val

 ### remove

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap_rights/#L88)

 Remove the rights in that from this.

 
```
fun ref remove(
  that: CapRights0 ref)
: None val

```
 #### Parameters

 * that: [CapRights0](index) ref

 #### Returns

 * [None](builtin-none) val

 ### clear

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap_rights/#L96)

 Clear all rights.

 
```
fun ref clear()
: None val

```
 #### Returns

 * [None](builtin-none) val

 ### contains

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap_rights/#L104)

 Check that this is a superset of the rights in that.

 
```
fun box contains(
  that: CapRights0 ref)
: Bool val

```
 #### Parameters

 * that: [CapRights0](index) ref

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/capsicum-CapRights0>

ParseError
==========

 [[Source]](https://stdlib.ponylang.io/src/options/options/#L98)

 
```
interface ref ParseError

```
 Public Functions
----------------

 ### reason

 [[Source]](https://stdlib.ponylang.io/src/options/options/#L99)

 
```
fun box reason()
: (UnrecognisedOption val | MissingArgument val | InvalidArgument val | 
    AmbiguousMatch val)

```
 #### Returns

 * ([UnrecognisedOption](options-unrecognisedoption) val | [MissingArgument](options-missingargument) val | [InvalidArgument](options-invalidargument) val | [AmbiguousMatch](options-ambiguousmatch) val)

 ### report

 [[Source]](https://stdlib.ponylang.io/src/options/options/#L100)

 
```
fun box report(
  out: OutStream tag)
: None val

```
 #### Parameters

 * out: [OutStream](builtin-outstream) tag

 #### Returns

 * [None](builtin-none) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/options-ParseError>

EnvVars
=======

 [[Source]](https://stdlib.ponylang.io/src/options/env_vars/#L3)

 
```
primitive val EnvVars

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/options/env_vars/#L3)

 
```
new val create()
: EnvVars val^

```
 #### Returns

 * [EnvVars](index) val^

 Public Functions
----------------

 ### apply

 [[Source]](https://stdlib.ponylang.io/src/options/env_vars/#L4)

 Turns an array of strings that look like environment variables, ie key=value, into a map from string to string.

 
```
fun box apply(
  from: Array[String val] val)
: HashMap[String val, String val, HashEq[String val] val] val

```
 #### Parameters

 * from: [Array](builtin-array)[[String](builtin-string) val] val

 #### Returns

 * [HashMap](collections-hashmap)[[String](builtin-string) val, [String](builtin-string) val, [HashEq](collections-hasheq)[[String](builtin-string) val] val] val

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/options/env_vars/#L4)

 
```
fun box eq(
  that: EnvVars val)
: Bool val

```
 #### Parameters

 * that: [EnvVars](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/options/env_vars/#L4)

 
```
fun box ne(
  that: EnvVars val)
: Bool val

```
 #### Parameters

 * that: [EnvVars](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/options-EnvVars>

Options
=======

 [[Source]](https://stdlib.ponylang.io/src/options/options/#L102)

 
```
class ref Options is
  Iterator[((String val , (None val | String val | I64 val | U64 val | F64 val)) | ParseError ref | None val)] ref

```
 #### Implements

 * [Iterator](builtin-iterator)[(([String](builtin-string) val , ([None](builtin-none) val | [String](builtin-string) val | [I64](builtin-i64) val | [U64](builtin-u64) val | [F64](builtin-f64) val)) | [ParseError](options-parseerror) ref | [None](builtin-none) val)] ref

 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/options/options/#L109)

 
```
new ref create(
  args: Array[String val] box,
  fatal: Bool val = true)
: Options ref^

```
 #### Parameters

 * args: [Array](builtin-array)[[String](builtin-string) val] box
* fatal: [Bool](builtin-bool) val = true

 #### Returns

 * [Options](index) ref^

 Public Functions
----------------

 ### add

 [[Source]](https://stdlib.ponylang.io/src/options/options/#L117)

 Adds a new named option to the parser configuration.

 
```
fun ref add(
  long: String val,
  short: (None val | String val) = reference,
  arg: (None val | StringArgument val | I64Argument val | 
    U64Argument val | F64Argument val) = reference,
  mode: (Required val | Optional val) = reference)
: Options ref

```
 #### Parameters

 * long: [String](builtin-string) val
* short: ([None](builtin-none) val | [String](builtin-string) val) = reference
* arg: ([None](builtin-none) val | [StringArgument](options-stringargument) val | [I64Argument](options-i64argument) val | [U64Argument](options-u64argument) val | [F64Argument](options-f64argument) val) = reference
* mode: ([Required](options-required) val | [Optional](options-optional) val) = reference

 #### Returns

 * [Options](index) ref

 ### remaining

 [[Source]](https://stdlib.ponylang.io/src/options/options/#L130)

 Returns all unprocessed command line arguments. After parsing all options, this will only include positional arguments, potentially unrecognised and ambiguous options and invalid arguments.

 
```
fun ref remaining()
: Array[String ref] ref

```
 #### Returns

 * [Array](builtin-array)[[String](builtin-string) ref] ref

 ### has\_next

 [[Source]](https://stdlib.ponylang.io/src/options/options/#L250)

 Parsing options is done if either an error occurs and fatal error reporting is turned on, or if all command line arguments have been processed.

 
```
fun box has_next()
: Bool val

```
 #### Returns

 * [Bool](builtin-bool) val

 ### next

 [[Source]](https://stdlib.ponylang.io/src/options/options/#L257)

 Skips all positional arguments and attemps to match named options. Returns a ParsedOption on success, a ParseError on error, or None if no named options are found.

 
```
fun ref next()
: ((String val , (None val | String val | I64 val | 
    U64 val | F64 val)) | ParseError ref | None val)

```
 #### Returns

 * (([String](builtin-string) val , ([None](builtin-none) val | [String](builtin-string) val | [I64](builtin-i64) val | [U64](builtin-u64) val | [F64](builtin-f64) val)) | [ParseError](options-parseerror) ref | [None](builtin-none) val)



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/options-Options>

DebugStream
===========

 [[Source]](https://stdlib.ponylang.io/src/debug/debug/#L22)

 
```
type DebugStream is
  (DebugOut val | DebugErr val)

```
 #### Type Alias For

 * ([DebugOut](debug-debugout) val | [DebugErr](debug-debugerr) val)



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/debug-DebugStream>

Cap
===

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap/#L1)

 The Capsicum rights.

 
```
primitive val Cap

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap/#L1)

 
```
new val create()
: Cap val^

```
 #### Returns

 * [Cap](index) val^

 Public Functions
----------------

 ### enter

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap/#L5)

 This places the current process into capability mode, a mode of execution in which processes may only issue system calls operating on file descriptors or reading limited global system state. Access to global name spaces, such as file system or IPC name spaces, is prevented.

 
```
fun box enter()
: Bool val

```
 #### Returns

 * [Bool](builtin-bool) val

 ### read

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap/#L18)

 
```
fun box read()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### write

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap/#L19)

 
```
fun box write()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### seek\_tell

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap/#L20)

 
```
fun box seek_tell()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### seek

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap/#L21)

 
```
fun box seek()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### pread

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap/#L22)

 
```
fun box pread()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### pwrite

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap/#L23)

 
```
fun box pwrite()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### mmap

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap/#L25)

 
```
fun box mmap()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### mmap\_r

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap/#L26)

 
```
fun box mmap_r()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### mmap\_w

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap/#L27)

 
```
fun box mmap_w()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### mmap\_x

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap/#L28)

 
```
fun box mmap_x()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### mmap\_rw

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap/#L29)

 
```
fun box mmap_rw()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### mmap\_rx

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap/#L30)

 
```
fun box mmap_rx()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### mmap\_wx

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap/#L31)

 
```
fun box mmap_wx()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### mmap\_rwx

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap/#L32)

 
```
fun box mmap_rwx()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### creat

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap/#L34)

 
```
fun box creat()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### fexecve

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap/#L35)

 
```
fun box fexecve()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### fsync

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap/#L36)

 
```
fun box fsync()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### ftruncate

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap/#L37)

 
```
fun box ftruncate()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### lookup

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap/#L38)

 
```
fun box lookup()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### fchdir

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap/#L39)

 
```
fun box fchdir()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### fchflags

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap/#L40)

 
```
fun box fchflags()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### chflagsat

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap/#L41)

 
```
fun box chflagsat()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### fchmod

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap/#L42)

 
```
fun box fchmod()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### fchmodat

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap/#L43)

 
```
fun box fchmodat()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### fchown

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap/#L44)

 
```
fun box fchown()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### fchownat

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap/#L45)

 
```
fun box fchownat()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### fcntl

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap/#L46)

 
```
fun box fcntl()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### flock

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap/#L47)

 
```
fun box flock()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### fpathconf

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap/#L48)

 
```
fun box fpathconf()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### fsck

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap/#L49)

 
```
fun box fsck()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### fstat

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap/#L50)

 
```
fun box fstat()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### fstatat

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap/#L51)

 
```
fun box fstatat()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### fstatfs

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap/#L52)

 
```
fun box fstatfs()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### futimes

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap/#L53)

 
```
fun box futimes()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### futimesat

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap/#L54)

 
```
fun box futimesat()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### linkat

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap/#L56)

 
```
fun box linkat()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### mkdirat

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap/#L57)

 
```
fun box mkdirat()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### mkfifoat

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap/#L58)

 
```
fun box mkfifoat()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### mknodat

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap/#L59)

 
```
fun box mknodat()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### renameat

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap/#L60)

 
```
fun box renameat()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### symlinkat

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap/#L61)

 
```
fun box symlinkat()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### unlinkat

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap/#L62)

 
```
fun box unlinkat()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### accept

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap/#L64)

 
```
fun box accept()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### bind

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap/#L65)

 
```
fun box bind()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### connect

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap/#L66)

 
```
fun box connect()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### getpeername

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap/#L67)

 
```
fun box getpeername()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### getsockname

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap/#L68)

 
```
fun box getsockname()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### getsockopt

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap/#L69)

 
```
fun box getsockopt()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### listen

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap/#L70)

 
```
fun box listen()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### peeloff

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap/#L71)

 
```
fun box peeloff()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### recv

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap/#L72)

 
```
fun box recv()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### send

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap/#L73)

 
```
fun box send()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### setsockopt

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap/#L74)

 
```
fun box setsockopt()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### shutdown

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap/#L75)

 
```
fun box shutdown()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### bindat

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap/#L76)

 
```
fun box bindat()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### connectat

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap/#L77)

 
```
fun box connectat()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### sock\_client

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap/#L79)

 
```
fun box sock_client()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### sock\_server

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap/#L83)

 
```
fun box sock_server()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### mac\_get

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap/#L87)

 
```
fun box mac_get()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### mac\_set

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap/#L88)

 
```
fun box mac_set()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### sem\_getvalue

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap/#L90)

 
```
fun box sem_getvalue()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### sem\_post

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap/#L91)

 
```
fun box sem_post()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### sem\_wait

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap/#L92)

 
```
fun box sem_wait()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### event

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap/#L94)

 
```
fun box event()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### kqueue\_event

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap/#L95)

 
```
fun box kqueue_event()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### ioctl

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap/#L96)

 
```
fun box ioctl()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### ttyhook

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap/#L97)

 
```
fun box ttyhook()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### pdgetpid

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap/#L99)

 
```
fun box pdgetpid()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### pdwait

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap/#L100)

 
```
fun box pdwait()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### pdkill

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap/#L101)

 
```
fun box pdkill()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### exattr\_delete

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap/#L103)

 
```
fun box exattr_delete()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### exattr\_get

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap/#L104)

 
```
fun box exattr_get()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### exattr\_list

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap/#L105)

 
```
fun box exattr_list()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### exattr\_set

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap/#L106)

 
```
fun box exattr_set()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### acl\_check

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap/#L108)

 
```
fun box acl_check()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### acl\_delete

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap/#L109)

 
```
fun box acl_delete()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### acl\_get

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap/#L110)

 
```
fun box acl_get()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### acl\_set

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap/#L111)

 
```
fun box acl_set()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### kqueue\_change

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap/#L113)

 
```
fun box kqueue_change()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### kqueue

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap/#L114)

 
```
fun box kqueue()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap/#L5)

 
```
fun box eq(
  that: Cap val)
: Bool val

```
 #### Parameters

 * that: [Cap](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap/#L5)

 
```
fun box ne(
  that: Cap val)
: Bool val

```
 #### Parameters

 * that: [Cap](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/capsicum-Cap>

CapRights
=========

 [[Source]](https://stdlib.ponylang.io/src/capsicum/cap_rights/#L3)

 
```
type CapRights is
  CapRights0 ref

```
 #### Type Alias For

 * [CapRights0](capsicum-caprights0) ref



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/capsicum-CapRights>

DebugOut
========

 [[Source]](https://stdlib.ponylang.io/src/debug/debug/#L19)

 
```
primitive val DebugOut

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/debug/debug/#L19)

 
```
new val create()
: DebugOut val^

```
 #### Returns

 * [DebugOut](index) val^

 Public Functions
----------------

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/debug/debug/#L20)

 
```
fun box eq(
  that: DebugOut val)
: Bool val

```
 #### Parameters

 * that: [DebugOut](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/debug/debug/#L20)

 
```
fun box ne(
  that: DebugOut val)
: Bool val

```
 #### Parameters

 * that: [DebugOut](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/debug-DebugOut>

Debug
=====

 [[Source]](https://stdlib.ponylang.io/src/debug/debug/#L24)

 This is a debug only print utility.

 
```
primitive val Debug

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/debug/debug/#L24)

 
```
new val create()
: Debug val^

```
 #### Returns

 * [Debug](index) val^

 Public Functions
----------------

 ### apply

 [[Source]](https://stdlib.ponylang.io/src/debug/debug/#L28)

 If platform is debug configured, print either a single stringable or a sequence of stringables. The default separator is ", ", and the default output stream is stdout.

 
```
fun box apply(
  msg: (Stringable box | ReadSeq[Stringable box] box),
  sep: String val = ", ",
  stream: (DebugOut val | DebugErr val) = reference)
: None val

```
 #### Parameters

 * msg: ([Stringable](builtin-stringable) box | [ReadSeq](builtin-readseq)[[Stringable](builtin-stringable) box] box)
* sep: [String](builtin-string) val = ", "
* stream: ([DebugOut](debug-debugout) val | [DebugErr](debug-debugerr) val) = reference

 #### Returns

 * [None](builtin-none) val

 ### out

 [[Source]](https://stdlib.ponylang.io/src/debug/debug/#L47)

 If platform is debug configured, print message to standard output

 
```
fun box out(
  msg: Stringable box = "")
: None val

```
 #### Parameters

 * msg: [Stringable](builtin-stringable) box = ""

 #### Returns

 * [None](builtin-none) val

 ### err

 [[Source]](https://stdlib.ponylang.io/src/debug/debug/#L53)

 If platform is debug configured, print message to standard error

 
```
fun box err(
  msg: Stringable box = "")
: None val

```
 #### Parameters

 * msg: [Stringable](builtin-stringable) box = ""

 #### Returns

 * [None](builtin-none) val

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/debug/debug/#L28)

 
```
fun box eq(
  that: Debug val)
: Bool val

```
 #### Parameters

 * that: [Debug](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/debug/debug/#L28)

 
```
fun box ne(
  that: Debug val)
: Bool val

```
 #### Parameters

 * that: [Debug](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/debug-Debug>

JsonDoc
=======

 [[Source]](https://stdlib.ponylang.io/src/json/json_doc/#L4)

 Top level JSON type containing an entire document. A JSON document consists of exactly 1 value.

 
```
class ref JsonDoc

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/json/json_doc/#L24)

 Default constructor building a document containing a single null.

 
```
new ref create()
: JsonDoc ref^

```
 #### Returns

 * [JsonDoc](index) ref^

 Public fields
-------------

 ### var data: ([F64](builtin-f64) val | [I64](builtin-i64) val | [Bool](builtin-bool) val |

 
```
[None](builtin-None.md) val | [String](builtin-String.md) val | [JsonArray](json-JsonArray.md) ref | 
[JsonObject](json-JsonObject.md) ref)

```
 [[Source]](https://stdlib.ponylang.io/src/json/json_doc/#L9)

 The parsed JSON structure.

 Will be a `None` if `parse(source: String)` has not been called yet.

 Public Functions
----------------

 ### string

 [[Source]](https://stdlib.ponylang.io/src/json/json_doc/#L30)

 Generate string representation of this document.

 
```
fun box string(
  indent: String val = "",
  pretty_print: Bool val = false)
: String val

```
 #### Parameters

 * indent: [String](builtin-string) val = ""
* pretty\_print: [Bool](builtin-bool) val = false

 #### Returns

 * [String](builtin-string) val

 ### parse

 [[Source]](https://stdlib.ponylang.io/src/json/json_doc/#L40)

 Parse the given string as a JSON file, building a document. Raise error on invalid JSON in given source.

 
```
fun ref parse(
  source: String val)
: None val ?

```
 #### Parameters

 * source: [String](builtin-string) val

 #### Returns

 * [None](builtin-none) val ?

 ### parse\_report

 [[Source]](https://stdlib.ponylang.io/src/json/json_doc/#L62)

 Give details of the error that occurred last time we attempted to parse. If parse was successful returns (0, "").

 
```
fun box parse_report()
: (USize val , String val)

```
 #### Returns

 * ([USize](builtin-usize) val , [String](builtin-string) val)



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/json-JsonDoc>

JsonObject
==========

 [[Source]](https://stdlib.ponylang.io/src/json/json_type/#L77)

 
```
class ref JsonObject

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/json/json_type/#L84)

 Create a map with space for prealloc elements without triggering a resize. Defaults to 6.

 
```
new ref create(
  prealloc: USize val = 6)
: JsonObject ref^

```
 #### Parameters

 * prealloc: [USize](builtin-usize) val = 6

 #### Returns

 * [JsonObject](index) ref^

 ### from\_map

 [[Source]](https://stdlib.ponylang.io/src/json/json_type/#L91)

 Create a Json object from a map.

 
```
new ref from_map(
  data': HashMap[String val, (F64 val | I64 val | Bool val | None val | String val | JsonArray ref | JsonObject ref), HashEq[String val] val] ref)
: JsonObject ref^

```
 #### Parameters

 * data': [HashMap](collections-hashmap)[[String](builtin-string) val, ([F64](builtin-f64) val | [I64](builtin-i64) val | [Bool](builtin-bool) val | [None](builtin-none) val | [String](builtin-string) val | [JsonArray](json-jsonarray) ref | [JsonObject](index) ref), [HashEq](collections-hasheq)[[String](builtin-string) val] val] ref

 #### Returns

 * [JsonObject](index) ref^

 Public fields
-------------

 ### var data: [HashMap](collections-hashmap)[[String](builtin-string) val, ([F64](builtin-f64) val | [I64](builtin-i64) val | [Bool](builtin-bool) val | [None](builtin-none) val | [String](builtin-string) val | [JsonArray](json-jsonarray) ref | [JsonObject](index) ref), [HashEq](collections-hasheq)[[String](builtin-string) val] val] ref

 [[Source]](https://stdlib.ponylang.io/src/json/json_type/#L78)

 The actual JSON object structure, mapping `String` keys to other JSON structures.

 Public Functions
----------------

 ### string

 [[Source]](https://stdlib.ponylang.io/src/json/json_type/#L97)

 Generate string representation of this object.

 
```
fun box string(
  indent: String val = "",
  pretty_print: Bool val = false)
: String val

```
 #### Parameters

 * indent: [String](builtin-string) val = ""
* pretty\_print: [Bool](builtin-bool) val = false

 #### Returns

 * [String](builtin-string) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/json-JsonObject>

JsonArray
=========

 [[Source]](https://stdlib.ponylang.io/src/json/json_type/#L8)

 
```
class ref JsonArray

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/json/json_type/#L14)

 Create an array with zero elements, but space for len elements.

 
```
new ref create(
  len: USize val = 0)
: JsonArray ref^

```
 #### Parameters

 * len: [USize](builtin-usize) val = 0

 #### Returns

 * [JsonArray](index) ref^

 ### from\_array

 [[Source]](https://stdlib.ponylang.io/src/json/json_type/#L20)

 Create a Json array from an actual array.

 
```
new ref from_array(
  data': Array[(F64 val | I64 val | Bool val | None val | String val | JsonArray ref | JsonObject ref)] ref)
: JsonArray ref^

```
 #### Parameters

 * data': [Array](builtin-array)[([F64](builtin-f64) val | [I64](builtin-i64) val | [Bool](builtin-bool) val | [None](builtin-none) val | [String](builtin-string) val | [JsonArray](index) ref | [JsonObject](json-jsonobject) ref)] ref

 #### Returns

 * [JsonArray](index) ref^

 Public fields
-------------

 ### var data: [Array](builtin-array)[([F64](builtin-f64) val | [I64](builtin-i64) val | [Bool](builtin-bool) val | [None](builtin-none) val | [String](builtin-string) val | [JsonArray](index) ref | [JsonObject](json-jsonobject) ref)] ref

 [[Source]](https://stdlib.ponylang.io/src/json/json_type/#L9)

 The actual array containing JSON structures.

 Public Functions
----------------

 ### string

 [[Source]](https://stdlib.ponylang.io/src/json/json_type/#L26)

 Generate string representation of this array.

 
```
fun box string(
  indent: String val = "",
  pretty_print: Bool val = false)
: String val

```
 #### Parameters

 * indent: [String](builtin-string) val = ""
* pretty\_print: [Bool](builtin-bool) val = false

 #### Returns

 * [String](builtin-string) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/json-JsonArray>

JsonType
========

 [[Source]](https://stdlib.ponylang.io/src/json/json_type/#L3)

 All JSON data types.

 
```
type JsonType is
  (F64 val | I64 val | Bool val | None val | String val | JsonArray ref | JsonObject ref)

```
 #### Type Alias For

 * ([F64](builtin-f64) val | [I64](builtin-i64) val | [Bool](builtin-bool) val | [None](builtin-none) val | [String](builtin-string) val | [JsonArray](json-jsonarray) ref | [JsonObject](json-jsonobject) ref)



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/json-JsonType>

Bool
====

 [[Source]](https://stdlib.ponylang.io/src/builtin/bool/#L1)

 
```
primitive val Bool is
  Stringable box

```
 #### Implements

 * [Stringable](builtin-stringable) box

 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/builtin/bool/#L2)

 
```
new val create(
  from: Bool val)
: Bool val^

```
 #### Parameters

 * from: [Bool](index) val

 #### Returns

 * [Bool](index) val^

 Public Functions
----------------

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/builtin/bool/#L4)

 
```
fun box eq(
  y: Bool val)
: Bool val

```
 #### Parameters

 * y: [Bool](index) val

 #### Returns

 * [Bool](index) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/builtin/bool/#L5)

 
```
fun box ne(
  y: Bool val)
: Bool val

```
 #### Parameters

 * y: [Bool](index) val

 #### Returns

 * [Bool](index) val

 ### op\_and

 [[Source]](https://stdlib.ponylang.io/src/builtin/bool/#L6)

 
```
fun box op_and(
  y: Bool val)
: Bool val

```
 #### Parameters

 * y: [Bool](index) val

 #### Returns

 * [Bool](index) val

 ### op\_or

 [[Source]](https://stdlib.ponylang.io/src/builtin/bool/#L7)

 
```
fun box op_or(
  y: Bool val)
: Bool val

```
 #### Parameters

 * y: [Bool](index) val

 #### Returns

 * [Bool](index) val

 ### op\_xor

 [[Source]](https://stdlib.ponylang.io/src/builtin/bool/#L8)

 
```
fun box op_xor(
  y: Bool val)
: Bool val

```
 #### Parameters

 * y: [Bool](index) val

 #### Returns

 * [Bool](index) val

 ### op\_not

 [[Source]](https://stdlib.ponylang.io/src/builtin/bool/#L9)

 
```
fun box op_not()
: Bool val

```
 #### Returns

 * [Bool](index) val

 ### string

 [[Source]](https://stdlib.ponylang.io/src/builtin/bool/#L11)

 
```
fun box string()
: String iso^

```
 #### Returns

 * [String](builtin-string) iso^



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/builtin-Bool>

Iter[A: A]
==========

 [[Source]](https://stdlib.ponylang.io/src/itertools/iter/#L3)

 Wrapper class containing methods to modify iterators.

 
```
class ref Iter[A: A] is
  Iterator[A] ref

```
 #### Implements

 * [Iterator](builtin-iterator)[A] ref

 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/itertools/iter/#L9)

 
```
new ref create(
  iter: Iterator[A] ref)
: Iter[A] ref^

```
 #### Parameters

 * iter: [Iterator](builtin-iterator)[A] ref

 #### Returns

 * [Iter](index)[A] ref^

 ### maybe

 [[Source]](https://stdlib.ponylang.io/src/itertools/iter/#L18)

 
```
new ref maybe(
  value: (A | None val))
: Iter[A] ref^

```
 #### Parameters

 * value: (A | [None](builtin-none) val)

 #### Returns

 * [Iter](index)[A] ref^

 ### chain

 [[Source]](https://stdlib.ponylang.io/src/itertools/iter/#L28)

 Take an iterator of iterators and return an Iter containing the items of the first one, then the second one, and so on.

 Example
-------

 
```
let xs = [as I64: 1; 2].values()
let ys = [as I64: 3; 4].values()

Iter[I64].chain([xs; ys].values())

```
 `1 2 3 4`

 
```
new ref chain(
  outer_iterator: Iterator[Iterator[A] ref] ref)
: Iter[A] ref^

```
 #### Parameters

 * outer\_iterator: [Iterator](builtin-iterator)[[Iterator](builtin-iterator)[A] ref] ref

 #### Returns

 * [Iter](index)[A] ref^

 ### repeat\_value

 [[Source]](https://stdlib.ponylang.io/src/itertools/iter/#L82)

 Create an iterator that returns the given value forever.

 Example
-------

 
```
Iter[U32].repeat_value(7)

```
 `7 7 7 7 7 7 7 7 7 ...`

 
```
new ref repeat_value(
  value: A)
: Iter[A] ref^

```
 #### Parameters

 * value: A

 #### Returns

 * [Iter](index)[A] ref^

 Public Functions
----------------

 ### has\_next

 [[Source]](https://stdlib.ponylang.io/src/itertools/iter/#L12)

 
```
fun ref has_next()
: Bool val

```
 #### Returns

 * [Bool](builtin-bool) val

 ### next

 [[Source]](https://stdlib.ponylang.io/src/itertools/iter/#L15)

 
```
fun ref next()
: A ?

```
 #### Returns

 * A ?

 ### next\_or

 [[Source]](https://stdlib.ponylang.io/src/itertools/iter/#L102)

 Return the next value, or the given default.

 Example
-------

 
```
let x: (U64 | None) = 42
Iter[U64].maybe(x).next_or(0)

```
 `42`

 
```
fun ref next_or(
  default: A)
: A

```
 #### Parameters

 * default: A

 #### Returns

 * A

 ### map\_stateful[B: B]

 [[Source]](https://stdlib.ponylang.io/src/itertools/iter/#L120)

 Allows stateful transformation of each element from the iterator, similar to `map`.

 
```
fun ref map_stateful[B: B](
  f: {ref(A!): B^ ?}[A, B] ref)
: Iter[B] ref^

```
 #### Parameters

 * f: {ref(A!): B^ ?}[A, B] ref

 #### Returns

 * [Iter](index)[B] ref^

 ### filter\_stateful

 [[Source]](https://stdlib.ponylang.io/src/itertools/iter/#L134)

 Allows filtering of elements based on a stateful adapter, similar to `filter`.

 
```
fun ref filter_stateful(
  f: {ref(A!): Bool ?}[A] ref)
: Iter[A!] ref^

```
 #### Parameters

 * f: {ref(A!): Bool ?}[A] ref

 #### Returns

 * [Iter](index)[A!] ref^

 ### filter\_map\_stateful[B: B]

 [[Source]](https://stdlib.ponylang.io/src/itertools/iter/#L184)

 Allows stateful modification to the stream of elements from an iterator, similar to `filter_map`.

 
```
fun ref filter_map_stateful[B: B](
  f: {ref(A!): (B^ | None) ?}[A, B] ref)
: Iter[B] ref^

```
 #### Parameters

 * f: {ref(A!): (B^ | None) ?}[A, B] ref

 #### Returns

 * [Iter](index)[B] ref^

 ### all

 [[Source]](https://stdlib.ponylang.io/src/itertools/iter/#L233)

 Return false if at least one value of the iterator fails to match the predicate `f`. This method short-circuits at the first value where the predicate returns false, otherwise true is returned.

 Examples
--------

 
```
Iter[I64]([2; 4; 6].values())
  .all({(x) => (x % 2) == 0 })

```
 `true`

 
```
Iter[I64]([2; 3; 4].values())
  .all({(x) => (x % 2) == 0 })

```
 `false`

 
```
fun ref all(
  f: {(A!): Bool ?}[A] box)
: Bool val

```
 #### Parameters

 * f: {(A!): Bool ?}[A] box

 #### Returns

 * [Bool](builtin-bool) val

 ### any

 [[Source]](https://stdlib.ponylang.io/src/itertools/iter/#L260)

 Return true if at least one value of the iterator matches the predicate `f`. This method short-circuits at the first value where the predicate returns true, otherwise false is returned.

 Examples
--------

 
```
Iter[I64]([2; 4; 6].values())
  .any({(I64) => (x % 2) == 1 })

```
 `false`

 
```
Iter[I64]([2; 3; 4].values())
  .any({(I64) => (x % 2) == 1 })

```
 `true`

 
```
fun ref any(
  f: {(A!): Bool ?}[A] box)
: Bool val

```
 #### Parameters

 * f: {(A!): Bool ?}[A] box

 #### Returns

 * [Bool](builtin-bool) val

 ### collect[optional B: [Seq](builtin-seq)[A!] ref]

 [[Source]](https://stdlib.ponylang.io/src/itertools/iter/#L287)

 Push each value from the iterator into the collection `coll`.

 Example
-------

 
```
Iter[I64]([1; 2; 3].values())
  .collect(Array[I64](3))

```
 `[1, 2, 3]`

 
```
fun ref collect[optional B: Seq[A!] ref](
  coll: B)
: B^

```
 #### Parameters

 * coll: B

 #### Returns

 * B^

 ### count

 [[Source]](https://stdlib.ponylang.io/src/itertools/iter/#L304)

 Return the number of values in the iterator.

 Example
-------

 
```
Iter[I64]([1; 2; 3].values())
  .count()

```
 `3`

 
```
fun ref count()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### cycle

 [[Source]](https://stdlib.ponylang.io/src/itertools/iter/#L322)

 Repeatedly cycle through the values from the iterator.

 WARNING: The values returned by the original iterator are cached, so the input iterator should be finite.

 Example
-------

 
```
Iter[I64]([1; 2; 3].values())
  .cycle()

```
 `1 2 3 1 2 3 1 2 3 ...`

 
```
fun ref cycle()
: Iter[A!] ref^

```
 #### Returns

 * [Iter](index)[A!] ref^

 ### enum[optional B: ([Real](builtin-real)[B] val & ([I8](builtin-i8) val | [I16](builtin-i16) val | [I32](builtin-i32) val | [I64](builtin-i64) val | [I128](builtin-i128) val | [ILong](builtin-ilong) val | [ISize](builtin-isize) val | [U8](builtin-u8) val | [U16](builtin-u16) val | [U32](builtin-u32) val | [U64](builtin-u64) val | [U128](builtin-u128) val | [ULong](builtin-ulong) val | [USize](builtin-usize) val | [F32](builtin-f32) val | [F64](builtin-f64) val))]

 [[Source]](https://stdlib.ponylang.io/src/itertools/iter/#L379)

 An iterator which yields the current iteration count as well as the next value from the iterator.

 Example
-------

 
```
Iter[I64]([1; 2; 3].values())
  .enum()

```
 `(0, 1) (1, 2) (2, 3)`

 
```
fun ref enum[optional B: (Real[B] val & (I8 val | I16 val | I32 val | 
    I64 val | I128 val | ILong val | 
    ISize val | U8 val | U16 val | 
    U32 val | U64 val | U128 val | 
    ULong val | USize val | F32 val | 
    F64 val))]()
: Iter[(B , A)] ref^

```
 #### Returns

 * [Iter](index)[(B , A)] ref^

 ### filter

 [[Source]](https://stdlib.ponylang.io/src/itertools/iter/#L402)

 Return an iterator that only returns items that match the predicate `f`.

 Example
-------

 
```
Iter[I64]([1; 2; 3; 4; 5; 6].values())
  .filter({(x) => (x % 2) == 0 })

```
 `2 4 6`

 
```
fun ref filter(
  f: {(A!): Bool ?}[A] box)
: Iter[A!] ref^

```
 #### Parameters

 * f: {(A!): Bool ?}[A] box

 #### Returns

 * [Iter](index)[A!] ref^

 ### find

 [[Source]](https://stdlib.ponylang.io/src/itertools/iter/#L416)

 Return the nth value in the iterator that satisfies the predicate `f`.

 Examples
--------

 
```
Iter[I64]([1; 2; 3].values())
  .find({(x) => (x % 2) == 0 })

```
 `2`

 
```
Iter[I64]([1; 2; 3; 4].values())
  .find({(x) => (x % 2) == 0 }, 2)

```
 `4`

 
```
fun ref find(
  f: {(A!): Bool ?}[A] box,
  n: USize val = 1)
: A! ?

```
 #### Parameters

 * f: {(A!): Bool ?}[A] box
* n: [USize](builtin-usize) val = 1

 #### Returns

 * A! ?

 ### filter\_map[B: B]

 [[Source]](https://stdlib.ponylang.io/src/itertools/iter/#L446)

 Return an iterator which applies `f` to each element. If `None` is returned, then the iterator will try again by applying `f` to the next element. Otherwise, the value of type `B` is returned.

 Example
-------

 
```
Iter[I64]([as I64: 1; -2; 4; 7; -5])
  .filter_map[USize](
    {(i: I64): (USize | None) => if i >= 0 then i.usize() end })

```
 `1 4 7`

 
```


```pony
fun ref filter_map[B: B](
  f: {(A!): (B^ | None) ?}[A, B] box)
: Iter[B] ref^

```
 #### Parameters

 * f: {(A!): (B^ | None) ?}[A, B] box

 #### Returns

 * [Iter](index)[B] ref^

 ### flat\_map[B: B]

 [[Source]](https://stdlib.ponylang.io/src/itertools/iter/#L463)

 Return an iterator over the values of the iterators produced from the application of the given function.

 Example
-------

 
```
Iter[String](["alpha"; "beta"; "gamma"])
  .flat_map[U8]({(s: String): Iterator[U8] => s.values() })

```
 `a l p h a b e t a g a m m a`

 
```
fun ref flat_map[B: B](
  f: {(A!): Iterator[B] ?}[A, B] box)
: Iter[B] ref^

```
 #### Parameters

 * f: {(A!): Iterator[B] ?}[A, B] box

 #### Returns

 * [Iter](index)[B] ref^

 ### fold[B: B]

 [[Source]](https://stdlib.ponylang.io/src/itertools/iter/#L505)

 Apply a function to every element, producing an accumulated value.

 Example
-------

 
```
Iter[I64]([1; 2; 3].values())
  .fold[I64](0, {(sum, x) => sum + x })

```
 `6`

 
```
fun ref fold[B: B](
  acc: B,
  f: {(B, A!): B^}[A, B] box)
: B^

```
 #### Parameters

 * acc: B
* f: {(B, A!): B^}[A, B] box

 #### Returns

 * B^

 ### fold\_partial[B: B]

 [[Source]](https://stdlib.ponylang.io/src/itertools/iter/#L523)

 A partial version of `fold`.

 
```
fun ref fold_partial[B: B](
  acc: B,
  f: {(B, A!): B^ ?}[A, B] box)
: B^ ?

```
 #### Parameters

 * acc: B
* f: {(B, A!): B^ ?}[A, B] box

 #### Returns

 * B^ ?

 ### last

 [[Source]](https://stdlib.ponylang.io/src/itertools/iter/#L576)

 Return the last value of the iterator.

 Example
-------

 
```
Iter[I64]([1; 2; 3].values())
  .last()

```
 `3`

 
```
fun ref last()
: A ?

```
 #### Returns

 * A ?

 ### map[B: B]

 [[Source]](https://stdlib.ponylang.io/src/itertools/iter/#L592)

 Return an iterator where each item's value is the application of the given function to the value in the original iterator.

 Example
-------

 
```
Iter[I64]([1; 2; 3].values())
  .map[I64]({(x) => x * x })

```
 `1 4 9`

 
```
fun ref map[B: B](
  f: {(A!): B^ ?}[A, B] box)
: Iter[B] ref^

```
 #### Parameters

 * f: {(A!): B^ ?}[A, B] box

 #### Returns

 * [Iter](index)[B] ref^

 ### nth

 [[Source]](https://stdlib.ponylang.io/src/itertools/iter/#L607)

 Return the nth value of the iterator.

 Example
-------

 
```
Iter[I64]([1; 2; 3].values())
  .nth(2)

```
 `2`

 
```
fun ref nth(
  n: USize val)
: A ?

```
 #### Parameters

 * n: [USize](builtin-usize) val

 #### Returns

 * A ?

 ### run

 [[Source]](https://stdlib.ponylang.io/src/itertools/iter/#L630)

 Iterate through the values of the iterator without a for loop. The function `on_error` will be called if the iterator's `has_next` method returns true but its `next` method throws an error.

 Example
-------

 
```
Iter[I64]([1; 2; 3].values())
  .map[None]({(x) => env.out.print(x.string()) })
  .run()

```
 
```
1
2
3

```
 
```
fun ref run(
  on_error: {ref()}[A] ref = lambda)
: None val

```
 #### Parameters

 * on\_error: {ref()}[A] ref = lambda

 #### Returns

 * [None](builtin-none) val

 ### skip

 [[Source]](https://stdlib.ponylang.io/src/itertools/iter/#L657)

 Skip the first n values of the iterator.

 Example
-------

 
```
Iter[I64]([1; 2; 3; 4; 5; 6].values())
  .skip(3)

```
 `4 5 6`

 
```
Iter[I64]([1; 2; 3].values())
  .skip(3)
  .has_next()

```
 `false`

 
```
fun ref skip(
  n: USize val)
: Iter[A] ref^

```
 #### Parameters

 * n: [USize](builtin-usize) val

 #### Returns

 * [Iter](index)[A] ref^

 ### skip\_while

 [[Source]](https://stdlib.ponylang.io/src/itertools/iter/#L685)

 Skip values of the iterator while the predicate `f` returns true.

 Example
-------

 
```
Iter[I64]([1; 2; 3; 4; 5; 6].values())
  .skip_while({(x) => x < 4 })

```
 `4 5 6`

 
```
fun ref skip_while(
  f: {(A!): Bool ?}[A] box)
: Iter[A!] ref^

```
 #### Parameters

 * f: {(A!): Bool ?}[A] box

 #### Returns

 * [Iter](index)[A!] ref^

 ### take

 [[Source]](https://stdlib.ponylang.io/src/itertools/iter/#L711)

 Return an iterator for the first n elements.

 Example
-------

 
```
Iter[I64]([1; 2; 3; 4; 5; 6].values())
  .take(3)

```
 `1 2 3`

 
```
fun ref take(
  n: USize val)
: Iter[A] ref^

```
 #### Parameters

 * n: [USize](builtin-usize) val

 #### Returns

 * [Iter](index)[A] ref^

 ### take\_while

 [[Source]](https://stdlib.ponylang.io/src/itertools/iter/#L739)

 Return an iterator that returns values while the predicate `f` returns true. This iterator short-circuits the first time that `f` returns false or raises an error.

 Example
-------

 
```
Iter[I64]([1; 2; 3; 4; 5; 6].values())
  .take_while({(x) => x < 4 })

```
 `1 2 3`

 
```
fun ref take_while(
  f: {(A!): Bool ?}[A] box)
: Iter[A!] ref^

```
 #### Parameters

 * f: {(A!): Bool ?}[A] box

 #### Returns

 * [Iter](index)[A!] ref^

 ### zip[B: B]

 [[Source]](https://stdlib.ponylang.io/src/itertools/iter/#L802)

 Zip two iterators together so that each call to next() results in a tuple with the next value of the first iterator and the next value of the second iterator. The number of items returned is the minimum of the number of items returned by the two iterators.

 Example
-------

 
```
Iter[I64]([1; 2].values())
  .zip[I64]([3; 4].values())

```
 `(1, 3) (2, 4)`

 
```
fun ref zip[B: B](
  i2: Iterator[B] ref)
: Iter[(A , B)] ref^

```
 #### Parameters

 * i2: [Iterator](builtin-iterator)[B] ref

 #### Returns

 * [Iter](index)[(A , B)] ref^

 ### zip2[B: B, C: C]

 [[Source]](https://stdlib.ponylang.io/src/itertools/iter/#L829)

 Zip three iterators together so that each call to next() results in a tuple with the next value of the first iterator, the next value of the second iterator, and the value of the third iterator. The number of items returned is the minimum of the number of items returned by the three iterators.

 
```
fun ref zip2[B: B, C: C](
  i2: Iterator[B] ref,
  i3: Iterator[C] ref)
: Iter[(A , B , C)] ref^

```
 #### Parameters

 * i2: [Iterator](builtin-iterator)[B] ref
* i3: [Iterator](builtin-iterator)[C] ref

 #### Returns

 * [Iter](index)[(A , B , C)] ref^

 ### zip3[B: B, C: C, D: D]

 [[Source]](https://stdlib.ponylang.io/src/itertools/iter/#L850)

 Zip four iterators together so that each call to next() results in a tuple with the next value of each of the iterators. The number of items returned is the minimum of the number of items returned by the iterators.

 
```
fun ref zip3[B: B, C: C, D: D](
  i2: Iterator[B] ref,
  i3: Iterator[C] ref,
  i4: Iterator[D] ref)
: Iter[(A , B , C , D)] ref^

```
 #### Parameters

 * i2: [Iterator](builtin-iterator)[B] ref
* i3: [Iterator](builtin-iterator)[C] ref
* i4: [Iterator](builtin-iterator)[D] ref

 #### Returns

 * [Iter](index)[(A , B , C , D)] ref^

 ### zip4[B: B, C: C, D: D, E: E]

 [[Source]](https://stdlib.ponylang.io/src/itertools/iter/#L876)

 Zip five iterators together so that each call to next() results in a tuple with the next value of each of the iterators. The number of items returned is the minimum of the number of items returned by the iterators.

 
```
fun ref zip4[B: B, C: C, D: D, E: E](
  i2: Iterator[B] ref,
  i3: Iterator[C] ref,
  i4: Iterator[D] ref,
  i5: Iterator[E] ref)
: Iter[(A , B , C , D , E)] ref^

```
 #### Parameters

 * i2: [Iterator](builtin-iterator)[B] ref
* i3: [Iterator](builtin-iterator)[C] ref
* i4: [Iterator](builtin-iterator)[D] ref
* i5: [Iterator](builtin-iterator)[E] ref

 #### Returns

 * [Iter](index)[(A , B , C , D , E)] ref^



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/itertools-Iter>

Set[A: ([Hashable](collections-hashable) #read & [Equatable](builtin-equatable)[A] #read)]
==========================================================================================

 [[Source]](https://stdlib.ponylang.io/src/collections/set/#L1)

 
```
type Set[A: (Hashable #read & Equatable[A] #read)] is
  HashSet[A, HashEq[A] val] ref

```
 #### Type Alias For

 * [HashSet](collections-hashset)[A, [HashEq](collections-hasheq)[A] val] ref



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/collections-Set>

None
====

 [[Source]](https://stdlib.ponylang.io/src/builtin/none/#L1)

 
```
primitive val None is
  Stringable box

```
 #### Implements

 * [Stringable](builtin-stringable) box

 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/builtin/none/#L1)

 
```
new val create()
: None val^

```
 #### Returns

 * [None](index) val^

 Public Functions
----------------

 ### string

 [[Source]](https://stdlib.ponylang.io/src/builtin/none/#L2)

 
```
fun box string()
: String iso^

```
 #### Returns

 * [String](builtin-string) iso^

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/builtin/none/#L2)

 
```
fun box eq(
  that: None val)
: Bool val

```
 #### Parameters

 * that: [None](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/builtin/none/#L2)

 
```
fun box ne(
  that: None val)
: Bool val

```
 #### Parameters

 * that: [None](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/builtin-None>

DebugErr
========

 [[Source]](https://stdlib.ponylang.io/src/debug/debug/#L20)

 
```
primitive val DebugErr

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/debug/debug/#L20)

 
```
new val create()
: DebugErr val^

```
 #### Returns

 * [DebugErr](index) val^

 Public Functions
----------------

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/debug/debug/#L22)

 
```
fun box eq(
  that: DebugErr val)
: Bool val

```
 #### Parameters

 * that: [DebugErr](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/debug/debug/#L22)

 
```
fun box ne(
  that: DebugErr val)
: Bool val

```
 #### Parameters

 * that: [DebugErr](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/debug-DebugErr>

String
======

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L9)

 A String is an ordered collection of bytes.

 Strings don't specify an encoding.

 Example usage of some common String methods:

 
```
actor Main
  new create(env: Env) =>
    try
      // construct a new string
      let str = "Hello"

      // make an uppercased version
      let str_upper = str.upper()
      // make a reversed version
      let str_reversed = str.reverse()

      // add " world" to the end of our original string
      let str_new = str.add(" world")

      // count occurrences of letter "l"
      let count = str_new.count("l")

      // find first occurrence of letter "w"
      let first_w = str_new.find("w")
      // find first occurrence of letter "d"
      let first_d = str_new.find("d")

      // get substring capturing "world"
      let substr = str_new.substring(first_w, first_d+1)
      // clone substring
      let substr_clone = substr.clone()

      // print our substr
      env.out.print(consume substr)
  end

```
 
```
class val String is
  Seq[U8 val] ref,
  Comparable[String box] ref,
  Stringable box

```
 #### Implements

 * [Seq](builtin-seq)[[U8](builtin-u8) val] ref
* [Comparable](builtin-comparable)[[String](index) box] ref
* [Stringable](builtin-stringable) box

 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L54)

 An empty string. Enough space for len bytes is reserved.

 
```
new ref create(
  len: USize val = 0)
: String ref^

```
 #### Parameters

 * len: [USize](builtin-usize) val = 0

 #### Returns

 * [String](index) ref^

 ### from\_array

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L63)

 Create a string from an array, reusing the underlying data pointer.

 
```
new val from_array(
  data: Array[U8 val] val)
: String val^

```
 #### Parameters

 * data: [Array](builtin-array)[[U8](builtin-u8) val] val

 #### Returns

 * [String](index) val^

 ### from\_iso\_array

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L71)

 Create a string from an array, reusing the underlying data pointer

 
```
new iso from_iso_array(
  data: Array[U8 val] iso)
: String iso^

```
 #### Parameters

 * data: [Array](builtin-array)[[U8](builtin-u8) val] iso

 #### Returns

 * [String](index) iso^

 ### from\_cpointer

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L82)

 Return a string from binary pointer data without making a copy. This must be done only with C-FFI functions that return pony\_alloc'd character arrays. If a null pointer is given then an empty string is returned.

 
```
new ref from_cpointer(
  str: Pointer[U8 val] ref,
  len: USize val,
  alloc: USize val = 0)
: String ref^

```
 #### Parameters

 * str: [Pointer](builtin-pointer)[[U8](builtin-u8) val] ref
* len: [USize](builtin-usize) val
* alloc: [USize](builtin-usize) val = 0

 #### Returns

 * [String](index) ref^

 ### from\_cstring

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L100)

 Return a string from a pointer to a null-terminated cstring without making a copy. The data is not copied. This must be done only with C-FFI functions that return pony\_alloc'd character arrays. The pointer is scanned for the first null byte, which will be interpreted as the null terminator. Note that the scan is unbounded; the pointed to data must be null-terminated within the allocated array to preserve memory safety. If a null pointer is given then an empty string is returned.

 
```
new ref from_cstring(
  str: Pointer[U8 val] ref)
: String ref^

```
 #### Parameters

 * str: [Pointer](builtin-pointer)[[U8](builtin-u8) val] ref

 #### Returns

 * [String](index) ref^

 ### copy\_cpointer

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L128)

 Create a string by copying a fixed number of bytes from a pointer.

 
```
new ref copy_cpointer(
  str: Pointer[U8 val] box,
  len: USize val)
: String ref^

```
 #### Parameters

 * str: [Pointer](builtin-pointer)[[U8](builtin-u8) val] box
* len: [USize](builtin-usize) val

 #### Returns

 * [String](index) ref^

 ### copy\_cstring

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L144)

 Create a string by copying a null-terminated C string. Note that the scan is unbounded; the pointed to data must be null-terminated within the allocated array to preserve memory safety. If a null pointer is given then an empty string is returned.

 
```
new ref copy_cstring(
  str: Pointer[U8 val] box)
: String ref^

```
 #### Parameters

 * str: [Pointer](builtin-pointer)[[U8](builtin-u8) val] box

 #### Returns

 * [String](index) ref^

 ### from\_utf32

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L169)

 Create a UTF-8 string from a single UTF-32 code point.

 
```
new ref from_utf32(
  value: U32 val)
: String ref^

```
 #### Parameters

 * value: [U32](builtin-u32) val

 #### Returns

 * [String](index) ref^

 Public Functions
----------------

 ### push\_utf32

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L189)

 Push a UTF-32 code point.

 
```
fun ref push_utf32(
  value: U32 val)
: None val

```
 #### Parameters

 * value: [U32](builtin-u32) val

 #### Returns

 * [None](builtin-none) val

 ### cpointer

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L216)

 Returns a C compatible pointer to the underlying string allocation.

 
```
fun box cpointer(
  offset: USize val = 0)
: Pointer[U8 val] tag

```
 #### Parameters

 * offset: [USize](builtin-usize) val = 0

 #### Returns

 * [Pointer](builtin-pointer)[[U8](builtin-u8) val] tag

 ### cstring

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L222)

 Returns a C compatible pointer to a null-terminated version of the string, safe to pass to an FFI function that doesn't accept a size argument, expecting a null-terminator. If the underlying string is already null terminated, this is returned; otherwise the string is copied into a new, null-terminated allocation.

 
```
fun box cstring()
: Pointer[U8 val] tag

```
 #### Returns

 * [Pointer](builtin-pointer)[[U8](builtin-u8) val] tag

 ### array

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L239)

 Returns an Array[U8] that reuses the underlying data pointer.

 
```
fun val array()
: Array[U8 val] val

```
 #### Returns

 * [Array](builtin-array)[[U8](builtin-u8) val] val

 ### iso\_array

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L247)

 Returns an Array[U8] iso that reuses the underlying data pointer.

 
```
fun iso iso_array()
: Array[U8 val] iso^

```
 #### Returns

 * [Array](builtin-array)[[U8](builtin-u8) val] iso^

 ### size

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L255)

 Returns the length of the string data in bytes.

 
```
fun box size()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### codepoints

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L261)

 Returns the number of unicode code points in the string between the two offsets. Index range [`from` .. `to`) is half-open.

 
```
fun box codepoints(
  from: ISize val = 0,
  to: ISize val = call)
: USize val

```
 #### Parameters

 * from: [ISize](builtin-isize) val = 0
* to: [ISize](builtin-isize) val = call

 #### Returns

 * [USize](builtin-usize) val

 ### space

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L284)

 Returns the space available for data, not including the null terminator.

 
```
fun box space()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### reserve

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L290)

 Reserve space for len bytes. An additional byte will be reserved for the null terminator.

 
```
fun ref reserve(
  len: USize val)
: None val

```
 #### Parameters

 * len: [USize](builtin-usize) val

 #### Returns

 * [None](builtin-none) val

 ### compact

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L306)

 Try to remove unused space, making it available for garbage collection. The request may be ignored. The string is returned to allow call chaining.

 
```
fun ref compact()
: None val

```
 #### Returns

 * [None](builtin-none) val

 ### recalc

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L325)

 Recalculates the string length. This is only needed if the string is changed via an FFI call. If a null terminator byte is not found within the allocated length, the size will not be changed.

 
```
fun ref recalc()
: None val

```
 #### Returns

 * [None](builtin-none) val

 ### truncate

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L341)

 Truncates the string at the minimum of len and space. Ensures there is a null terminator. Does not check for null terminators inside the string.

 Note that memory is not freed by this operation.

 
```
fun ref truncate(
  len: USize val)
: None val

```
 #### Parameters

 * len: [USize](builtin-usize) val

 #### Returns

 * [None](builtin-none) val

 ### trim\_in\_place

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L357)

 Trim the string to a portion of itself, covering `from` until `to`. Unlike slice, the operation does not allocate a new string nor copy elements.

 
```
fun ref trim_in_place(
  from: USize val = 0,
  to: USize val = call)
: None val

```
 #### Parameters

 * from: [USize](builtin-usize) val = 0
* to: [USize](builtin-usize) val = call

 #### Returns

 * [None](builtin-none) val

 ### trim

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L385)

 Return a shared portion of this string, covering `from` until `to`. Both the original and the new string are immutable, as they share memory. The operation does not allocate a new string pointer nor copy elements.

 
```
fun val trim(
  from: USize val = 0,
  to: USize val = call)
: String val

```
 #### Parameters

 * from: [USize](builtin-usize) val = 0
* to: [USize](builtin-usize) val = call

 #### Returns

 * [String](index) val

 ### chop

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L409)

 Chops the string in half at the split point requested and returns both the left and right portions. The original string is trimmed in place and returned as the left portion. If the split point is larger than the string, the left portion is the original string and the right portion is a new empty string. Both strings are isolated and mutable, as they do not share memory. The operation does not allocate a new string pointer nor copy elements.

 
```
fun iso chop(
  split_point: USize val)
: (String iso^ , String iso^)

```
 #### Parameters

 * split\_point: [USize](builtin-usize) val

 #### Returns

 * ([String](index) iso^ , [String](index) iso^)

 ### unchop

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L435)

 Unchops two iso strings to return the original string they were chopped from. Both input strings are isolated and mutable and were originally chopped from a single string. This function checks that they are indeed two strings chopped from the same original string and can be unchopped before doing the unchopping and returning the unchopped string. If the two strings cannot be unchopped it returns both strings without modifying them. The operation does not allocate a new string pointer nor copy elements.

 
```
fun iso unchop(
  b: String iso)
: ((String iso^ , String iso^) | String iso^)

```
 #### Parameters

 * b: [String](index) iso

 #### Returns

 * (([String](index) iso^ , [String](index) iso^) | [String](index) iso^)

 ### is\_null\_terminated

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L477)

 Return true if the string is null-terminated and safe to pass to an FFI function that doesn't accept a size argument, expecting a null-terminator. This method checks that there is a null byte just after the final position of populated bytes in the string, but does not check for other null bytes which may be present earlier in the content of the string. If you need a null-terminated copy of this string, use the clone method.

 
```
fun box is_null_terminated()
: Bool val

```
 #### Returns

 * [Bool](builtin-bool) val

 ### utf32

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L488)

 Return a UTF32 representation of the character at the given offset and the number of bytes needed to encode that character. If the offset does not point to the beginning of a valid UTF8 encoding, return 0xFFFD (the unicode replacement character) and a length of one. Raise an error if the offset is out of bounds.

 
```
fun box utf32(
  offset: ISize val)
: (U32 val , U8 val) ?

```
 #### Parameters

 * offset: [ISize](builtin-isize) val

 #### Returns

 * ([U32](builtin-u32) val , [U8](builtin-u8) val) ?

 ### apply

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L574)

 Returns the i-th byte. Raise an error if the index is out of bounds.

 
```
fun box apply(
  i: USize val)
: U8 val ?

```
 #### Parameters

 * i: [USize](builtin-usize) val

 #### Returns

 * [U8](builtin-u8) val ?

 ### update

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L580)

 Change the i-th byte. Raise an error if the index is out of bounds.

 
```
fun ref update(
  i: USize val,
  value: U8 val)
: U8 val ?

```
 #### Parameters

 * i: [USize](builtin-usize) val
* value: [U8](builtin-u8) val

 #### Returns

 * [U8](builtin-u8) val ?

 ### at\_offset

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L590)

 Returns the byte at the given offset. Raise an error if the offset is out of bounds.

 
```
fun box at_offset(
  offset: ISize val)
: U8 val ?

```
 #### Parameters

 * offset: [ISize](builtin-isize) val

 #### Returns

 * [U8](builtin-u8) val ?

 ### update\_offset

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L597)

 Changes a byte in the string, returning the previous byte at that offset. Raise an error if the offset is out of bounds.

 
```
fun ref update_offset(
  offset: ISize val,
  value: U8 val)
: U8 val ?

```
 #### Parameters

 * offset: [ISize](builtin-isize) val
* value: [U8](builtin-u8) val

 #### Returns

 * [U8](builtin-u8) val ?

 ### clone

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L604)

 Returns a copy of the string. The resulting string is null-terminated even if the original is not.

 
```
fun box clone()
: String iso^

```
 #### Returns

 * [String](index) iso^

 ### repeat\_str

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L616)

 Returns a copy of the string repeated `num` times with an optional separator added inbetween repeats.

 
```
fun box repeat_str(
  num: USize val = 1,
  sep: String val = "")
: String iso^

```
 #### Parameters

 * num: [USize](builtin-usize) val = 1
* sep: [String](index) val = ""

 #### Returns

 * [String](index) iso^

 ### mul

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L634)

 Returns a copy of the string repeated `num` times.

 
```
fun box mul(
  num: USize val)
: String iso^

```
 #### Parameters

 * num: [USize](builtin-usize) val

 #### Returns

 * [String](index) iso^

 ### find

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L640)

 Return the index of the n-th instance of s in the string starting from the beginning. Raise an error if there is no n-th occurrence of s or s is empty.

 
```
fun box find(
  s: String box,
  offset: ISize val = 0,
  nth: USize val = 0)
: ISize val ?

```
 #### Parameters

 * s: [String](index) box
* offset: [ISize](builtin-isize) val = 0
* nth: [USize](builtin-usize) val = 0

 #### Returns

 * [ISize](builtin-isize) val ?

 ### rfind

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L669)

 Return the index of n-th instance of `s` in the string starting from the end. The `offset` represents the highest index to included in the search. Raise an error if there is no n-th occurrence of `s` or `s` is empty.

 
```
fun box rfind(
  s: String box,
  offset: ISize val = call,
  nth: USize val = 0)
: ISize val ?

```
 #### Parameters

 * s: [String](index) box
* offset: [ISize](builtin-isize) val = call
* nth: [USize](builtin-usize) val = 0

 #### Returns

 * [ISize](builtin-isize) val ?

 ### contains

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L700)

 Returns true if contains s as a substring, false otherwise.

 
```
fun box contains(
  s: String box,
  offset: ISize val = 0,
  nth: USize val = 0)
: Bool val

```
 #### Parameters

 * s: [String](index) box
* offset: [ISize](builtin-isize) val = 0
* nth: [USize](builtin-usize) val = 0

 #### Returns

 * [Bool](builtin-bool) val

 ### count

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L728)

 Counts the non-overlapping occurrences of s in the string.

 
```
fun box count(
  s: String box,
  offset: ISize val = 0)
: USize val

```
 #### Parameters

 * s: [String](index) box
* offset: [ISize](builtin-isize) val = 0

 #### Returns

 * [USize](builtin-usize) val

 ### at

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L751)

 Returns true if the substring s is present at the given offset.

 
```
fun box at(
  s: String box,
  offset: ISize val = 0)
: Bool val

```
 #### Parameters

 * s: [String](index) box
* offset: [ISize](builtin-isize) val = 0

 #### Returns

 * [Bool](builtin-bool) val

 ### delete

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L763)

 Delete len bytes at the supplied offset, compacting the string in place.

 
```
fun ref delete(
  offset: ISize val,
  len: USize val = 1)
: None val

```
 #### Parameters

 * offset: [ISize](builtin-isize) val
* len: [USize](builtin-usize) val = 1

 #### Returns

 * [None](builtin-none) val

 ### substring

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L776)

 Returns a substring. Index range [`from` .. `to`) is half-open. Returns an empty string if nothing is in the range.

 Note that this operation allocates a new string to be returned. For similar operations that don't allocate a new string, see `trim` and `trim_in_place`.

 
```
fun box substring(
  from: ISize val,
  to: ISize val = call)
: String iso^

```
 #### Parameters

 * from: [ISize](builtin-isize) val
* to: [ISize](builtin-isize) val = call

 #### Returns

 * [String](index) iso^

 ### lower

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L799)

 Returns a lower case version of the string.

 
```
fun box lower()
: String iso^

```
 #### Returns

 * [String](index) iso^

 ### lower\_in\_place

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L807)

 Transforms the string to lower case. Currently only knows ASCII case.

 
```
fun ref lower_in_place()
: None val

```
 #### Returns

 * [None](builtin-none) val

 ### upper

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L823)

 Returns an upper case version of the string. Currently only knows ASCII case.

 
```
fun box upper()
: String iso^

```
 #### Returns

 * [String](index) iso^

 ### upper\_in\_place

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L832)

 Transforms the string to upper case.

 
```
fun ref upper_in_place()
: None val

```
 #### Returns

 * [None](builtin-none) val

 ### reverse

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L848)

 Returns a reversed version of the string.

 
```
fun box reverse()
: String iso^

```
 #### Returns

 * [String](index) iso^

 ### reverse\_in\_place

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L856)

 Reverses the byte order in the string. This needs to be changed to handle UTF-8 correctly.

 
```
fun ref reverse_in_place()
: None val

```
 #### Returns

 * [None](builtin-none) val

 ### push

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L874)

 Add a byte to the end of the string.

 
```
fun ref push(
  value: U8 val)
: None val

```
 #### Parameters

 * value: [U8](builtin-u8) val

 #### Returns

 * [None](builtin-none) val

 ### pop

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L883)

 Remove a byte from the end of the string.

 
```
fun ref pop()
: U8 val ?

```
 #### Returns

 * [U8](builtin-u8) val ?

 ### unshift

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L894)

 Adds a byte to the beginning of the string.

 
```
fun ref unshift(
  value: U8 val)
: None val

```
 #### Parameters

 * value: [U8](builtin-u8) val

 #### Returns

 * [None](builtin-none) val

 ### shift

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L908)

 Removes a byte from the beginning of the string.

 
```
fun ref shift()
: U8 val ?

```
 #### Returns

 * [U8](builtin-u8) val ?

 ### append

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L921)

 Append the elements from a sequence, starting from the given offset.

 
```
fun ref append(
  seq: ReadSeq[U8 val] box,
  offset: USize val = 0,
  len: USize val = call)
: None val

```
 #### Parameters

 * seq: [ReadSeq](builtin-readseq)[[U8](builtin-u8) val] box
* offset: [USize](builtin-usize) val = 0
* len: [USize](builtin-usize) val = call

 #### Returns

 * [None](builtin-none) val

 ### concat

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L949)

 Add len iterated bytes to the end of the string, starting from the given offset.

 
```
fun ref concat(
  iter: Iterator[U8 val] ref,
  offset: USize val = 0,
  len: USize val = call)
: None val

```
 #### Parameters

 * iter: [Iterator](builtin-iterator)[[U8](builtin-u8) val] ref
* offset: [USize](builtin-usize) val = 0
* len: [USize](builtin-usize) val = call

 #### Returns

 * [None](builtin-none) val

 ### clear

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L980)

 Truncate the string to zero length.

 
```
fun ref clear()
: None val

```
 #### Returns

 * [None](builtin-none) val

 ### insert

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L987)

 Returns a version of the string with the given string inserted at the given offset.

 
```
fun box insert(
  offset: ISize val,
  that: String val)
: String iso^

```
 #### Parameters

 * offset: [ISize](builtin-isize) val
* that: [String](index) val

 #### Returns

 * [String](index) iso^

 ### insert\_in\_place

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L996)

 Inserts the given string at the given offset. Appends the string if the offset is out of bounds.

 
```
fun ref insert_in_place(
  offset: ISize val,
  that: String box)
: None val

```
 #### Parameters

 * offset: [ISize](builtin-isize) val
* that: [String](index) box

 #### Returns

 * [None](builtin-none) val

 ### insert\_byte

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L1009)

 Inserts a byte at the given offset. Appends if the offset is out of bounds.

 
```
fun ref insert_byte(
  offset: ISize val,
  value: U8 val)
: None val

```
 #### Parameters

 * offset: [ISize](builtin-isize) val
* value: [U8](builtin-u8) val

 #### Returns

 * [None](builtin-none) val

 ### cut

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L1021)

 Returns a version of the string with the given range deleted. Index range [`from` .. `to`) is half-open.

 
```
fun box cut(
  from: ISize val,
  to: ISize val = call)
: String iso^

```
 #### Parameters

 * from: [ISize](builtin-isize) val
* to: [ISize](builtin-isize) val = call

 #### Returns

 * [String](index) iso^

 ### cut\_in\_place

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L1030)

 Cuts the given range out of the string. Index range [`from` .. `to`) is half-open.

 
```
fun ref cut_in_place(
  from: ISize val,
  to: ISize val = call)
: None val

```
 #### Parameters

 * from: [ISize](builtin-isize) val
* to: [ISize](builtin-isize) val = call

 #### Returns

 * [None](builtin-none) val

 ### remove

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L1052)

 Remove all instances of s from the string. Returns the count of removed instances.

 
```
fun ref remove(
  s: String box)
: USize val

```
 #### Parameters

 * s: [String](index) box

 #### Returns

 * [USize](builtin-usize) val

 ### replace

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L1069)

 Replace up to n occurrences of `from` in `this` with `to`. If n is 0, all occurrences will be replaced. Returns the count of replaced occurrences.

 
```
fun ref replace(
  from: String box,
  to: String box,
  n: USize val = 0)
: USize val

```
 #### Parameters

 * from: [String](index) box
* to: [String](index) box
* n: [USize](builtin-usize) val = 0

 #### Returns

 * [USize](builtin-usize) val

 ### split\_by

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L1094)

 Split the string into an array of strings that are delimited by `delim` in the original string. If `n > 0`, then the split count is limited to n.

 Example:

 
```
let original: String = "<b><span>Hello!</span></b>"
let delimiter: String = "><"
let split_array: Array[String] = original.split_by(delimiter)
env.out.print("OUTPUT:")
for value in split_array.values() do
  env.out.print(value)
end

// OUTPUT:
// <b
// span>Hello!</span
// b>

```
 Adjacent delimiters result in a zero length entry in the array. For example, `"1CutCut2".split_by("Cut") => ["1", "", "2"]`.

 An empty delimiter results in an array that contains a single element equal to the whole string.

 If you want to split the string with each individual character of `delim`, use [`split`](#split).

 
```
fun box split_by(
  delim: String val,
  n: USize val = call)
: Array[String val] iso^

```
 #### Parameters

 * delim: [String](index) val
* n: [USize](builtin-usize) val = call

 #### Returns

 * [Array](builtin-array)[[String](index) val] iso^

 ### split

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L1145)

 Split the string into an array of strings with any character in the delimiter string. By default, the string is split with whitespace characters. If `n > 0`, then the split count is limited to n.

 Example:

 
```
let original: String = "name,job;department"
let delimiter: String = ".,;"
let split_array: Array[String] = original.split(delimiter)
env.out.print("OUTPUT:")
for value in split_array.values() do
  env.out.print(value)
end

// OUTPUT:
// name
// job
// department

```
 Adjacent delimiters result in a zero length entry in the array. For example, `"1,,2".split(",") => ["1", "", "2"]`.

 If you want to split the string with the entire delimiter string `delim`, use [`split_by`](#split_by).

 
```
fun box split(
  delim: String val = "     
",
  n: USize val = 0)
: Array[String val] iso^

```
 #### Parameters

 * delim: [String](index) val = " "
* n: [USize](builtin-usize) val = 0

 #### Returns

 * [Array](builtin-array)[[String](index) val] iso^

 ### strip

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L1225)

 Remove all leading and trailing characters from the string that are in s.

 
```
fun ref strip(
  s: String box = "     
")
: None val

```
 #### Parameters

 * s: [String](index) box = " "

 #### Returns

 * [None](builtin-none) val

 ### rstrip

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L1231)

 Remove all trailing characters within the string that are in s. By default, trailing whitespace is removed.

 
```
fun ref rstrip(
  s: String box = "     
")
: None val

```
 #### Parameters

 * s: [String](index) box = " "

 #### Returns

 * [None](builtin-none) val

 ### lstrip

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L1263)

 Remove all leading characters within the string that are in s. By default, leading whitespace is removed.

 
```
fun ref lstrip(
  s: String box = "     
")
: None val

```
 #### Parameters

 * s: [String](index) box = " "

 #### Returns

 * [None](builtin-none) val

 ### add

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L1304)

 Return a string that is a concatenation of this and that.

 
```
fun box add(
  that: String box)
: String val

```
 #### Parameters

 * that: [String](index) box

 #### Returns

 * [String](index) val

 ### join

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L1312)

 Return a string that is a concatenation of the strings in data, using this as a separator.

 
```
fun box join(
  data: Iterator[Stringable box] ref)
: String iso^

```
 #### Parameters

 * data: [Iterator](builtin-iterator)[[Stringable](builtin-stringable) box] ref

 #### Returns

 * [String](index) iso^

 ### compare

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L1329)

 Lexically compare two strings.

 
```
fun box compare(
  that: String box)
: (Less val | Equal val | Greater val)

```
 #### Parameters

 * that: [String](index) box

 #### Returns

 * ([Less](builtin-less) val | [Equal](builtin-equal) val | [Greater](builtin-greater) val)

 ### compare\_sub

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L1335)

 Lexically compare at most `n` bytes of the substring of `this` starting at `offset` with the substring of `that` starting at `that_offset`. The comparison is case sensitive unless `ignore_case` is `true`.

 If the substring of `this` is a proper prefix of the substring of `that`, then `this` is `Less` than `that`. Likewise, if `that` is a proper prefix of `this`, then `this` is `Greater` than `that`.

 Both `offset` and `that_offset` can be negative, in which case the offsets are computed from the end of the string.

 If `n + offset` is greater than the length of `this`, or `n + that_offset` is greater than the length of `that`, then the number of positions compared will be reduced to the length of the longest substring.

 Needs to be made UTF-8 safe.

 
```
fun box compare_sub(
  that: String box,
  n: USize val,
  offset: ISize val = 0,
  that_offset: ISize val = 0,
  ignore_case: Bool val = false)
: (Less val | Equal val | Greater val)

```
 #### Parameters

 * that: [String](index) box
* n: [USize](builtin-usize) val
* offset: [ISize](builtin-isize) val = 0
* that\_offset: [ISize](builtin-isize) val = 0
* ignore\_case: [Bool](builtin-bool) val = false

 #### Returns

 * ([Less](builtin-less) val | [Equal](builtin-equal) val | [Greater](builtin-greater) val)

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L1392)

 Returns true if the two strings have the same contents.

 
```
fun box eq(
  that: String box)
: Bool val

```
 #### Parameters

 * that: [String](index) box

 #### Returns

 * [Bool](builtin-bool) val

 ### lt

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L1402)

 Returns true if this is lexically less than that. Needs to be made UTF-8 safe.

 
```
fun box lt(
  that: String box)
: Bool val

```
 #### Parameters

 * that: [String](index) box

 #### Returns

 * [Bool](builtin-bool) val

 ### le

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L1420)

 Returns true if this is lexically less than or equal to that. Needs to be made UTF-8 safe.

 
```
fun box le(
  that: String box)
: Bool val

```
 #### Parameters

 * that: [String](index) box

 #### Returns

 * [Bool](builtin-bool) val

 ### offset\_to\_index

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L1438)

 
```
fun box offset_to_index(
  i: ISize val)
: USize val

```
 #### Parameters

 * i: [ISize](builtin-isize) val

 #### Returns

 * [USize](builtin-usize) val

 ### bool

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L1441)

 
```
fun box bool()
: Bool val ?

```
 #### Returns

 * [Bool](builtin-bool) val ?

 ### i8

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L1449)

 
```
fun box i8(
  base: U8 val = 0)
: I8 val ?

```
 #### Parameters

 * base: [U8](builtin-u8) val = 0

 #### Returns

 * [I8](builtin-i8) val ?

 ### i16

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L1450)

 
```
fun box i16(
  base: U8 val = 0)
: I16 val ?

```
 #### Parameters

 * base: [U8](builtin-u8) val = 0

 #### Returns

 * [I16](builtin-i16) val ?

 ### i32

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L1451)

 
```
fun box i32(
  base: U8 val = 0)
: I32 val ?

```
 #### Parameters

 * base: [U8](builtin-u8) val = 0

 #### Returns

 * [I32](builtin-i32) val ?

 ### i64

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L1452)

 
```
fun box i64(
  base: U8 val = 0)
: I64 val ?

```
 #### Parameters

 * base: [U8](builtin-u8) val = 0

 #### Returns

 * [I64](builtin-i64) val ?

 ### i128

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L1453)

 
```
fun box i128(
  base: U8 val = 0)
: I128 val ?

```
 #### Parameters

 * base: [U8](builtin-u8) val = 0

 #### Returns

 * [I128](builtin-i128) val ?

 ### ilong

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L1454)

 
```
fun box ilong(
  base: U8 val = 0)
: ILong val ?

```
 #### Parameters

 * base: [U8](builtin-u8) val = 0

 #### Returns

 * [ILong](builtin-ilong) val ?

 ### isize

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L1455)

 
```
fun box isize(
  base: U8 val = 0)
: ISize val ?

```
 #### Parameters

 * base: [U8](builtin-u8) val = 0

 #### Returns

 * [ISize](builtin-isize) val ?

 ### u8

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L1456)

 
```
fun box u8(
  base: U8 val = 0)
: U8 val ?

```
 #### Parameters

 * base: [U8](builtin-u8) val = 0

 #### Returns

 * [U8](builtin-u8) val ?

 ### u16

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L1457)

 
```
fun box u16(
  base: U8 val = 0)
: U16 val ?

```
 #### Parameters

 * base: [U8](builtin-u8) val = 0

 #### Returns

 * [U16](builtin-u16) val ?

 ### u32

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L1458)

 
```
fun box u32(
  base: U8 val = 0)
: U32 val ?

```
 #### Parameters

 * base: [U8](builtin-u8) val = 0

 #### Returns

 * [U32](builtin-u32) val ?

 ### u64

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L1459)

 
```
fun box u64(
  base: U8 val = 0)
: U64 val ?

```
 #### Parameters

 * base: [U8](builtin-u8) val = 0

 #### Returns

 * [U64](builtin-u64) val ?

 ### u128

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L1460)

 
```
fun box u128(
  base: U8 val = 0)
: U128 val ?

```
 #### Parameters

 * base: [U8](builtin-u8) val = 0

 #### Returns

 * [U128](builtin-u128) val ?

 ### ulong

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L1461)

 
```
fun box ulong(
  base: U8 val = 0)
: ULong val ?

```
 #### Parameters

 * base: [U8](builtin-u8) val = 0

 #### Returns

 * [ULong](builtin-ulong) val ?

 ### usize

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L1462)

 
```
fun box usize(
  base: U8 val = 0)
: USize val ?

```
 #### Parameters

 * base: [U8](builtin-u8) val = 0

 #### Returns

 * [USize](builtin-usize) val ?

 ### read\_int[A: (([I8](builtin-i8) val | [I16](builtin-i16) val | [I32](builtin-i32) val | [I64](builtin-i64) val | [I128](builtin-i128) val | [ILong](builtin-ilong) val | [ISize](builtin-isize) val | [U8](builtin-u8) val | [U16](builtin-u16) val | [U32](builtin-u32) val | [U64](builtin-u64) val | [U128](builtin-u128) val | [ULong](builtin-ulong) val | [USize](builtin-usize) val) & [Integer](builtin-integer)[A] val)]

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L1475)

 Read an integer from the specified location in this string. The integer value read and the number of bytes consumed are reported. The base parameter specifies the base to use, 0 indicates using the prefix, if any, to detect base 2, 10 or 16. If no integer is found at the specified location, then (0, 0) is returned, since no characters have been used. An integer out of range for the target type throws an error. A leading minus is allowed for signed integer types. Underscore characters are allowed throughout the integer and are ignored.

 
```
fun box read_int[A: ((I8 val | I16 val | I32 val | 
    I64 val | I128 val | ILong val | 
    ISize val | U8 val | U16 val | 
    U32 val | U64 val | U128 val | 
    ULong val | USize val) & Integer[A] val)](
  offset: ISize val = 0,
  base: U8 val = 0)
: (A , USize val) ?

```
 #### Parameters

 * offset: [ISize](builtin-isize) val = 0
* base: [U8](builtin-u8) val = 0

 #### Returns

 * (A , [USize](builtin-usize) val) ?

 ### f32

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L1590)

 Convert this string starting at the given offset to a 32-bit floating point number ([F32](builtin-f32)).

 This method errors if this string cannot be parsed to a float, if the result would over- or underflow, the offset exceeds the size of this string or there are leftover characters in the string after conversion.

 Examples:

 
```
"1.5".f32()? == F32(1.5)
"1.19208e-07".f32()? == F32(1.19208e-07)
"NaN".f32()?.nan() == true

```
 
```
fun box f32(
  offset: ISize val = 0)
: F32 val ?

```
 #### Parameters

 * offset: [ISize](builtin-isize) val = 0

 #### Returns

 * [F32](builtin-f32) val ?

 ### f64

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L1623)

 Convert this string starting at the given offset to a 64-bit floating point number ([F64](builtin-f64)).

 This method errors if this string cannot be parsed to a float, if the result would over- or underflow, the offset exceeds the size of this string or there are leftover characters in the string after conversion.

 Examples:

 
```
"1.5".f64()? == F64(1.5)
"1.19208e-07".f64()? == F64(1.19208e-07)
"Inf".f64()?.infinite() == true

```
 
```
fun box f64(
  offset: ISize val = 0)
: F64 val ?

```
 #### Parameters

 * offset: [ISize](builtin-isize) val = 0

 #### Returns

 * [F64](builtin-f64) val ?

 ### hash

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L1656)

 
```
fun box hash()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### hash64

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L1659)

 
```
fun box hash64()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### string

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L1662)

 
```
fun box string()
: String iso^

```
 #### Returns

 * [String](index) iso^

 ### values

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L1665)

 Return an iterator over the bytes in the string.

 
```
fun box values()
: StringBytes ref^

```
 #### Returns

 * [StringBytes](builtin-stringbytes) ref^

 ### runes

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L1671)

 Return an iterator over the codepoints in the string.

 
```
fun box runes()
: StringRunes ref^

```
 #### Returns

 * [StringRunes](builtin-stringrunes) ref^

 ### ge

 
```
fun box ge(
  that: String box)
: Bool val

```
 #### Parameters

 * that: [String](index) box

 #### Returns

 * [Bool](builtin-bool) val

 ### gt

 
```
fun box gt(
  that: String box)
: Bool val

```
 #### Parameters

 * that: [String](index) box

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 
```
fun box ne(
  that: String box)
: Bool val

```
 #### Parameters

 * that: [String](index) box

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/builtin-String>

Writer
======

 [[Source]](https://stdlib.ponylang.io/src/buffered/writer/#L1)

 A buffer for building messages.

 `Writer` provides an way to create byte sequences using common data encodings. The `Writer` manages the underlying arrays and sizes. It is useful for encoding data to send over a network or store in a file. Once a message has been built you can call `done()` to get the message's `ByteSeq`s, and you can then reuse the `Writer` for creating a new message.

 For example, suppose we have a TCP-based network data protocol where messages consist of the following:

 * `message_length` - the number of bytes in the message as a big-endian 32-bit integer
* `list_size` - the number of items in the following list of items as a big-endian 32-bit integer
* zero or more items of the following data:
* a big-endian 64-bit floating point number
* a string that starts with a big-endian 32-bit integer that specifies the length of the string, followed by a number of bytes that represent the string

 A message would be something like this:

 
```
[message_length][list_size][float1][string1][float2][string2]...

```
 The following program uses a write buffer to encode an array of tuples as a message of this type:

 
```
use "buffered"

actor Main
  new create(env: Env) =>
    let wb = Writer
    let messages = [[(F32(3597.82), "Anderson"); (F32(-7979.3), "Graham")]
                    [(F32(3.14159), "Hopper"); (F32(-83.83), "Jones")]]
    for items in messages.values() do
      wb.i32_be((items.size() / 2).i32())
      for (f, s) in items.values() do
        wb.f32_be(f)
        wb.i32_be(s.size().i32())
        wb.write(s.array())
      end
      let wb_msg = Writer
      wb_msg.i32_be(wb.size().i32())
      wb_msg.writev(wb.done())
      env.out.writev(wb_msg.done())
    end

```
 
```
class ref Writer

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/buffered/writer/#L1)

 
```
new iso create()
: Writer iso^

```
 #### Returns

 * [Writer](index) iso^

 Public Functions
----------------

 ### reserve\_chunks

 [[Source]](https://stdlib.ponylang.io/src/buffered/writer/#L60)

 Reserve space for size' chunks.

 This needs to be recalled after every call to `done` as `done` resets the chunks.

 
```
fun ref reserve_chunks(
  size': USize val)
: None val

```
 #### Parameters

 * size': [USize](builtin-usize) val

 #### Returns

 * [None](builtin-none) val

 ### reserve\_current

 [[Source]](https://stdlib.ponylang.io/src/buffered/writer/#L69)

 Reserve space for size bytes in `_current`.

 
```
fun ref reserve_current(
  size': USize val)
: None val

```
 #### Parameters

 * size': [USize](builtin-usize) val

 #### Returns

 * [None](builtin-none) val

 ### size

 [[Source]](https://stdlib.ponylang.io/src/buffered/writer/#L75)

 
```
fun box size()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### u8

 [[Source]](https://stdlib.ponylang.io/src/buffered/writer/#L78)

 Write a byte to the buffer.

 
```
fun ref u8(
  data: U8 val)
: None val

```
 #### Parameters

 * data: [U8](builtin-u8) val

 #### Returns

 * [None](builtin-none) val

 ### u16\_le

 [[Source]](https://stdlib.ponylang.io/src/buffered/writer/#L86)

 Write a U16 to the buffer in little-endian byte order.

 
```
fun ref u16_le(
  data: U16 val)
: None val

```
 #### Parameters

 * data: [U16](builtin-u16) val

 #### Returns

 * [None](builtin-none) val

 ### u16\_be

 [[Source]](https://stdlib.ponylang.io/src/buffered/writer/#L98)

 Write a U16 to the buffer in big-endian byte order.

 
```
fun ref u16_be(
  data: U16 val)
: None val

```
 #### Parameters

 * data: [U16](builtin-u16) val

 #### Returns

 * [None](builtin-none) val

 ### i16\_le

 [[Source]](https://stdlib.ponylang.io/src/buffered/writer/#L110)

 Write an I16 to the buffer in little-endian byte order.

 
```
fun ref i16_le(
  data: I16 val)
: None val

```
 #### Parameters

 * data: [I16](builtin-i16) val

 #### Returns

 * [None](builtin-none) val

 ### i16\_be

 [[Source]](https://stdlib.ponylang.io/src/buffered/writer/#L116)

 Write an I16 to the buffer in big-endian byte order.

 
```
fun ref i16_be(
  data: I16 val)
: None val

```
 #### Parameters

 * data: [I16](builtin-i16) val

 #### Returns

 * [None](builtin-none) val

 ### u32\_le

 [[Source]](https://stdlib.ponylang.io/src/buffered/writer/#L122)

 Write a U32 to the buffer in little-endian byte order.

 
```
fun ref u32_le(
  data: U32 val)
: None val

```
 #### Parameters

 * data: [U32](builtin-u32) val

 #### Returns

 * [None](builtin-none) val

 ### u32\_be

 [[Source]](https://stdlib.ponylang.io/src/buffered/writer/#L134)

 Write a U32 to the buffer in big-endian byte order.

 
```
fun ref u32_be(
  data: U32 val)
: None val

```
 #### Parameters

 * data: [U32](builtin-u32) val

 #### Returns

 * [None](builtin-none) val

 ### i32\_le

 [[Source]](https://stdlib.ponylang.io/src/buffered/writer/#L146)

 Write an I32 to the buffer in little-endian byte order.

 
```
fun ref i32_le(
  data: I32 val)
: None val

```
 #### Parameters

 * data: [I32](builtin-i32) val

 #### Returns

 * [None](builtin-none) val

 ### i32\_be

 [[Source]](https://stdlib.ponylang.io/src/buffered/writer/#L152)

 Write an I32 to the buffer in big-endian byte order.

 
```
fun ref i32_be(
  data: I32 val)
: None val

```
 #### Parameters

 * data: [I32](builtin-i32) val

 #### Returns

 * [None](builtin-none) val

 ### f32\_le

 [[Source]](https://stdlib.ponylang.io/src/buffered/writer/#L158)

 Write an F32 to the buffer in little-endian byte order.

 
```
fun ref f32_le(
  data: F32 val)
: None val

```
 #### Parameters

 * data: [F32](builtin-f32) val

 #### Returns

 * [None](builtin-none) val

 ### f32\_be

 [[Source]](https://stdlib.ponylang.io/src/buffered/writer/#L164)

 Write an F32 to the buffer in big-endian byte order.

 
```
fun ref f32_be(
  data: F32 val)
: None val

```
 #### Parameters

 * data: [F32](builtin-f32) val

 #### Returns

 * [None](builtin-none) val

 ### u64\_le

 [[Source]](https://stdlib.ponylang.io/src/buffered/writer/#L170)

 Write a U64 to the buffer in little-endian byte order.

 
```
fun ref u64_le(
  data: U64 val)
: None val

```
 #### Parameters

 * data: [U64](builtin-u64) val

 #### Returns

 * [None](builtin-none) val

 ### u64\_be

 [[Source]](https://stdlib.ponylang.io/src/buffered/writer/#L182)

 Write a U64 to the buffer in big-endian byte order.

 
```
fun ref u64_be(
  data: U64 val)
: None val

```
 #### Parameters

 * data: [U64](builtin-u64) val

 #### Returns

 * [None](builtin-none) val

 ### i64\_le

 [[Source]](https://stdlib.ponylang.io/src/buffered/writer/#L194)

 Write an I64 to the buffer in little-endian byte order.

 
```
fun ref i64_le(
  data: I64 val)
: None val

```
 #### Parameters

 * data: [I64](builtin-i64) val

 #### Returns

 * [None](builtin-none) val

 ### i64\_be

 [[Source]](https://stdlib.ponylang.io/src/buffered/writer/#L200)

 Write an I64 to the buffer in big-endian byte order.

 
```
fun ref i64_be(
  data: I64 val)
: None val

```
 #### Parameters

 * data: [I64](builtin-i64) val

 #### Returns

 * [None](builtin-none) val

 ### f64\_le

 [[Source]](https://stdlib.ponylang.io/src/buffered/writer/#L206)

 Write an F64 to the buffer in little-endian byte order.

 
```
fun ref f64_le(
  data: F64 val)
: None val

```
 #### Parameters

 * data: [F64](builtin-f64) val

 #### Returns

 * [None](builtin-none) val

 ### f64\_be

 [[Source]](https://stdlib.ponylang.io/src/buffered/writer/#L212)

 Write an F64 to the buffer in big-endian byte order.

 
```
fun ref f64_be(
  data: F64 val)
: None val

```
 #### Parameters

 * data: [F64](builtin-f64) val

 #### Returns

 * [None](builtin-none) val

 ### u128\_le

 [[Source]](https://stdlib.ponylang.io/src/buffered/writer/#L218)

 Write a U128 to the buffer in little-endian byte order.

 
```
fun ref u128_le(
  data: U128 val)
: None val

```
 #### Parameters

 * data: [U128](builtin-u128) val

 #### Returns

 * [None](builtin-none) val

 ### u128\_be

 [[Source]](https://stdlib.ponylang.io/src/buffered/writer/#L230)

 Write a U128 to the buffer in big-endian byte order.

 
```
fun ref u128_be(
  data: U128 val)
: None val

```
 #### Parameters

 * data: [U128](builtin-u128) val

 #### Returns

 * [None](builtin-none) val

 ### i128\_le

 [[Source]](https://stdlib.ponylang.io/src/buffered/writer/#L242)

 Write an I128 to the buffer in little-endian byte order.

 
```
fun ref i128_le(
  data: I128 val)
: None val

```
 #### Parameters

 * data: [I128](builtin-i128) val

 #### Returns

 * [None](builtin-none) val

 ### i128\_be

 [[Source]](https://stdlib.ponylang.io/src/buffered/writer/#L248)

 Write an I128 to the buffer in big-endian byte order.

 
```
fun ref i128_be(
  data: I128 val)
: None val

```
 #### Parameters

 * data: [I128](builtin-i128) val

 #### Returns

 * [None](builtin-none) val

 ### write

 [[Source]](https://stdlib.ponylang.io/src/buffered/writer/#L254)

 Write a ByteSeq to the buffer.

 
```
fun ref write(
  data: (String val | Array[U8 val] val))
: None val

```
 #### Parameters

 * data: ([String](builtin-string) val | [Array](builtin-array)[[U8](builtin-u8) val] val)

 #### Returns

 * [None](builtin-none) val

 ### writev

 [[Source]](https://stdlib.ponylang.io/src/buffered/writer/#L277)

 Write ByteSeqs to the buffer.

 
```
fun ref writev(
  data: ByteSeqIter val)
: None val

```
 #### Parameters

 * data: [ByteSeqIter](builtin-byteseqiter) val

 #### Returns

 * [None](builtin-none) val

 ### done

 [[Source]](https://stdlib.ponylang.io/src/buffered/writer/#L285)

 Return an array of buffered ByteSeqs and reset the Writer's buffer.

 
```
fun ref done()
: Array[(String val | Array[U8 val] val)] iso^

```
 #### Returns

 * [Array](builtin-array)[([String](builtin-string) val | [Array](builtin-array)[[U8](builtin-u8) val] val)] iso^



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/buffered-Writer>

F64
===

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L218)

 
```
primitive val F64 is
  FloatingPoint[F64 val] val

```
 #### Implements

 * [FloatingPoint](builtin-floatingpoint)[[F64](index) val] val

 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L219)

 
```
new val create(
  value: F64 val = 0)
: F64 val^

```
 #### Parameters

 * value: [F64](index) val = 0

 #### Returns

 * [F64](index) val^

 ### pi

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L220)

 
```
new val pi()
: F64 val^

```
 #### Returns

 * [F64](index) val^

 ### e

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L221)

 
```
new val e()
: F64 val^

```
 #### Returns

 * [F64](index) val^

 ### from\_bits

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L226)

 
```
new val from_bits(
  i: U64 val)
: F64 val^

```
 #### Parameters

 * i: [U64](builtin-u64) val

 #### Returns

 * [F64](index) val^

 ### from[B: (([I8](builtin-i8) val | [I16](builtin-i16) val | [I32](builtin-i32) val | [I64](builtin-i64) val | [I128](builtin-i128) val | [ILong](builtin-ilong) val | [ISize](builtin-isize) val | [U8](builtin-u8) val | [U16](builtin-u16) val | [U32](builtin-u32) val | [U64](builtin-u64) val | [U128](builtin-u128) val | [ULong](builtin-ulong) val | [USize](builtin-usize) val | [F32](builtin-f32) val | [F64](index) val) & [Real](builtin-real)[B] val)]

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L228)

 
```
new val from[B: ((I8 val | I16 val | I32 val | 
    I64 val | I128 val | ILong val | 
    ISize val | U8 val | U16 val | 
    U32 val | U64 val | U128 val | 
    ULong val | USize val | F32 val | 
    F64 val) & Real[B] val)](
  a: B)
: F64 val^

```
 #### Parameters

 * a: B

 #### Returns

 * [F64](index) val^

 ### min\_value

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L230)

 Minimum negative value representable.

 
```
new val min_value()
: F64 val^

```
 #### Returns

 * [F64](index) val^

 ### max\_value

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L236)

 Maximum positive value representable.

 
```
new val max_value()
: F64 val^

```
 #### Returns

 * [F64](index) val^

 ### min\_normalised

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L242)

 Minimum positive value representable at full precision (ie a normalised number).

 
```
new val min_normalised()
: F64 val^

```
 #### Returns

 * [F64](index) val^

 ### epsilon

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L249)

 Minimum positive value such that (1 + epsilon) != 1.

 
```
new val epsilon()
: F64 val^

```
 #### Returns

 * [F64](index) val^

 Public Functions
----------------

 ### bits

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L227)

 
```
fun box bits()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### radix

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L255)

 Exponent radix.

 
```
fun tag radix()
: U8 val

```
 #### Returns

 * [U8](builtin-u8) val

 ### precision2

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L261)

 Mantissa precision in bits.

 
```
fun tag precision2()
: U8 val

```
 #### Returns

 * [U8](builtin-u8) val

 ### precision10

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L267)

 Mantissa precision in decimal digits.

 
```
fun tag precision10()
: U8 val

```
 #### Returns

 * [U8](builtin-u8) val

 ### min\_exp2

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L273)

 Minimum exponent value such that (2^exponent) - 1 is representable at full precision (ie a normalised number).

 
```
fun tag min_exp2()
: I16 val

```
 #### Returns

 * [I16](builtin-i16) val

 ### min\_exp10

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L280)

 Minimum exponent value such that (10^exponent) - 1 is representable at full precision (ie a normalised number).

 
```
fun tag min_exp10()
: I16 val

```
 #### Returns

 * [I16](builtin-i16) val

 ### max\_exp2

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L287)

 Maximum exponent value such that (2^exponent) - 1 is representable.

 
```
fun tag max_exp2()
: I16 val

```
 #### Returns

 * [I16](builtin-i16) val

 ### max\_exp10

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L293)

 Maximum exponent value such that (10^exponent) - 1 is representable.

 
```
fun tag max_exp10()
: I16 val

```
 #### Returns

 * [I16](builtin-i16) val

 ### abs

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L299)

 
```
fun box abs()
: F64 val

```
 #### Returns

 * [F64](index) val

 ### ceil

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L300)

 
```
fun box ceil()
: F64 val

```
 #### Returns

 * [F64](index) val

 ### floor

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L301)

 
```
fun box floor()
: F64 val

```
 #### Returns

 * [F64](index) val

 ### round

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L302)

 
```
fun box round()
: F64 val

```
 #### Returns

 * [F64](index) val

 ### trunc

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L303)

 
```
fun box trunc()
: F64 val

```
 #### Returns

 * [F64](index) val

 ### min

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L305)

 
```
fun box min(
  y: F64 val)
: F64 val

```
 #### Parameters

 * y: [F64](index) val

 #### Returns

 * [F64](index) val

 ### max

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L306)

 
```
fun box max(
  y: F64 val)
: F64 val

```
 #### Parameters

 * y: [F64](index) val

 #### Returns

 * [F64](index) val

 ### fld

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L308)

 
```
fun box fld(
  y: F64 val)
: F64 val

```
 #### Parameters

 * y: [F64](index) val

 #### Returns

 * [F64](index) val

 ### fld\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L311)

 
```
fun box fld_unsafe(
  y: F64 val)
: F64 val

```
 #### Parameters

 * y: [F64](index) val

 #### Returns

 * [F64](index) val

 ### mod

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L314)

 
```
fun box mod(
  y: F64 val)
: F64 val

```
 #### Parameters

 * y: [F64](index) val

 #### Returns

 * [F64](index) val

 ### mod\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L324)

 
```
fun box mod_unsafe(
  y: F64 val)
: F64 val

```
 #### Parameters

 * y: [F64](index) val

 #### Returns

 * [F64](index) val

 ### finite

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L334)

 Check whether this number is finite, ie not +/-infinity and not NaN.

 
```
fun box finite()
: Bool val

```
 #### Returns

 * [Bool](builtin-bool) val

 ### infinite

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L341)

 Check whether this number is +/-infinity

 
```
fun box infinite()
: Bool val

```
 #### Returns

 * [Bool](builtin-bool) val

 ### nan

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L349)

 Check whether this number is NaN.

 
```
fun box nan()
: Bool val

```
 #### Returns

 * [Bool](builtin-bool) val

 ### ldexp

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L357)

 
```
fun box ldexp(
  x: F64 val,
  exponent: I32 val)
: F64 val

```
 #### Parameters

 * x: [F64](index) val
* exponent: [I32](builtin-i32) val

 #### Returns

 * [F64](index) val

 ### frexp

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L360)

 
```
fun box frexp()
: (F64 val , U32 val)

```
 #### Returns

 * ([F64](index) val , [U32](builtin-u32) val)

 ### log

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L365)

 
```
fun box log()
: F64 val

```
 #### Returns

 * [F64](index) val

 ### log2

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L366)

 
```
fun box log2()
: F64 val

```
 #### Returns

 * [F64](index) val

 ### log10

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L367)

 
```
fun box log10()
: F64 val

```
 #### Returns

 * [F64](index) val

 ### logb

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L368)

 
```
fun box logb()
: F64 val

```
 #### Returns

 * [F64](index) val

 ### pow

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L370)

 
```
fun box pow(
  y: F64 val)
: F64 val

```
 #### Parameters

 * y: [F64](index) val

 #### Returns

 * [F64](index) val

 ### powi

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L371)

 
```
fun box powi(
  y: I32 val)
: F64 val

```
 #### Parameters

 * y: [I32](builtin-i32) val

 #### Returns

 * [F64](index) val

 ### sqrt

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L378)

 
```
fun box sqrt()
: F64 val

```
 #### Returns

 * [F64](index) val

 ### sqrt\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L385)

 Unsafe operation. If this is negative, the result is undefined.

 
```
fun box sqrt_unsafe()
: F64 val

```
 #### Returns

 * [F64](index) val

 ### cbrt

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L392)

 
```
fun box cbrt()
: F64 val

```
 #### Returns

 * [F64](index) val

 ### exp

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L393)

 
```
fun box exp()
: F64 val

```
 #### Returns

 * [F64](index) val

 ### exp2

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L394)

 
```
fun box exp2()
: F64 val

```
 #### Returns

 * [F64](index) val

 ### cos

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L396)

 
```
fun box cos()
: F64 val

```
 #### Returns

 * [F64](index) val

 ### sin

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L397)

 
```
fun box sin()
: F64 val

```
 #### Returns

 * [F64](index) val

 ### tan

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L398)

 
```
fun box tan()
: F64 val

```
 #### Returns

 * [F64](index) val

 ### cosh

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L400)

 
```
fun box cosh()
: F64 val

```
 #### Returns

 * [F64](index) val

 ### sinh

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L401)

 
```
fun box sinh()
: F64 val

```
 #### Returns

 * [F64](index) val

 ### tanh

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L402)

 
```
fun box tanh()
: F64 val

```
 #### Returns

 * [F64](index) val

 ### acos

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L404)

 
```
fun box acos()
: F64 val

```
 #### Returns

 * [F64](index) val

 ### asin

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L405)

 
```
fun box asin()
: F64 val

```
 #### Returns

 * [F64](index) val

 ### atan

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L406)

 
```
fun box atan()
: F64 val

```
 #### Returns

 * [F64](index) val

 ### atan2

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L407)

 
```
fun box atan2(
  y: F64 val)
: F64 val

```
 #### Parameters

 * y: [F64](index) val

 #### Returns

 * [F64](index) val

 ### acosh

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L409)

 
```
fun box acosh()
: F64 val

```
 #### Returns

 * [F64](index) val

 ### asinh

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L410)

 
```
fun box asinh()
: F64 val

```
 #### Returns

 * [F64](index) val

 ### atanh

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L411)

 
```
fun box atanh()
: F64 val

```
 #### Returns

 * [F64](index) val

 ### copysign

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L413)

 
```
fun box copysign(
  sign: F64 val)
: F64 val

```
 #### Parameters

 * sign: [F64](index) val

 #### Returns

 * [F64](index) val

 ### hash

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L415)

 
```
fun box hash()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### hash64

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L416)

 
```
fun box hash64()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### i128

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L418)

 
```
fun box i128()
: I128 val

```
 #### Returns

 * [I128](builtin-i128) val

 ### u128

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L445)

 
```
fun box u128()
: U128 val

```
 #### Returns

 * [U128](builtin-u128) val

 ### i128\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L471)

 Unsafe operation. If the value doesn't fit in the destination type, the result is undefined.

 
```
fun box i128_unsafe()
: I128 val

```
 #### Returns

 * [I128](builtin-i128) val

 ### u128\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L478)

 Unsafe operation. If the value doesn't fit in the destination type, the result is undefined.

 
```
fun box u128_unsafe()
: U128 val

```
 #### Returns

 * [U128](builtin-u128) val

 ### add\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L527)

 
```
fun box add_unsafe(
  y: F64 val)
: F64 val

```
 #### Parameters

 * y: [F64](index) val

 #### Returns

 * [F64](index) val

 ### sub\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L536)

 
```
fun box sub_unsafe(
  y: F64 val)
: F64 val

```
 #### Parameters

 * y: [F64](index) val

 #### Returns

 * [F64](index) val

 ### mul\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L545)

 
```
fun box mul_unsafe(
  y: F64 val)
: F64 val

```
 #### Parameters

 * y: [F64](index) val

 #### Returns

 * [F64](index) val

 ### div\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L554)

 
```
fun box div_unsafe(
  y: F64 val)
: F64 val

```
 #### Parameters

 * y: [F64](index) val

 #### Returns

 * [F64](index) val

 ### divrem\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L571)

 
```
fun box divrem_unsafe(
  y: F64 val)
: (F64 val , F64 val)

```
 #### Parameters

 * y: [F64](index) val

 #### Returns

 * ([F64](index) val , [F64](index) val)

 ### rem\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L580)

 
```
fun box rem_unsafe(
  y: F64 val)
: F64 val

```
 #### Parameters

 * y: [F64](index) val

 #### Returns

 * [F64](index) val

 ### neg\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L597)

 
```
fun box neg_unsafe()
: F64 val

```
 #### Returns

 * [F64](index) val

 ### eq\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L606)

 
```
fun box eq_unsafe(
  y: F64 val)
: Bool val

```
 #### Parameters

 * y: [F64](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L615)

 
```
fun box ne_unsafe(
  y: F64 val)
: Bool val

```
 #### Parameters

 * y: [F64](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### lt\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L624)

 
```
fun box lt_unsafe(
  y: F64 val)
: Bool val

```
 #### Parameters

 * y: [F64](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### le\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L633)

 
```
fun box le_unsafe(
  y: F64 val)
: Bool val

```
 #### Parameters

 * y: [F64](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ge\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L642)

 
```
fun box ge_unsafe(
  y: F64 val)
: Bool val

```
 #### Parameters

 * y: [F64](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### gt\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L651)

 
```
fun box gt_unsafe(
  y: F64 val)
: Bool val

```
 #### Parameters

 * y: [F64](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### string

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L711)

 
```
fun box string()
: String iso^

```
 #### Returns

 * [String](builtin-string) iso^

 ### add

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L141)

 
```
fun box add(
  y: F64 val)
: F64 val

```
 #### Parameters

 * y: [F64](index) val

 #### Returns

 * [F64](index) val

 ### sub

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L142)

 
```
fun box sub(
  y: F64 val)
: F64 val

```
 #### Parameters

 * y: [F64](index) val

 #### Returns

 * [F64](index) val

 ### mul

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L143)

 
```
fun box mul(
  y: F64 val)
: F64 val

```
 #### Parameters

 * y: [F64](index) val

 #### Returns

 * [F64](index) val

 ### div

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L144)

 
```
fun box div(
  y: F64 val)
: F64 val

```
 #### Parameters

 * y: [F64](index) val

 #### Returns

 * [F64](index) val

 ### divrem

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L150)

 
```
fun box divrem(
  y: F64 val)
: (F64 val , F64 val)

```
 #### Parameters

 * y: [F64](index) val

 #### Returns

 * ([F64](index) val , [F64](index) val)

 ### rem

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L151)

 
```
fun box rem(
  y: F64 val)
: F64 val

```
 #### Parameters

 * y: [F64](index) val

 #### Returns

 * [F64](index) val

 ### neg

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L159)

 
```
fun box neg()
: F64 val

```
 #### Returns

 * [F64](index) val

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L172)

 
```
fun box eq(
  y: F64 val)
: Bool val

```
 #### Parameters

 * y: [F64](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L173)

 
```
fun box ne(
  y: F64 val)
: Bool val

```
 #### Parameters

 * y: [F64](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### lt

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L174)

 
```
fun box lt(
  y: F64 val)
: Bool val

```
 #### Parameters

 * y: [F64](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### le

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L175)

 
```
fun box le(
  y: F64 val)
: Bool val

```
 #### Parameters

 * y: [F64](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ge

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L176)

 
```
fun box ge(
  y: F64 val)
: Bool val

```
 #### Parameters

 * y: [F64](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### gt

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L177)

 
```
fun box gt(
  y: F64 val)
: Bool val

```
 #### Parameters

 * y: [F64](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### i8

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L2)

 
```
fun box i8()
: I8 val

```
 #### Returns

 * [I8](builtin-i8) val

 ### i16

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L3)

 
```
fun box i16()
: I16 val

```
 #### Returns

 * [I16](builtin-i16) val

 ### i32

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L4)

 
```
fun box i32()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### i64

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L5)

 
```
fun box i64()
: I64 val

```
 #### Returns

 * [I64](builtin-i64) val

 ### ilong

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L7)

 
```
fun box ilong()
: ILong val

```
 #### Returns

 * [ILong](builtin-ilong) val

 ### isize

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L8)

 
```
fun box isize()
: ISize val

```
 #### Returns

 * [ISize](builtin-isize) val

 ### u8

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L10)

 
```
fun box u8()
: U8 val

```
 #### Returns

 * [U8](builtin-u8) val

 ### u16

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L11)

 
```
fun box u16()
: U16 val

```
 #### Returns

 * [U16](builtin-u16) val

 ### u32

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L12)

 
```
fun box u32()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### u64

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L13)

 
```
fun box u64()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### ulong

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L15)

 
```
fun box ulong()
: ULong val

```
 #### Returns

 * [ULong](builtin-ulong) val

 ### usize

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L16)

 
```
fun box usize()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### f32

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L18)

 
```
fun box f32()
: F32 val

```
 #### Returns

 * [F32](builtin-f32) val

 ### f64

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L19)

 
```
fun box f64()
: F64 val

```
 #### Returns

 * [F64](index) val

 ### i8\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L21)

 
```
fun box i8_unsafe()
: I8 val

```
 #### Returns

 * [I8](builtin-i8) val

 ### i16\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L28)

 
```
fun box i16_unsafe()
: I16 val

```
 #### Returns

 * [I16](builtin-i16) val

 ### i32\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L35)

 
```
fun box i32_unsafe()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### i64\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L42)

 
```
fun box i64_unsafe()
: I64 val

```
 #### Returns

 * [I64](builtin-i64) val

 ### ilong\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L56)

 
```
fun box ilong_unsafe()
: ILong val

```
 #### Returns

 * [ILong](builtin-ilong) val

 ### isize\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L63)

 
```
fun box isize_unsafe()
: ISize val

```
 #### Returns

 * [ISize](builtin-isize) val

 ### u8\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L70)

 
```
fun box u8_unsafe()
: U8 val

```
 #### Returns

 * [U8](builtin-u8) val

 ### u16\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L77)

 
```
fun box u16_unsafe()
: U16 val

```
 #### Returns

 * [U16](builtin-u16) val

 ### u32\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L84)

 
```
fun box u32_unsafe()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### u64\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L91)

 
```
fun box u64_unsafe()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### ulong\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L105)

 
```
fun box ulong_unsafe()
: ULong val

```
 #### Returns

 * [ULong](builtin-ulong) val

 ### usize\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L112)

 
```
fun box usize_unsafe()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### f32\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L119)

 
```
fun box f32_unsafe()
: F32 val

```
 #### Returns

 * [F32](builtin-f32) val

 ### f64\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L126)

 
```
fun box f64_unsafe()
: F64 val

```
 #### Returns

 * [F64](index) val

 ### compare

 
```
fun box compare(
  that: F64 val)
: (Less val | Equal val | Greater val)

```
 #### Parameters

 * that: [F64](index) val

 #### Returns

 * ([Less](builtin-less) val | [Equal](builtin-equal) val | [Greater](builtin-greater) val)



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/builtin-F64>

I64
===

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L278)

 
```
primitive val I64 is
  SignedInteger[I64 val, U64 val] val

```
 #### Implements

 * [SignedInteger](builtin-signedinteger)[[I64](index) val, [U64](builtin-u64) val] val

 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L279)

 
```
new val create(
  value: I64 val)
: I64 val^

```
 #### Parameters

 * value: [I64](index) val

 #### Returns

 * [I64](index) val^

 ### from[A: (([I8](builtin-i8) val | [I16](builtin-i16) val | [I32](builtin-i32) val | [I64](index) val | [I128](builtin-i128) val | [ILong](builtin-ilong) val | [ISize](builtin-isize) val | [U8](builtin-u8) val | [U16](builtin-u16) val | [U32](builtin-u32) val | [U64](builtin-u64) val | [U128](builtin-u128) val | [ULong](builtin-ulong) val | [USize](builtin-usize) val | [F32](builtin-f32) val | [F64](builtin-f64) val) & [Real](builtin-real)[A] val)]

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L280)

 
```
new val from[A: ((I8 val | I16 val | I32 val | 
    I64 val | I128 val | ILong val | 
    ISize val | U8 val | U16 val | 
    U32 val | U64 val | U128 val | 
    ULong val | USize val | F32 val | 
    F64 val) & Real[A] val)](
  a: A)
: I64 val^

```
 #### Parameters

 * a: A

 #### Returns

 * [I64](index) val^

 ### min\_value

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L282)

 
```
new val min_value()
: I64 val^

```
 #### Returns

 * [I64](index) val^

 ### max\_value

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L283)

 
```
new val max_value()
: I64 val^

```
 #### Returns

 * [I64](index) val^

 Public Functions
----------------

 ### abs

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L285)

 
```
fun box abs()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### bit\_reverse

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L286)

 
```
fun box bit_reverse()
: I64 val

```
 #### Returns

 * [I64](index) val

 ### bswap

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L287)

 
```
fun box bswap()
: I64 val

```
 #### Returns

 * [I64](index) val

 ### popcount

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L288)

 
```
fun box popcount()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### clz

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L289)

 
```
fun box clz()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### ctz

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L290)

 
```
fun box ctz()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### clz\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L292)

 Unsafe operation. If this is 0, the result is undefined.

 
```
fun box clz_unsafe()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### ctz\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L299)

 Unsafe operation. If this is 0, the result is undefined.

 
```
fun box ctz_unsafe()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### bitwidth

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L306)

 
```
fun box bitwidth()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### bytewidth

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L308)

 
```
fun box bytewidth()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### min

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L310)

 
```
fun box min(
  y: I64 val)
: I64 val

```
 #### Parameters

 * y: [I64](index) val

 #### Returns

 * [I64](index) val

 ### max

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L311)

 
```
fun box max(
  y: I64 val)
: I64 val

```
 #### Parameters

 * y: [I64](index) val

 #### Returns

 * [I64](index) val

 ### fld

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L313)

 
```
fun box fld(
  y: I64 val)
: I64 val

```
 #### Parameters

 * y: [I64](index) val

 #### Returns

 * [I64](index) val

 ### fld\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L316)

 
```
fun box fld_unsafe(
  y: I64 val)
: I64 val

```
 #### Parameters

 * y: [I64](index) val

 #### Returns

 * [I64](index) val

 ### mod

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L319)

 
```
fun box mod(
  y: I64 val)
: I64 val

```
 #### Parameters

 * y: [I64](index) val

 #### Returns

 * [I64](index) val

 ### mod\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L322)

 
```
fun box mod_unsafe(
  y: I64 val)
: I64 val

```
 #### Parameters

 * y: [I64](index) val

 #### Returns

 * [I64](index) val

 ### hash

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L325)

 
```
fun box hash()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### addc

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L327)

 
```
fun box addc(
  y: I64 val)
: (I64 val , Bool val)

```
 #### Parameters

 * y: [I64](index) val

 #### Returns

 * ([I64](index) val , [Bool](builtin-bool) val)

 ### subc

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L330)

 
```
fun box subc(
  y: I64 val)
: (I64 val , Bool val)

```
 #### Parameters

 * y: [I64](index) val

 #### Returns

 * ([I64](index) val , [Bool](builtin-bool) val)

 ### mulc

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L333)

 
```
fun box mulc(
  y: I64 val)
: (I64 val , Bool val)

```
 #### Parameters

 * y: [I64](index) val

 #### Returns

 * ([I64](index) val , [Bool](builtin-bool) val)

 ### divc

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L336)

 
```
fun box divc(
  y: I64 val)
: (I64 val , Bool val)

```
 #### Parameters

 * y: [I64](index) val

 #### Returns

 * ([I64](index) val , [Bool](builtin-bool) val)

 ### remc

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L339)

 
```
fun box remc(
  y: I64 val)
: (I64 val , Bool val)

```
 #### Parameters

 * y: [I64](index) val

 #### Returns

 * ([I64](index) val , [Bool](builtin-bool) val)

 ### fldc

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L342)

 
```
fun box fldc(
  y: I64 val)
: (I64 val , Bool val)

```
 #### Parameters

 * y: [I64](index) val

 #### Returns

 * ([I64](index) val , [Bool](builtin-bool) val)

 ### modc

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L345)

 
```
fun box modc(
  y: I64 val)
: (I64 val , Bool val)

```
 #### Parameters

 * y: [I64](index) val

 #### Returns

 * ([I64](index) val , [Bool](builtin-bool) val)

 ### add\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L348)

 
```
fun box add_partial(
  y: I64 val)
: I64 val ?

```
 #### Parameters

 * y: [I64](index) val

 #### Returns

 * [I64](index) val ?

 ### sub\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L351)

 
```
fun box sub_partial(
  y: I64 val)
: I64 val ?

```
 #### Parameters

 * y: [I64](index) val

 #### Returns

 * [I64](index) val ?

 ### mul\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L354)

 
```
fun box mul_partial(
  y: I64 val)
: I64 val ?

```
 #### Parameters

 * y: [I64](index) val

 #### Returns

 * [I64](index) val ?

 ### div\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L357)

 
```
fun box div_partial(
  y: I64 val)
: I64 val ?

```
 #### Parameters

 * y: [I64](index) val

 #### Returns

 * [I64](index) val ?

 ### rem\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L360)

 
```
fun box rem_partial(
  y: I64 val)
: I64 val ?

```
 #### Parameters

 * y: [I64](index) val

 #### Returns

 * [I64](index) val ?

 ### divrem\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L363)

 
```
fun box divrem_partial(
  y: I64 val)
: (I64 val , I64 val) ?

```
 #### Parameters

 * y: [I64](index) val

 #### Returns

 * ([I64](index) val , [I64](index) val) ?

 ### fld\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L366)

 
```
fun box fld_partial(
  y: I64 val)
: I64 val ?

```
 #### Parameters

 * y: [I64](index) val

 #### Returns

 * [I64](index) val ?

 ### mod\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L369)

 
```
fun box mod_partial(
  y: I64 val)
: I64 val ?

```
 #### Parameters

 * y: [I64](index) val

 #### Returns

 * [I64](index) val ?

 ### shl

 
```
fun box shl(
  y: U64 val)
: I64 val

```
 #### Parameters

 * y: [U64](builtin-u64) val

 #### Returns

 * [I64](index) val

 ### shr

 
```
fun box shr(
  y: U64 val)
: I64 val

```
 #### Parameters

 * y: [U64](builtin-u64) val

 #### Returns

 * [I64](index) val

 ### shl\_unsafe

 
```
fun box shl_unsafe(
  y: U64 val)
: I64 val

```
 #### Parameters

 * y: [U64](builtin-u64) val

 #### Returns

 * [I64](index) val

 ### shr\_unsafe

 
```
fun box shr_unsafe(
  y: U64 val)
: I64 val

```
 #### Parameters

 * y: [U64](builtin-u64) val

 #### Returns

 * [I64](index) val

 ### string

 
```
fun box string()
: String iso^

```
 #### Returns

 * [String](builtin-string) iso^

 ### add\_unsafe

 
```
fun box add_unsafe(
  y: I64 val)
: I64 val

```
 #### Parameters

 * y: [I64](index) val

 #### Returns

 * [I64](index) val

 ### sub\_unsafe

 
```
fun box sub_unsafe(
  y: I64 val)
: I64 val

```
 #### Parameters

 * y: [I64](index) val

 #### Returns

 * [I64](index) val

 ### mul\_unsafe

 
```
fun box mul_unsafe(
  y: I64 val)
: I64 val

```
 #### Parameters

 * y: [I64](index) val

 #### Returns

 * [I64](index) val

 ### div\_unsafe

 
```
fun box div_unsafe(
  y: I64 val)
: I64 val

```
 #### Parameters

 * y: [I64](index) val

 #### Returns

 * [I64](index) val

 ### divrem\_unsafe

 
```
fun box divrem_unsafe(
  y: I64 val)
: (I64 val , I64 val)

```
 #### Parameters

 * y: [I64](index) val

 #### Returns

 * ([I64](index) val , [I64](index) val)

 ### rem\_unsafe

 
```
fun box rem_unsafe(
  y: I64 val)
: I64 val

```
 #### Parameters

 * y: [I64](index) val

 #### Returns

 * [I64](index) val

 ### neg\_unsafe

 
```
fun box neg_unsafe()
: I64 val

```
 #### Returns

 * [I64](index) val

 ### op\_and

 
```
fun box op_and(
  y: I64 val)
: I64 val

```
 #### Parameters

 * y: [I64](index) val

 #### Returns

 * [I64](index) val

 ### op\_or

 
```
fun box op_or(
  y: I64 val)
: I64 val

```
 #### Parameters

 * y: [I64](index) val

 #### Returns

 * [I64](index) val

 ### op\_xor

 
```
fun box op_xor(
  y: I64 val)
: I64 val

```
 #### Parameters

 * y: [I64](index) val

 #### Returns

 * [I64](index) val

 ### op\_not

 
```
fun box op_not()
: I64 val

```
 #### Returns

 * [I64](index) val

 ### add

 
```
fun box add(
  y: I64 val)
: I64 val

```
 #### Parameters

 * y: [I64](index) val

 #### Returns

 * [I64](index) val

 ### sub

 
```
fun box sub(
  y: I64 val)
: I64 val

```
 #### Parameters

 * y: [I64](index) val

 #### Returns

 * [I64](index) val

 ### mul

 
```
fun box mul(
  y: I64 val)
: I64 val

```
 #### Parameters

 * y: [I64](index) val

 #### Returns

 * [I64](index) val

 ### div

 
```
fun box div(
  y: I64 val)
: I64 val

```
 #### Parameters

 * y: [I64](index) val

 #### Returns

 * [I64](index) val

 ### divrem

 
```
fun box divrem(
  y: I64 val)
: (I64 val , I64 val)

```
 #### Parameters

 * y: [I64](index) val

 #### Returns

 * ([I64](index) val , [I64](index) val)

 ### rem

 
```
fun box rem(
  y: I64 val)
: I64 val

```
 #### Parameters

 * y: [I64](index) val

 #### Returns

 * [I64](index) val

 ### neg

 
```
fun box neg()
: I64 val

```
 #### Returns

 * [I64](index) val

 ### eq

 
```
fun box eq(
  y: I64 val)
: Bool val

```
 #### Parameters

 * y: [I64](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 
```
fun box ne(
  y: I64 val)
: Bool val

```
 #### Parameters

 * y: [I64](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### lt

 
```
fun box lt(
  y: I64 val)
: Bool val

```
 #### Parameters

 * y: [I64](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### le

 
```
fun box le(
  y: I64 val)
: Bool val

```
 #### Parameters

 * y: [I64](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ge

 
```
fun box ge(
  y: I64 val)
: Bool val

```
 #### Parameters

 * y: [I64](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### gt

 
```
fun box gt(
  y: I64 val)
: Bool val

```
 #### Parameters

 * y: [I64](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### hash64

 
```
fun box hash64()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### i8

 
```
fun box i8()
: I8 val

```
 #### Returns

 * [I8](builtin-i8) val

 ### i16

 
```
fun box i16()
: I16 val

```
 #### Returns

 * [I16](builtin-i16) val

 ### i32

 
```
fun box i32()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### i64

 
```
fun box i64()
: I64 val

```
 #### Returns

 * [I64](index) val

 ### i128

 
```
fun box i128()
: I128 val

```
 #### Returns

 * [I128](builtin-i128) val

 ### ilong

 
```
fun box ilong()
: ILong val

```
 #### Returns

 * [ILong](builtin-ilong) val

 ### isize

 
```
fun box isize()
: ISize val

```
 #### Returns

 * [ISize](builtin-isize) val

 ### u8

 
```
fun box u8()
: U8 val

```
 #### Returns

 * [U8](builtin-u8) val

 ### u16

 
```
fun box u16()
: U16 val

```
 #### Returns

 * [U16](builtin-u16) val

 ### u32

 
```
fun box u32()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### u64

 
```
fun box u64()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### u128

 
```
fun box u128()
: U128 val

```
 #### Returns

 * [U128](builtin-u128) val

 ### ulong

 
```
fun box ulong()
: ULong val

```
 #### Returns

 * [ULong](builtin-ulong) val

 ### usize

 
```
fun box usize()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### f32

 
```
fun box f32()
: F32 val

```
 #### Returns

 * [F32](builtin-f32) val

 ### f64

 
```
fun box f64()
: F64 val

```
 #### Returns

 * [F64](builtin-f64) val

 ### i8\_unsafe

 
```
fun box i8_unsafe()
: I8 val

```
 #### Returns

 * [I8](builtin-i8) val

 ### i16\_unsafe

 
```
fun box i16_unsafe()
: I16 val

```
 #### Returns

 * [I16](builtin-i16) val

 ### i32\_unsafe

 
```
fun box i32_unsafe()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### i64\_unsafe

 
```
fun box i64_unsafe()
: I64 val

```
 #### Returns

 * [I64](index) val

 ### i128\_unsafe

 
```
fun box i128_unsafe()
: I128 val

```
 #### Returns

 * [I128](builtin-i128) val

 ### ilong\_unsafe

 
```
fun box ilong_unsafe()
: ILong val

```
 #### Returns

 * [ILong](builtin-ilong) val

 ### isize\_unsafe

 
```
fun box isize_unsafe()
: ISize val

```
 #### Returns

 * [ISize](builtin-isize) val

 ### u8\_unsafe

 
```
fun box u8_unsafe()
: U8 val

```
 #### Returns

 * [U8](builtin-u8) val

 ### u16\_unsafe

 
```
fun box u16_unsafe()
: U16 val

```
 #### Returns

 * [U16](builtin-u16) val

 ### u32\_unsafe

 
```
fun box u32_unsafe()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### u64\_unsafe

 
```
fun box u64_unsafe()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### u128\_unsafe

 
```
fun box u128_unsafe()
: U128 val

```
 #### Returns

 * [U128](builtin-u128) val

 ### ulong\_unsafe

 
```
fun box ulong_unsafe()
: ULong val

```
 #### Returns

 * [ULong](builtin-ulong) val

 ### usize\_unsafe

 
```
fun box usize_unsafe()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### f32\_unsafe

 
```
fun box f32_unsafe()
: F32 val

```
 #### Returns

 * [F32](builtin-f32) val

 ### f64\_unsafe

 
```
fun box f64_unsafe()
: F64 val

```
 #### Returns

 * [F64](builtin-f64) val

 ### compare

 
```
fun box compare(
  that: I64 val)
: (Less val | Equal val | Greater val)

```
 #### Parameters

 * that: [I64](index) val

 #### Returns

 * ([Less](builtin-less) val | [Equal](builtin-equal) val | [Greater](builtin-greater) val)



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/builtin-I64>

Reader
======

 [[Source]](https://stdlib.ponylang.io/src/buffered/reader/#L3)

 Store network data and provide a parsing interface.

 `Reader` provides a way to extract typed data from a sequence of bytes. The `Reader` manages the underlying data structures to provide a read cursor over a contiguous sequence of bytes. It is useful for decoding data that is received over a network or stored in a file. Chunk of bytes are added to the `Reader` using the `append` method, and typed data is extracted using the getter methods.

 For example, suppose we have a UDP-based network data protocol where messages consist of the following:

 * `list_size` - the number of items in the following list of items as a big-endian 32-bit integer
* zero or more items of the following data:
* a big-endian 64-bit floating point number
* a string that starts with a big-endian 32-bit integer that specifies the length of the string, followed by a number of bytes that represent the string

 A message would be something like this:

 
```
[message_length][list_size][float1][string1][float2][string2]...

```
 The following program uses a `Reader` to decode a message of this type and print them:

 
```
use "buffered"
use "collections"

class Notify is InputNotify
  let _env: Env
  new create(env: Env) =>
    _env = env
  fun ref apply(data: Array[U8] iso) =>
    let rb = Reader
    rb.append(consume data)
    try
      while true do
        let len = rb.i32_be()?
        let items = rb.i32_be()?.usize()
        for range in Range(0, items) do
          let f = rb.f32_be()?
          let str_len = rb.i32_be()?.usize()
          let str = String.from_array(rb.block(str_len)?)
          _env.out.print("[(" + f.string() + "), (" + str + ")]")
        end
      end
    end

actor Main
  new create(env: Env) =>
    env.input(recover Notify(env) end, 1024)

```
 
```
class ref Reader

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/buffered/reader/#L3)

 
```
new iso create()
: Reader iso^

```
 #### Returns

 * [Reader](index) iso^

 Public Functions
----------------

 ### size

 [[Source]](https://stdlib.ponylang.io/src/buffered/reader/#L67)

 Return the number of available bytes.

 
```
fun box size()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### clear

 [[Source]](https://stdlib.ponylang.io/src/buffered/reader/#L73)

 Discard all pending data.

 
```
fun ref clear()
: None val

```
 #### Returns

 * [None](builtin-none) val

 ### append

 [[Source]](https://stdlib.ponylang.io/src/buffered/reader/#L80)

 Add a chunk of data.

 
```
fun ref append(
  data: (String val | Array[U8 val] val))
: None val

```
 #### Parameters

 * data: ([String](builtin-string) val | [Array](builtin-array)[[U8](builtin-u8) val] val)

 #### Returns

 * [None](builtin-none) val

 ### skip

 [[Source]](https://stdlib.ponylang.io/src/buffered/reader/#L93)

 Skip n bytes.

 
```
fun ref skip(
  n: USize val)
: None val ?

```
 #### Parameters

 * n: [USize](builtin-usize) val

 #### Returns

 * [None](builtin-none) val ?

 ### block

 [[Source]](https://stdlib.ponylang.io/src/buffered/reader/#L119)

 Return a block as a contiguous chunk of memory. Will throw an error if you request a block larger than what is currently stored in the `Reader`.

 
```
fun ref block(
  len: USize val)
: Array[U8 val] iso^ ?

```
 #### Parameters

 * len: [USize](builtin-usize) val

 #### Returns

 * [Array](builtin-array)[[U8](builtin-u8) val] iso^ ?

 ### read\_until

 [[Source]](https://stdlib.ponylang.io/src/buffered/reader/#L159)

 Find the first occurrence of the separator and return the block of bytes before its position. The separator is not included in the returned array, but it is removed from the buffer. To read a line of text, prefer line() that handles \n and \r\n.

 
```
fun ref read_until(
  separator: U8 val)
: Array[U8 val] iso^ ?

```
 #### Parameters

 * separator: [U8](builtin-u8) val

 #### Returns

 * [Array](builtin-array)[[U8](builtin-u8) val] iso^ ?

 ### line

 [[Source]](https://stdlib.ponylang.io/src/buffered/reader/#L170)

 Return a \n or \r\n terminated line as a string. By default the newline is not included in the returned string, but it is removed from the buffer. Set `keep_line_breaks` to `true` to keep the line breaks in the returned line.

 
```
fun ref line(
  keep_line_breaks: Bool val = false)
: String iso^ ?

```
 #### Parameters

 * keep\_line\_breaks: [Bool](builtin-bool) val = false

 #### Returns

 * [String](builtin-string) iso^ ?

 ### u8

 [[Source]](https://stdlib.ponylang.io/src/buffered/reader/#L213)

 Get a U8. Raise an error if there isn't enough data.

 
```
fun ref u8()
: U8 val ?

```
 #### Returns

 * [U8](builtin-u8) val ?

 ### i8

 [[Source]](https://stdlib.ponylang.io/src/buffered/reader/#L223)

 Get an I8.

 
```
fun ref i8()
: I8 val ?

```
 #### Returns

 * [I8](builtin-i8) val ?

 ### u16\_be

 [[Source]](https://stdlib.ponylang.io/src/buffered/reader/#L229)

 Get a big-endian U16.

 
```
fun ref u16_be()
: U16 val ?

```
 #### Returns

 * [U16](builtin-u16) val ?

 ### u16\_le

 [[Source]](https://stdlib.ponylang.io/src/buffered/reader/#L262)

 Get a little-endian U16.

 
```
fun ref u16_le()
: U16 val ?

```
 #### Returns

 * [U16](builtin-u16) val ?

 ### i16\_be

 [[Source]](https://stdlib.ponylang.io/src/buffered/reader/#L295)

 Get a big-endian I16.

 
```
fun ref i16_be()
: I16 val ?

```
 #### Returns

 * [I16](builtin-i16) val ?

 ### i16\_le

 [[Source]](https://stdlib.ponylang.io/src/buffered/reader/#L301)

 Get a little-endian I16.

 
```
fun ref i16_le()
: I16 val ?

```
 #### Returns

 * [I16](builtin-i16) val ?

 ### u32\_be

 [[Source]](https://stdlib.ponylang.io/src/buffered/reader/#L307)

 Get a big-endian U32.

 
```
fun ref u32_be()
: U32 val ?

```
 #### Returns

 * [U32](builtin-u32) val ?

 ### u32\_le

 [[Source]](https://stdlib.ponylang.io/src/buffered/reader/#L341)

 Get a little-endian U32.

 
```
fun ref u32_le()
: U32 val ?

```
 #### Returns

 * [U32](builtin-u32) val ?

 ### i32\_be

 [[Source]](https://stdlib.ponylang.io/src/buffered/reader/#L375)

 Get a big-endian I32.

 
```
fun ref i32_be()
: I32 val ?

```
 #### Returns

 * [I32](builtin-i32) val ?

 ### i32\_le

 [[Source]](https://stdlib.ponylang.io/src/buffered/reader/#L381)

 Get a little-endian I32.

 
```
fun ref i32_le()
: I32 val ?

```
 #### Returns

 * [I32](builtin-i32) val ?

 ### u64\_be

 [[Source]](https://stdlib.ponylang.io/src/buffered/reader/#L387)

 Get a big-endian U64.

 
```
fun ref u64_be()
: U64 val ?

```
 #### Returns

 * [U64](builtin-u64) val ?

 ### u64\_le

 [[Source]](https://stdlib.ponylang.io/src/buffered/reader/#L423)

 Get a little-endian U64.

 
```
fun ref u64_le()
: U64 val ?

```
 #### Returns

 * [U64](builtin-u64) val ?

 ### i64\_be

 [[Source]](https://stdlib.ponylang.io/src/buffered/reader/#L459)

 Get a big-endian I64.

 
```
fun ref i64_be()
: I64 val ?

```
 #### Returns

 * [I64](builtin-i64) val ?

 ### i64\_le

 [[Source]](https://stdlib.ponylang.io/src/buffered/reader/#L465)

 Get a little-endian I64.

 
```
fun ref i64_le()
: I64 val ?

```
 #### Returns

 * [I64](builtin-i64) val ?

 ### u128\_be

 [[Source]](https://stdlib.ponylang.io/src/buffered/reader/#L471)

 Get a big-endian U128.

 
```
fun ref u128_be()
: U128 val ?

```
 #### Returns

 * [U128](builtin-u128) val ?

 ### u128\_le

 [[Source]](https://stdlib.ponylang.io/src/buffered/reader/#L511)

 Get a little-endian U128.

 
```
fun ref u128_le()
: U128 val ?

```
 #### Returns

 * [U128](builtin-u128) val ?

 ### i128\_be

 [[Source]](https://stdlib.ponylang.io/src/buffered/reader/#L551)

 Get a big-endian I129.

 
```
fun ref i128_be()
: I128 val ?

```
 #### Returns

 * [I128](builtin-i128) val ?

 ### i128\_le

 [[Source]](https://stdlib.ponylang.io/src/buffered/reader/#L557)

 Get a little-endian I128.

 
```
fun ref i128_le()
: I128 val ?

```
 #### Returns

 * [I128](builtin-i128) val ?

 ### f32\_be

 [[Source]](https://stdlib.ponylang.io/src/buffered/reader/#L563)

 Get a big-endian F32.

 
```
fun ref f32_be()
: F32 val ?

```
 #### Returns

 * [F32](builtin-f32) val ?

 ### f32\_le

 [[Source]](https://stdlib.ponylang.io/src/buffered/reader/#L569)

 Get a little-endian F32.

 
```
fun ref f32_le()
: F32 val ?

```
 #### Returns

 * [F32](builtin-f32) val ?

 ### f64\_be

 [[Source]](https://stdlib.ponylang.io/src/buffered/reader/#L575)

 Get a big-endian F64.

 
```
fun ref f64_be()
: F64 val ?

```
 #### Returns

 * [F64](builtin-f64) val ?

 ### f64\_le

 [[Source]](https://stdlib.ponylang.io/src/buffered/reader/#L581)

 Get a little-endian F64.

 
```
fun ref f64_le()
: F64 val ?

```
 #### Returns

 * [F64](builtin-f64) val ?

 ### peek\_u8

 [[Source]](https://stdlib.ponylang.io/src/buffered/reader/#L605)

 Peek at a U8 at the given offset. Raise an error if there isn't enough data.

 
```
fun box peek_u8(
  offset: USize val = 0)
: U8 val ?

```
 #### Parameters

 * offset: [USize](builtin-usize) val = 0

 #### Returns

 * [U8](builtin-u8) val ?

 ### peek\_i8

 [[Source]](https://stdlib.ponylang.io/src/buffered/reader/#L612)

 Peek at an I8.

 
```
fun box peek_i8(
  offset: USize val = 0)
: I8 val ?

```
 #### Parameters

 * offset: [USize](builtin-usize) val = 0

 #### Returns

 * [I8](builtin-i8) val ?

 ### peek\_u16\_be

 [[Source]](https://stdlib.ponylang.io/src/buffered/reader/#L618)

 Peek at a big-endian U16.

 
```
fun box peek_u16_be(
  offset: USize val = 0)
: U16 val ?

```
 #### Parameters

 * offset: [USize](builtin-usize) val = 0

 #### Returns

 * [U16](builtin-u16) val ?

 ### peek\_u16\_le

 [[Source]](https://stdlib.ponylang.io/src/buffered/reader/#L624)

 Peek at a little-endian U16.

 
```
fun box peek_u16_le(
  offset: USize val = 0)
: U16 val ?

```
 #### Parameters

 * offset: [USize](builtin-usize) val = 0

 #### Returns

 * [U16](builtin-u16) val ?

 ### peek\_i16\_be

 [[Source]](https://stdlib.ponylang.io/src/buffered/reader/#L630)

 Peek at a big-endian I16.

 
```
fun box peek_i16_be(
  offset: USize val = 0)
: I16 val ?

```
 #### Parameters

 * offset: [USize](builtin-usize) val = 0

 #### Returns

 * [I16](builtin-i16) val ?

 ### peek\_i16\_le

 [[Source]](https://stdlib.ponylang.io/src/buffered/reader/#L636)

 Peek at a little-endian I16.

 
```
fun box peek_i16_le(
  offset: USize val = 0)
: I16 val ?

```
 #### Parameters

 * offset: [USize](builtin-usize) val = 0

 #### Returns

 * [I16](builtin-i16) val ?

 ### peek\_u32\_be

 [[Source]](https://stdlib.ponylang.io/src/buffered/reader/#L642)

 Peek at a big-endian U32.

 
```
fun box peek_u32_be(
  offset: USize val = 0)
: U32 val ?

```
 #### Parameters

 * offset: [USize](builtin-usize) val = 0

 #### Returns

 * [U32](builtin-u32) val ?

 ### peek\_u32\_le

 [[Source]](https://stdlib.ponylang.io/src/buffered/reader/#L648)

 Peek at a little-endian U32.

 
```
fun box peek_u32_le(
  offset: USize val = 0)
: U32 val ?

```
 #### Parameters

 * offset: [USize](builtin-usize) val = 0

 #### Returns

 * [U32](builtin-u32) val ?

 ### peek\_i32\_be

 [[Source]](https://stdlib.ponylang.io/src/buffered/reader/#L654)

 Peek at a big-endian I32.

 
```
fun box peek_i32_be(
  offset: USize val = 0)
: I32 val ?

```
 #### Parameters

 * offset: [USize](builtin-usize) val = 0

 #### Returns

 * [I32](builtin-i32) val ?

 ### peek\_i32\_le

 [[Source]](https://stdlib.ponylang.io/src/buffered/reader/#L660)

 Peek at a little-endian I32.

 
```
fun box peek_i32_le(
  offset: USize val = 0)
: I32 val ?

```
 #### Parameters

 * offset: [USize](builtin-usize) val = 0

 #### Returns

 * [I32](builtin-i32) val ?

 ### peek\_u64\_be

 [[Source]](https://stdlib.ponylang.io/src/buffered/reader/#L666)

 Peek at a big-endian U64.

 
```
fun box peek_u64_be(
  offset: USize val = 0)
: U64 val ?

```
 #### Parameters

 * offset: [USize](builtin-usize) val = 0

 #### Returns

 * [U64](builtin-u64) val ?

 ### peek\_u64\_le

 [[Source]](https://stdlib.ponylang.io/src/buffered/reader/#L672)

 Peek at a little-endian U64.

 
```
fun box peek_u64_le(
  offset: USize val = 0)
: U64 val ?

```
 #### Parameters

 * offset: [USize](builtin-usize) val = 0

 #### Returns

 * [U64](builtin-u64) val ?

 ### peek\_i64\_be

 [[Source]](https://stdlib.ponylang.io/src/buffered/reader/#L678)

 Peek at a big-endian I64.

 
```
fun box peek_i64_be(
  offset: USize val = 0)
: I64 val ?

```
 #### Parameters

 * offset: [USize](builtin-usize) val = 0

 #### Returns

 * [I64](builtin-i64) val ?

 ### peek\_i64\_le

 [[Source]](https://stdlib.ponylang.io/src/buffered/reader/#L684)

 Peek at a little-endian I64.

 
```
fun box peek_i64_le(
  offset: USize val = 0)
: I64 val ?

```
 #### Parameters

 * offset: [USize](builtin-usize) val = 0

 #### Returns

 * [I64](builtin-i64) val ?

 ### peek\_u128\_be

 [[Source]](https://stdlib.ponylang.io/src/buffered/reader/#L690)

 Peek at a big-endian U128.

 
```
fun box peek_u128_be(
  offset: USize val = 0)
: U128 val ?

```
 #### Parameters

 * offset: [USize](builtin-usize) val = 0

 #### Returns

 * [U128](builtin-u128) val ?

 ### peek\_u128\_le

 [[Source]](https://stdlib.ponylang.io/src/buffered/reader/#L696)

 Peek at a little-endian U128.

 
```
fun box peek_u128_le(
  offset: USize val = 0)
: U128 val ?

```
 #### Parameters

 * offset: [USize](builtin-usize) val = 0

 #### Returns

 * [U128](builtin-u128) val ?

 ### peek\_i128\_be

 [[Source]](https://stdlib.ponylang.io/src/buffered/reader/#L702)

 Peek at a big-endian I129.

 
```
fun box peek_i128_be(
  offset: USize val = 0)
: I128 val ?

```
 #### Parameters

 * offset: [USize](builtin-usize) val = 0

 #### Returns

 * [I128](builtin-i128) val ?

 ### peek\_i128\_le

 [[Source]](https://stdlib.ponylang.io/src/buffered/reader/#L708)

 Peek at a little-endian I128.

 
```
fun box peek_i128_le(
  offset: USize val = 0)
: I128 val ?

```
 #### Parameters

 * offset: [USize](builtin-usize) val = 0

 #### Returns

 * [I128](builtin-i128) val ?

 ### peek\_f32\_be

 [[Source]](https://stdlib.ponylang.io/src/buffered/reader/#L714)

 Peek at a big-endian F32.

 
```
fun box peek_f32_be(
  offset: USize val = 0)
: F32 val ?

```
 #### Parameters

 * offset: [USize](builtin-usize) val = 0

 #### Returns

 * [F32](builtin-f32) val ?

 ### peek\_f32\_le

 [[Source]](https://stdlib.ponylang.io/src/buffered/reader/#L720)

 Peek at a little-endian F32.

 
```
fun box peek_f32_le(
  offset: USize val = 0)
: F32 val ?

```
 #### Parameters

 * offset: [USize](builtin-usize) val = 0

 #### Returns

 * [F32](builtin-f32) val ?

 ### peek\_f64\_be

 [[Source]](https://stdlib.ponylang.io/src/buffered/reader/#L726)

 Peek at a big-endian F64.

 
```
fun box peek_f64_be(
  offset: USize val = 0)
: F64 val ?

```
 #### Parameters

 * offset: [USize](builtin-usize) val = 0

 #### Returns

 * [F64](builtin-f64) val ?

 ### peek\_f64\_le

 [[Source]](https://stdlib.ponylang.io/src/buffered/reader/#L732)

 Peek at a little-endian F64.

 
```
fun box peek_f64_le(
  offset: USize val = 0)
: F64 val ?

```
 #### Parameters

 * offset: [USize](builtin-usize) val = 0

 #### Returns

 * [F64](builtin-f64) val ?



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/buffered-Reader>

SetValues[A: A, H: [HashFunction](collections-hashfunction)[A!] val, S: [HashSet](collections-hashset)[A, H] #read]
===================================================================================================================

 [[Source]](https://stdlib.ponylang.io/src/collections/set/#L286)

 An iterator over the values in a set.

 
```
class ref SetValues[A: A, H: HashFunction[A!] val, S: HashSet[A, H] #read] is
  Iterator[S->A] ref

```
 #### Implements

 * [Iterator](builtin-iterator)[S->A] ref

 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/collections/set/#L295)

 Creates an iterator for the given set.

 
```
new ref create(
  set: S)
: SetValues[A, H, S] ref^

```
 #### Parameters

 * set: S

 #### Returns

 * [SetValues](index)[A, H, S] ref^

 Public Functions
----------------

 ### has\_next

 [[Source]](https://stdlib.ponylang.io/src/collections/set/#L301)

 True if it believes there are remaining entries. May not be right if values were added or removed from the set.

 
```
fun box has_next()
: Bool val

```
 #### Returns

 * [Bool](builtin-bool) val

 ### next

 [[Source]](https://stdlib.ponylang.io/src/collections/set/#L308)

 Returns the next value, or raises an error if there isn't one. If values are added during iteration, this may not return all values.

 
```
fun ref next()
: S->A ?

```
 #### Returns

 * S->A ?



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/collections-SetValues>

SetIs[A: A]
===========

 [[Source]](https://stdlib.ponylang.io/src/collections/set/#L3)

 
```
type SetIs[A: A] is
  HashSet[A, HashIs[A!] val] ref

```
 #### Type Alias For

 * [HashSet](collections-hashset)[A, [HashIs](collections-hashis)[A!] val] ref



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/collections-SetIs>

RingBuffer[A: A]
================

 [[Source]](https://stdlib.ponylang.io/src/collections/ring_buffer/#L1)

 A ring buffer.

 
```
class ref RingBuffer[A: A]

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/collections/ring_buffer/#L9)

 Create a ring buffer with a fixed size. The size will be rounded up to the next power of 2.

 
```
new ref create(
  len: USize val)
: RingBuffer[A] ref^

```
 #### Parameters

 * len: [USize](builtin-usize) val

 #### Returns

 * [RingBuffer](index)[A] ref^

 Public Functions
----------------

 ### head

 [[Source]](https://stdlib.ponylang.io/src/collections/ring_buffer/#L18)

 The first read that will succeed. If nothing has been written to the ring, this will raise an error.

 
```
fun box head()
: USize val ?

```
 #### Returns

 * [USize](builtin-usize) val ?

 ### size

 [[Source]](https://stdlib.ponylang.io/src/collections/ring_buffer/#L33)

 The number of elements that have been added to the ring.

 
```
fun box size()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### space

 [[Source]](https://stdlib.ponylang.io/src/collections/ring_buffer/#L39)

 The available space in the ring.

 
```
fun box space()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### apply

 [[Source]](https://stdlib.ponylang.io/src/collections/ring_buffer/#L45)

 Get the i-th element from the ring. If the i-th element has not yet been added or is no longer available, this will raise an error.

 
```
fun box apply(
  i: USize val)
: this->A ?

```
 #### Parameters

 * i: [USize](builtin-usize) val

 #### Returns

 * this->A ?

 ### push

 [[Source]](https://stdlib.ponylang.io/src/collections/ring_buffer/#L56)

 Add an element to the ring. If the ring is full, this will drop the oldest element in the ring. Returns true if an element was dropped.

 
```
fun ref push(
  value: A)
: Bool val

```
 #### Parameters

 * value: A

 #### Returns

 * [Bool](builtin-bool) val

 ### clear

 [[Source]](https://stdlib.ponylang.io/src/collections/ring_buffer/#L73)

 Clear the queue.

 
```
fun ref clear()
: None val

```
 #### Returns

 * [None](builtin-none) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/collections-RingBuffer>

Range[optional A: ([Real](builtin-real)[A] val & ([I8](builtin-i8) val | [I16](builtin-i16) val | [I32](builtin-i32) val | [I64](builtin-i64) val | [I128](builtin-i128) val | [ILong](builtin-ilong) val | [ISize](builtin-isize) val | [U8](builtin-u8) val | [U16](builtin-u16) val | [U32](builtin-u32) val | [U64](builtin-u64) val | [U128](builtin-u128) val | [ULong](builtin-ulong) val | [USize](builtin-usize) val | [F32](builtin-f32) val | [F64](builtin-f64) val))]
==================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

 [[Source]](https://stdlib.ponylang.io/src/collections/range/#L1)

 Produces `[min, max)` with a step of `inc` for any `Number` type.

 
```
// iterating with for-loop
for i in Range(0, 10) do
  env.out.print(i.string())
end

// iterating over Range of U8 with while-loop
let range = Range[U8](5, 100, 5)
while range.has_next() do
  try
    handle_u8(range.next()?)
  end
end

```
 Supports `min` being smaller than `max` with negative `inc` but only for signed integer types and floats:

 
```
var previous = 11
for left in Range[I64](10, -5, -1) do
  if not (left < previous) then
    error
  end
  previous = left
end

```
 If the `step` is not moving `min` towards `max` or if it is `0`, the Range is considered infinite and iterating over it will never terminate:

 
```
let infinite_range1 = Range(0, 1, 0)
infinite_range1.is_infinite() == true

let infinite_range2 = Range[I8](0, 10, -1)
for _ in infinite_range2 do
  env.out.print("will this ever end?")
  env.err.print("no, never!")
end

```
 When using `Range` with floating point types (`F32` and `F64`) `inc` steps < 1.0 are possible. If any of the arguments contains `NaN`, `+Inf` or `-Inf` the range is considered infinite as operations on any of them won't move `min` towards `max`. The actual values produced by such a `Range` are determined by what IEEE 754 defines as the result of `min` + `inc`:

 
```
for and_a_half in Range[F64](0.5, 100) do
  handle_half(and_a_half)
end

// this Range will produce 0 at first, then infinitely NaN
let nan: F64 = F64(0) / F64(0)
for what_am_i in Range[F64](0, 1000, nan) do
  wild_guess(what_am_i)
end

```
 
```
class ref Range[optional A: (Real[A] val & (I8 val | I16 val | I32 val | 
    I64 val | I128 val | ILong val | 
    ISize val | U8 val | U16 val | 
    U32 val | U64 val | U128 val | 
    ULong val | USize val | F32 val | 
    F64 val))] is
  Iterator[A] ref

```
 #### Implements

 * [Iterator](builtin-iterator)[A] ref

 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/collections/range/#L75)

 
```
new ref create(
  min: A,
  max: A,
  inc: A = 1)
: Range[A] ref^

```
 #### Parameters

 * min: A
* max: A
* inc: A = 1

 #### Returns

 * [Range](index)[A] ref^

 Public Functions
----------------

 ### has\_next

 [[Source]](https://stdlib.ponylang.io/src/collections/range/#L95)

 
```
fun box has_next()
: Bool val

```
 #### Returns

 * [Bool](builtin-bool) val

 ### next

 [[Source]](https://stdlib.ponylang.io/src/collections/range/#L102)

 
```
fun ref next()
: A ?

```
 #### Returns

 * A ?

 ### rewind

 [[Source]](https://stdlib.ponylang.io/src/collections/range/#L109)

 
```
fun ref rewind()
: None val

```
 #### Returns

 * [None](builtin-none) val

 ### is\_infinite

 [[Source]](https://stdlib.ponylang.io/src/collections/range/#L112)

 
```
fun box is_infinite()
: Bool val

```
 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/collections-Range>

Sort[A: [Seq](builtin-seq)[B] ref, B: [Comparable](builtin-comparable)[B] #read]
================================================================================

 [[Source]](https://stdlib.ponylang.io/src/collections/sort/#L1)

 Implementation of dual-pivot quicksort. It operates in-place on the provided Seq, using a small amount of additional memory. The nature of the element-realation is expressed via the supplied comparator.

 (The following is paraphrased from [Wikipedia](https://en.wikipedia.org/wiki/Quicksort).)

 Quicksort is a common implementation of a sort algorithm which can sort items of any type for which a "less-than" relation (formally, a total order) is defined. 

 On average, the algorithm takes O(n log n) comparisons to sort n items. In the worst case, it makes O(n2) comparisons, though this behavior is rare. Multi-pivot implementations (of which dual-pivot is one) make efficient use of modern processor caches.

 Example program
---------------

 The following takes an reverse-alphabetical array of Strings ("third", "second", "first"), and sorts it in place alphabetically using the default String Comparator.

 It outputs:

 
>  first second third
> 
>  

 
```
use "collections"

actor Main 
  new create(env:Env) => 
    let array = [ "third"; "second"; "first" ]
    let sorted_array = Sort[Array[String], String](array)
    for e in sorted_array.values() do
      env.out.print(e) // prints "first \n second \n third"
    end

```
 
```
primitive val Sort[A: Seq[B] ref, B: Comparable[B] #read]

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/collections/sort/#L1)

 
```
new val create()
: Sort[A, B] val^

```
 #### Returns

 * [Sort](index)[A, B] val^

 Public Functions
----------------

 ### apply

 [[Source]](https://stdlib.ponylang.io/src/collections/sort/#L38)

 Sort the given seq.

 
```
fun box apply(
  a: A)
: A^

```
 #### Parameters

 * a: A

 #### Returns

 * A^

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/collections/sort/#L38)

 
```
fun box eq(
  that: Sort[A, B] val)
: Bool val

```
 #### Parameters

 * that: [Sort](index)[A, B] val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/collections/sort/#L38)

 
```
fun box ne(
  that: Sort[A, B] val)
: Bool val

```
 #### Parameters

 * that: [Sort](index)[A, B] val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/collections-Sort>

HashSet[A: A, H: [HashFunction](collections-hashfunction)[A!] val]
==================================================================

 [[Source]](https://stdlib.ponylang.io/src/collections/set/#L5)

 A set, built on top of a HashMap. This is implemented as map of an alias of a type to itself

 
```
class ref HashSet[A: A, H: HashFunction[A!] val] is
  Comparable[HashSet[A, H] box] ref

```
 #### Implements

 * [Comparable](builtin-comparable)[[HashSet](index)[A, H] box] ref

 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/collections/set/#L12)

 Defaults to a prealloc of 8.

 
```
new ref create(
  prealloc: USize val = 8)
: HashSet[A, H] ref^

```
 #### Parameters

 * prealloc: [USize](builtin-usize) val = 8

 #### Returns

 * [HashSet](index)[A, H] ref^

 Public Functions
----------------

 ### size

 [[Source]](https://stdlib.ponylang.io/src/collections/set/#L18)

 The number of items in the set.

 
```
fun box size()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### space

 [[Source]](https://stdlib.ponylang.io/src/collections/set/#L24)

 The available space in the set.

 
```
fun box space()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### apply

 [[Source]](https://stdlib.ponylang.io/src/collections/set/#L30)

 Return the value if its in the set, otherwise raise an error.

 
```
fun box apply(
  value: box->A!)
: this->A ?

```
 #### Parameters

 * value: box->A!

 #### Returns

 * this->A ?

 ### contains

 [[Source]](https://stdlib.ponylang.io/src/collections/set/#L36)

 Checks whether the set contains the value.

 
```
fun box contains(
  value: box->A!)
: Bool val

```
 #### Parameters

 * value: box->A!

 #### Returns

 * [Bool](builtin-bool) val

 ### clear

 [[Source]](https://stdlib.ponylang.io/src/collections/set/#L42)

 Remove all elements from the set.

 
```
fun ref clear()
: None val

```
 #### Returns

 * [None](builtin-none) val

 ### set

 [[Source]](https://stdlib.ponylang.io/src/collections/set/#L48)

 Add a value to the set.

 
```
fun ref set(
  value: A)
: None val

```
 #### Parameters

 * value: A

 #### Returns

 * [None](builtin-none) val

 ### unset

 [[Source]](https://stdlib.ponylang.io/src/collections/set/#L54)

 Remove a value from the set.

 
```
fun ref unset(
  value: box->A!)
: None val

```
 #### Parameters

 * value: box->A!

 #### Returns

 * [None](builtin-none) val

 ### extract

 [[Source]](https://stdlib.ponylang.io/src/collections/set/#L60)

 Remove a value from the set and return it. Raises an error if the value wasn't in the set.

 
```
fun ref extract(
  value: box->A!)
: A^ ?

```
 #### Parameters

 * value: box->A!

 #### Returns

 * A^ ?

 ### union

 [[Source]](https://stdlib.ponylang.io/src/collections/set/#L67)

 Add everything in that to the set.

 
```
fun ref union(
  that: Iterator[A^] ref)
: None val

```
 #### Parameters

 * that: [Iterator](builtin-iterator)[A^] ref

 #### Returns

 * [None](builtin-none) val

 ### intersect[optional K: [HashFunction](collections-hashfunction)[box->A!] val]

 [[Source]](https://stdlib.ponylang.io/src/collections/set/#L75)

 Remove everything that isn't in that.

 
```
fun ref intersect[optional K: HashFunction[box->A!] val](
  that: HashSet[box->A!, K] ref)
: None val

```
 #### Parameters

 * that: [HashSet](index)[box->A!, K] ref

 #### Returns

 * [None](builtin-none) val

 ### difference

 [[Source]](https://stdlib.ponylang.io/src/collections/set/#L95)

 Remove elements in this which are also in that. Add elements in that which are not in this.

 
```
fun ref difference(
  that: Iterator[A^] ref)
: None val

```
 #### Parameters

 * that: [Iterator](builtin-iterator)[A^] ref

 #### Returns

 * [None](builtin-none) val

 ### remove

 [[Source]](https://stdlib.ponylang.io/src/collections/set/#L108)

 Remove everything that is in that.

 
```
fun ref remove(
  that: Iterator[box->A!] ref)
: None val

```
 #### Parameters

 * that: [Iterator](builtin-iterator)[box->A!] ref

 #### Returns

 * [None](builtin-none) val

 ### add[optional K: [HashFunction](collections-hashfunction)[this->A!] val]

 [[Source]](https://stdlib.ponylang.io/src/collections/set/#L116)

 Add a value to the set.

 
```
fun box add[optional K: HashFunction[this->A!] val](
  value: this->A!)
: HashSet[this->A!, K] ref^

```
 #### Parameters

 * value: this->A!

 #### Returns

 * [HashSet](index)[this->A!, K] ref^

 ### sub[optional K: [HashFunction](collections-hashfunction)[this->A!] val]

 [[Source]](https://stdlib.ponylang.io/src/collections/set/#L125)

 Remove a value from the set.

 
```
fun box sub[optional K: HashFunction[this->A!] val](
  value: box->this->A!)
: HashSet[this->A!, K] ref^

```
 #### Parameters

 * value: box->this->A!

 #### Returns

 * [HashSet](index)[this->A!, K] ref^

 ### op\_or[optional K: [HashFunction](collections-hashfunction)[this->A!] val]

 [[Source]](https://stdlib.ponylang.io/src/collections/set/#L134)

 Create a set with the elements of both this and that.

 
```
fun box op_or[optional K: HashFunction[this->A!] val](
  that: this->HashSet[A, H] ref)
: HashSet[this->A!, K] ref^

```
 #### Parameters

 * that: this->[HashSet](index)[A, H] ref

 #### Returns

 * [HashSet](index)[this->A!, K] ref^

 ### op\_and[optional K: [HashFunction](collections-hashfunction)[this->A!] val]

 [[Source]](https://stdlib.ponylang.io/src/collections/set/#L148)

 Create a set with the elements that are in both this and that.

 
```
fun box op_and[optional K: HashFunction[this->A!] val](
  that: this->HashSet[A, H] ref)
: HashSet[this->A!, K] ref^

```
 #### Parameters

 * that: this->[HashSet](index)[A, H] ref

 #### Returns

 * [HashSet](index)[this->A!, K] ref^

 ### op\_xor[optional K: [HashFunction](collections-hashfunction)[this->A!] val]

 [[Source]](https://stdlib.ponylang.io/src/collections/set/#L165)

 Create a set with the elements that are in either set but not both.

 
```
fun box op_xor[optional K: HashFunction[this->A!] val](
  that: this->HashSet[A, H] ref)
: HashSet[this->A!, K] ref^

```
 #### Parameters

 * that: this->[HashSet](index)[A, H] ref

 #### Returns

 * [HashSet](index)[this->A!, K] ref^

 ### without[optional K: [HashFunction](collections-hashfunction)[this->A!] val]

 [[Source]](https://stdlib.ponylang.io/src/collections/set/#L191)

 Create a set with the elements of this that are not in that.

 
```
fun box without[optional K: HashFunction[this->A!] val](
  that: this->HashSet[A, H] ref)
: HashSet[this->A!, K] ref^

```
 #### Parameters

 * that: this->[HashSet](index)[A, H] ref

 #### Returns

 * [HashSet](index)[this->A!, K] ref^

 ### clone[optional K: [HashFunction](collections-hashfunction)[this->A!] val]

 [[Source]](https://stdlib.ponylang.io/src/collections/set/#L209)

 Create a clone. The element type may be different due to aliasing and viewpoint adaptation.

 
```
fun box clone[optional K: HashFunction[this->A!] val]()
: HashSet[this->A!, K] ref^

```
 #### Returns

 * [HashSet](index)[this->A!, K] ref^

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/collections/set/#L221)

 Returns true if the sets contain the same elements.

 
```
fun box eq(
  that: HashSet[A, H] box)
: Bool val

```
 #### Parameters

 * that: [HashSet](index)[A, H] box

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/collections/set/#L227)

 Returns false if the sets contain the same elements.

 
```
fun box ne(
  that: HashSet[A, H] box)
: Bool val

```
 #### Parameters

 * that: [HashSet](index)[A, H] box

 #### Returns

 * [Bool](builtin-bool) val

 ### lt

 [[Source]](https://stdlib.ponylang.io/src/collections/set/#L233)

 Returns true if every element in this is also in that, and this has fewer elements than that.

 
```
fun box lt(
  that: HashSet[A, H] box)
: Bool val

```
 #### Parameters

 * that: [HashSet](index)[A, H] box

 #### Returns

 * [Bool](builtin-bool) val

 ### le

 [[Source]](https://stdlib.ponylang.io/src/collections/set/#L240)

 Returns true if every element in this is also in that.

 
```
fun box le(
  that: HashSet[A, H] box)
: Bool val

```
 #### Parameters

 * that: [HashSet](index)[A, H] box

 #### Returns

 * [Bool](builtin-bool) val

 ### gt

 [[Source]](https://stdlib.ponylang.io/src/collections/set/#L253)

 Returns true if every element in that is also in this, and this has more elements than that.

 
```
fun box gt(
  that: HashSet[A, H] box)
: Bool val

```
 #### Parameters

 * that: [HashSet](index)[A, H] box

 #### Returns

 * [Bool](builtin-bool) val

 ### ge

 [[Source]](https://stdlib.ponylang.io/src/collections/set/#L260)

 Returns true if every element in that is also in this.

 
```
fun box ge(
  that: HashSet[A, H] box)
: Bool val

```
 #### Parameters

 * that: [HashSet](index)[A, H] box

 #### Returns

 * [Bool](builtin-bool) val

 ### next\_index

 [[Source]](https://stdlib.ponylang.io/src/collections/set/#L266)

 Given an index, return the next index that has a populated value. Raise an error if there is no next populated index.

 
```
fun box next_index(
  prev: USize val = call)
: USize val ?

```
 #### Parameters

 * prev: [USize](builtin-usize) val = call

 #### Returns

 * [USize](builtin-usize) val ?

 ### index

 [[Source]](https://stdlib.ponylang.io/src/collections/set/#L273)

 Returns the value at a given index. Raise an error if the index is not populated.

 
```
fun box index(
  i: USize val)
: this->A ?

```
 #### Parameters

 * i: [USize](builtin-usize) val

 #### Returns

 * this->A ?

 ### values

 [[Source]](https://stdlib.ponylang.io/src/collections/set/#L280)

 Return an iterator over the values.

 
```
fun box values()
: SetValues[A, H, this->HashSet[A, H] ref] ref^

```
 #### Returns

 * [SetValues](collections-setvalues)[A, H, this->[HashSet](index)[A, H] ref] ref^

 ### compare

 [[Source]](https://stdlib.ponylang.io/src/builtin/compare/#L28)

 
```
fun box compare(
  that: HashSet[A, H] box)
: (Less val | Equal val | Greater val)

```
 #### Parameters

 * that: [HashSet](index)[A, H] box

 #### Returns

 * ([Less](builtin-less) val | [Equal](builtin-equal) val | [Greater](builtin-greater) val)



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/collections-HashSet>

MapIs[K: K, V: V]
=================

 [[Source]](https://stdlib.ponylang.io/src/collections/map/#L10)

 This is a map that uses identity comparison on the key.

 
```
type MapIs[K: K, V: V] is
  HashMap[K, V, HashIs[K] val] ref

```
 #### Type Alias For

 * [HashMap](collections-hashmap)[K, V, [HashIs](collections-hashis)[K] val] ref



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/collections-MapIs>

Reverse[optional A: ([Real](builtin-real)[A] val & ([I8](builtin-i8) val | [I16](builtin-i16) val | [I32](builtin-i32) val | [I64](builtin-i64) val | [I128](builtin-i128) val | [ILong](builtin-ilong) val | [ISize](builtin-isize) val | [U8](builtin-u8) val | [U16](builtin-u16) val | [U32](builtin-u32) val | [U64](builtin-u64) val | [U128](builtin-u128) val | [ULong](builtin-ulong) val | [USize](builtin-usize) val | [F32](builtin-f32) val | [F64](builtin-f64) val))]
====================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

 [[Source]](https://stdlib.ponylang.io/src/collections/reverse/#L1)

 Produces a decreasing range [max, min] with step `dec`, for any `Number` type. (i.e. the reverse of `Range`)

 Example program: 

 
```
use "collections"
actor Main
  new create(env: Env) =>
    for e in Reverse(10, 2, 2) do
      env.out.print(e.string())
    end 

```
 Which outputs: 

 
```
10
8
6
4
2

```
 If `dec` is 0, produces an infinite series of `max`.

 If `dec` is negative, produces a range with `max` as the only value.

 
```
class ref Reverse[optional A: (Real[A] val & (I8 val | I16 val | I32 val | 
    I64 val | I128 val | ILong val | 
    ISize val | U8 val | U16 val | 
    U32 val | U64 val | U128 val | 
    ULong val | USize val | F32 val | 
    F64 val))] is
  Iterator[A] ref

```
 #### Implements

 * [Iterator](builtin-iterator)[A] ref

 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/collections/reverse/#L36)

 
```
new ref create(
  max: A,
  min: A,
  dec: A = 1)
: Reverse[A] ref^

```
 #### Parameters

 * max: A
* min: A
* dec: A = 1

 #### Returns

 * [Reverse](index)[A] ref^

 Public Functions
----------------

 ### has\_next

 [[Source]](https://stdlib.ponylang.io/src/collections/reverse/#L42)

 
```
fun box has_next()
: Bool val

```
 #### Returns

 * [Bool](builtin-bool) val

 ### next

 [[Source]](https://stdlib.ponylang.io/src/collections/reverse/#L45)

 
```
fun ref next()
: A

```
 #### Returns

 * A

 ### rewind

 [[Source]](https://stdlib.ponylang.io/src/collections/reverse/#L52)

 
```
fun ref rewind()
: None val

```
 #### Returns

 * [None](builtin-none) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/collections-Reverse>

Map[K: ([Hashable](collections-hashable) #read & [Equatable](builtin-equatable)[K] #read), V: V]
================================================================================================

 [[Source]](https://stdlib.ponylang.io/src/collections/map/#L4)

 This is a map that uses structural equality on the key.

 
```
type Map[K: (Hashable #read & Equatable[K] #read), V: V] is
  HashMap[K, V, HashEq[K] val] ref

```
 #### Type Alias For

 * [HashMap](collections-hashmap)[K, V, [HashEq](collections-hasheq)[K] val] ref



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/collections-Map>

HashMap[K: K, V: V, H: [HashFunction](collections-hashfunction)[K] val]
=======================================================================

 [[Source]](https://stdlib.ponylang.io/src/collections/map/#L15)

 A quadratic probing hash map. Resize occurs at a load factor of 0.75. A resized map has 2 times the space. The hash function can be plugged in to the type to create different kinds of maps.

 
```
class ref HashMap[K: K, V: V, H: HashFunction[K] val]

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/collections/map/#L24)

 Create an array with space for prealloc elements without triggering a resize. Defaults to 6.

 
```
new ref create(
  prealloc: USize val = 6)
: HashMap[K, V, H] ref^

```
 #### Parameters

 * prealloc: [USize](builtin-usize) val = 6

 #### Returns

 * [HashMap](index)[K, V, H] ref^

 Public Functions
----------------

 ### size

 [[Source]](https://stdlib.ponylang.io/src/collections/map/#L33)

 The number of items in the map.

 
```
fun box size()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### space

 [[Source]](https://stdlib.ponylang.io/src/collections/map/#L39)

 The available space in the map. Resize will happen when size / space >= 0.75.

 
```
fun box space()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### apply

 [[Source]](https://stdlib.ponylang.io/src/collections/map/#L46)

 Gets a value from the map. Raises an error if no such item exists.

 
```
fun box apply(
  key: box->K!)
: this->V ?

```
 #### Parameters

 * key: box->K!

 #### Returns

 * this->V ?

 ### update

 [[Source]](https://stdlib.ponylang.io/src/collections/map/#L58)

 Sets a value in the map. Returns the old value if there was one, otherwise returns None. If there was no previous value, this may trigger a resize.

 
```
fun ref update(
  key: K,
  value: V)
: (V^ | None val)

```
 #### Parameters

 * key: K
* value: V

 #### Returns

 * (V^ | [None](builtin-none) val)

 ### upsert

 [[Source]](https://stdlib.ponylang.io/src/collections/map/#L78)

 Combines a provided value with the current value for the provided key using the provided function. If the provided key has not been added to the map yet, it sets its value to the provided value and ignores the provided function.

 As a simple example, say we had a map with I64 values and we wanted to add 4 to the current value for key "test", which let's say is currently 2. We call

 m.upsert("test", 4, {(current, provided) => current + provided })

 This changes the value associated with "test" to 6.

 If we have not yet added the key "new-key" to the map and we call

 m.upsert("new-key", 4, {(current, provided) => current + provided })

 then "new-key" is added to the map with a value of 4.

 Returns the value that we set the key to

 
```
fun ref upsert(
  key: K,
  value: V,
  f: {(V, V): V^}[K, V, H] box)
: V

```
 #### Parameters

 * key: K
* value: V
* f: {(V, V): V^}[K, V, H] box

 #### Returns

 * V

 ### insert

 [[Source]](https://stdlib.ponylang.io/src/collections/map/#L132)

 Set a value in the map. Returns the new value, allowing reuse.

 
```
fun ref insert(
  key: K,
  value: V)
: V!

```
 #### Parameters

 * key: K
* value: V

 #### Returns

 * V!

 ### insert\_if\_absent

 [[Source]](https://stdlib.ponylang.io/src/collections/map/#L156)

 Set a value in the map if the key doesn't already exist in the Map. Saves an extra lookup when doing a pattern like:

 
```
if not my_map.contains(my_key) then
  my_map(my_key) = my_value
end

```
 Returns the value, the same as `insert`, allowing 'insert\_if\_absent' to be used as a drop-in replacement for `insert`.

 
```
fun ref insert_if_absent(
  key: K,
  value: V)
: V

```
 #### Parameters

 * key: K
* value: V

 #### Returns

 * V

 ### remove

 [[Source]](https://stdlib.ponylang.io/src/collections/map/#L192)

 Delete a value from the map and return it. Raises an error if there was no value for the given key.

 
```
fun ref remove(
  key: box->K!)
: (K^ , V^) ?

```
 #### Parameters

 * key: box->K!

 #### Returns

 * (K^ , V^) ?

 ### get\_or\_else

 [[Source]](https://stdlib.ponylang.io/src/collections/map/#L211)

 Get the value associated with provided key if present. Otherwise, return the provided alternate value.

 
```
fun box get_or_else(
  key: box->K!,
  alt: this->V)
: this->V

```
 #### Parameters

 * key: box->K!
* alt: this->V

 #### Returns

 * this->V

 ### contains

 [[Source]](https://stdlib.ponylang.io/src/collections/map/#L230)

 Checks whether the map contains the key k

 
```
fun box contains(
  k: box->K!)
: Bool val

```
 #### Parameters

 * k: box->K!

 #### Returns

 * [Bool](builtin-bool) val

 ### concat

 [[Source]](https://stdlib.ponylang.io/src/collections/map/#L237)

 Add K, V pairs from the iterator to the map.

 
```
fun ref concat(
  iter: Iterator[(K^ , V^)] ref)
: None val

```
 #### Parameters

 * iter: [Iterator](builtin-iterator)[(K^ , V^)] ref

 #### Returns

 * [None](builtin-none) val

 ### add[optional H2: [HashFunction](collections-hashfunction)[this->K!] val]

 [[Source]](https://stdlib.ponylang.io/src/collections/map/#L245)

 This with the new (key, value) mapping.

 
```
fun box add[optional H2: HashFunction[this->K!] val](
  key: this->K!,
  value: this->V!)
: HashMap[this->K!, this->V!, H2] ref^

```
 #### Parameters

 * key: this->K!
* value: this->V!

 #### Returns

 * [HashMap](index)[this->K!, this->V!, H2] ref^

 ### sub[optional H2: [HashFunction](collections-hashfunction)[this->K!] val]

 [[Source]](https://stdlib.ponylang.io/src/collections/map/#L257)

 This without the given key.

 
```
fun box sub[optional H2: HashFunction[this->K!] val](
  key: this->K!)
: HashMap[this->K!, this->V!, H2] ref^

```
 #### Parameters

 * key: this->K!

 #### Returns

 * [HashMap](index)[this->K!, this->V!, H2] ref^

 ### next\_index

 [[Source]](https://stdlib.ponylang.io/src/collections/map/#L267)

 Given an index, return the next index that has a populated key and value. Raise an error if there is no next populated index.

 
```
fun box next_index(
  prev: USize val = call)
: USize val ?

```
 #### Parameters

 * prev: [USize](builtin-usize) val = call

 #### Returns

 * [USize](builtin-usize) val ?

 ### index

 [[Source]](https://stdlib.ponylang.io/src/collections/map/#L279)

 Returns the key and value at a given index. Raise an error if the index is not populated.

 
```
fun box index(
  i: USize val)
: (this->K , this->V) ?

```
 #### Parameters

 * i: [USize](builtin-usize) val

 #### Returns

 * (this->K , this->V) ?

 ### compact

 [[Source]](https://stdlib.ponylang.io/src/collections/map/#L286)

 Minimise the memory used for the map.

 
```
fun ref compact()
: None val

```
 #### Returns

 * [None](builtin-none) val

 ### clone[optional H2: [HashFunction](collections-hashfunction)[this->K!] val]

 [[Source]](https://stdlib.ponylang.io/src/collections/map/#L292)

 Create a clone. The key and value types may be different due to aliasing and viewpoint adaptation.

 
```
fun box clone[optional H2: HashFunction[this->K!] val]()
: HashMap[this->K!, this->V!, H2] ref^

```
 #### Returns

 * [HashMap](index)[this->K!, this->V!, H2] ref^

 ### clear

 [[Source]](https://stdlib.ponylang.io/src/collections/map/#L306)

 Remove all entries.

 
```
fun ref clear()
: None val

```
 #### Returns

 * [None](builtin-none) val

 ### keys

 [[Source]](https://stdlib.ponylang.io/src/collections/map/#L370)

 Return an iterator over the keys.

 
```
fun box keys()
: MapKeys[K, V, H, this->HashMap[K, V, H] ref] ref^

```
 #### Returns

 * [MapKeys](collections-mapkeys)[K, V, H, this->[HashMap](index)[K, V, H] ref] ref^

 ### values

 [[Source]](https://stdlib.ponylang.io/src/collections/map/#L376)

 Return an iterator over the values.

 
```
fun box values()
: MapValues[K, V, H, this->HashMap[K, V, H] ref] ref^

```
 #### Returns

 * [MapValues](collections-mapvalues)[K, V, H, this->[HashMap](index)[K, V, H] ref] ref^

 ### pairs

 [[Source]](https://stdlib.ponylang.io/src/collections/map/#L382)

 Return an iterator over the keys and values.

 
```
fun box pairs()
: MapPairs[K, V, H, this->HashMap[K, V, H] ref] ref^

```
 #### Returns

 * [MapPairs](collections-mappairs)[K, V, H, this->[HashMap](index)[K, V, H] ref] ref^



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/collections-HashMap>

MapKeys[K: K, V: V, H: [HashFunction](collections-hashfunction)[K] val, M: [HashMap](collections-hashmap)[K, V, H] #read]
=========================================================================================================================

 [[Source]](https://stdlib.ponylang.io/src/collections/map/#L388)

 An iterator over the keys in a map.

 
```
class ref MapKeys[K: K, V: V, H: HashFunction[K] val, M: HashMap[K, V, H] #read] is
  Iterator[M->K] ref

```
 #### Implements

 * [Iterator](builtin-iterator)[M->K] ref

 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/collections/map/#L397)

 Creates an iterator for the given map.

 
```
new ref create(
  map: M)
: MapKeys[K, V, H, M] ref^

```
 #### Parameters

 * map: M

 #### Returns

 * [MapKeys](index)[K, V, H, M] ref^

 Public Functions
----------------

 ### has\_next

 [[Source]](https://stdlib.ponylang.io/src/collections/map/#L403)

 True if it believes there are remaining entries. May not be right if values were added or removed from the map.

 
```
fun box has_next()
: Bool val

```
 #### Returns

 * [Bool](builtin-bool) val

 ### next

 [[Source]](https://stdlib.ponylang.io/src/collections/map/#L410)

 Returns the next key, or raises an error if there isn't one. If keys are added during iteration, this may not return all keys.

 
```
fun ref next()
: M->K ?

```
 #### Returns

 * M->K ?



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/collections-MapKeys>

MapPairs[K: K, V: V, H: [HashFunction](collections-hashfunction)[K] val, M: [HashMap](collections-hashmap)[K, V, H] #read]
==========================================================================================================================

 [[Source]](https://stdlib.ponylang.io/src/collections/map/#L450)

 An iterator over the keys and values in a map.

 
```
class ref MapPairs[K: K, V: V, H: HashFunction[K] val, M: HashMap[K, V, H] #read] is
  Iterator[(M->K , M->V)] ref

```
 #### Implements

 * [Iterator](builtin-iterator)[(M->K , M->V)] ref

 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/collections/map/#L459)

 Creates an iterator for the given map.

 
```
new ref create(
  map: M)
: MapPairs[K, V, H, M] ref^

```
 #### Parameters

 * map: M

 #### Returns

 * [MapPairs](index)[K, V, H, M] ref^

 Public Functions
----------------

 ### has\_next

 [[Source]](https://stdlib.ponylang.io/src/collections/map/#L465)

 True if it believes there are remaining entries. May not be right if values were added or removed from the map.

 
```
fun box has_next()
: Bool val

```
 #### Returns

 * [Bool](builtin-bool) val

 ### next

 [[Source]](https://stdlib.ponylang.io/src/collections/map/#L472)

 Returns the next entry, or raises an error if there isn't one. If entries are added during iteration, this may not return all entries.

 
```
fun ref next()
: (M->K , M->V) ?

```
 #### Returns

 * (M->K , M->V) ?



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/collections-MapPairs>

MapValues[K: K, V: V, H: [HashFunction](collections-hashfunction)[K] val, M: [HashMap](collections-hashmap)[K, V, H] #read]
===========================================================================================================================

 [[Source]](https://stdlib.ponylang.io/src/collections/map/#L419)

 An iterator over the values in a map.

 
```
class ref MapValues[K: K, V: V, H: HashFunction[K] val, M: HashMap[K, V, H] #read] is
  Iterator[M->V] ref

```
 #### Implements

 * [Iterator](builtin-iterator)[M->V] ref

 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/collections/map/#L428)

 Creates an iterator for the given map.

 
```
new ref create(
  map: M)
: MapValues[K, V, H, M] ref^

```
 #### Parameters

 * map: M

 #### Returns

 * [MapValues](index)[K, V, H, M] ref^

 Public Functions
----------------

 ### has\_next

 [[Source]](https://stdlib.ponylang.io/src/collections/map/#L434)

 True if it believes there are remaining entries. May not be right if values were added or removed from the map.

 
```
fun box has_next()
: Bool val

```
 #### Returns

 * [Bool](builtin-bool) val

 ### next

 [[Source]](https://stdlib.ponylang.io/src/collections/map/#L441)

 Returns the next value, or raises an error if there isn't one. If values are added during iteration, this may not return all values.

 
```
fun ref next()
: M->V ?

```
 #### Returns

 * M->V ?



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/collections-MapValues>

ListNode[A: A]
==============

 [[Source]](https://stdlib.ponylang.io/src/collections/list_node/#L1)

 A node in a doubly linked list.

 (See Ponylang [collections.List](collections-list) class for usage examples.)

 Each node contains four fields: two link fields (references to the previous and to the next node in the sequence of nodes), one data field, and the reference to the in which it resides.

 As you would expect functions are provided to create a ListNode, update a ListNode's contained item, and pop the item from the ListNode.

 Additional functions are provided to operate on a ListNode as part of a Linked List. These provide for prepending, appending, removal, and safe traversal in both directions. The Ponylang [collections.List](collections-list) class is the correct way to create these. *Do not attempt to create a Linked List using only ListNodes.*

 Example program
---------------

 The functions which are illustrated below are only those which operate on an individual ListNode.

 It outputs:

 My node has the item value: My Node item My node has the updated item value: My updated Node item Popped the item from the ListNode The ListNode has no (None) item.

 
```
  use "collections"
  actor Main
    new create(env:Env) =>

      // Create a new ListNode of type String
      let my_list_node = ListNode[String]("My Node item")
      try 
        env.out.print("My node has the item value: "
                      + my_list_node.apply()?) // My Node item
      end

      // Update the item contained in the ListNode
      try
        my_list_node.update("My updated Node item")?
        env.out.print("My node has the updated item value: "
                      + my_list_node.apply()?) // My updated Node item
      end
      // Pop the item from the ListNode
      try
        my_list_node.pop()?
        env.out.print("Popped the item from the ListNode")
        my_list_node.apply()? // This will error as the item is now None
      else
        env.out.print("The ListNode has no (None) item.")
      end
...


```pony
class ref ListNode[A: A]

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/collections/list_node/#L66)

 Create a node. Initially, it is not in any list.

 
```
new ref create(
  item: (A | None val) = reference)
: ListNode[A] ref^

```
 #### Parameters

 * item: (A | [None](builtin-none) val) = reference

 #### Returns

 * [ListNode](index)[A] ref^

 Public Functions
----------------

 ### apply

 [[Source]](https://stdlib.ponylang.io/src/collections/list_node/#L72)

 Return the item, if we have one, otherwise raise an error.

 
```
fun box apply()
: this->A ?

```
 #### Returns

 * this->A ?

 ### update

 [[Source]](https://stdlib.ponylang.io/src/collections/list_node/#L78)

 Replace the item and return the previous one. Raise an error if we have no previous value.

 
```
fun ref update(
  value: (A | None val))
: A^ ?

```
 #### Parameters

 * value: (A | [None](builtin-none) val)

 #### Returns

 * A^ ?

 ### pop

 [[Source]](https://stdlib.ponylang.io/src/collections/list_node/#L85)

 Remove the item from the node, if we have one, otherwise raise an error.

 
```
fun ref pop()
: A^ ?

```
 #### Returns

 * A^ ?

 ### prepend

 [[Source]](https://stdlib.ponylang.io/src/collections/list_node/#L91)

 Prepend a node to this one. If `that` is already in a list, it is removed before it is prepended. Returns true if `that` was removed from another list. If the ListNode is not contained within a List the prepend will fail.

 
```
fun ref prepend(
  that: ListNode[A] ref)
: Bool val

```
 #### Parameters

 * that: [ListNode](index)[A] ref

 #### Returns

 * [Bool](builtin-bool) val

 ### append

 [[Source]](https://stdlib.ponylang.io/src/collections/list_node/#L124)

 Append a node to this one. If `that` is already in a list, it is removed before it is appended. Returns true if `that` was removed from another list.

 If the ListNode is not contained within a List the append will fail.

 
```
fun ref append(
  that: ListNode[A] ref)
: Bool val

```
 #### Parameters

 * that: [ListNode](index)[A] ref

 #### Returns

 * [Bool](builtin-bool) val

 ### remove

 [[Source]](https://stdlib.ponylang.io/src/collections/list_node/#L158)

 Remove a node from a list.

 The ListNode must be contained within a List for this to succeed.

 
```
fun ref remove()
: None val

```
 #### Returns

 * [None](builtin-none) val

 ### has\_prev

 [[Source]](https://stdlib.ponylang.io/src/collections/list_node/#L193)

 Return true if there is a previous node.

 
```
fun box has_prev()
: Bool val

```
 #### Returns

 * [Bool](builtin-bool) val

 ### has\_next

 [[Source]](https://stdlib.ponylang.io/src/collections/list_node/#L199)

 Return true if there is a next node.

 
```
fun box has_next()
: Bool val

```
 #### Returns

 * [Bool](builtin-bool) val

 ### prev

 [[Source]](https://stdlib.ponylang.io/src/collections/list_node/#L205)

 Return the previous node.

 
```
fun box prev()
: (this->ListNode[A] ref | None val)

```
 #### Returns

 * (this->[ListNode](index)[A] ref | [None](builtin-none) val)

 ### next

 [[Source]](https://stdlib.ponylang.io/src/collections/list_node/#L211)

 Return the next node.

 
```
fun box next()
: (this->ListNode[A] ref | None val)

```
 #### Returns

 * (this->[ListNode](index)[A] ref | [None](builtin-none) val)



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/collections-ListNode>

MinHeap[A: [Comparable](builtin-comparable)[A] #read]
=====================================================

 [[Source]](https://stdlib.ponylang.io/src/collections/heap/#L2)

 
```
type MinHeap[A: Comparable[A] #read] is
  BinaryHeap[A, MinHeapPriority[A] val] ref

```
 #### Type Alias For

 * [BinaryHeap](collections-binaryheap)[A, [MinHeapPriority](collections-minheappriority)[A] val] ref



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/collections-MinHeap>

ListNodes[A: A, N: [ListNode](collections-listnode)[A] #read]
=============================================================

 [[Source]](https://stdlib.ponylang.io/src/collections/list/#L677)

 Iterate over the nodes in a list.

 
```
class ref ListNodes[A: A, N: ListNode[A] #read] is
  Iterator[N] ref

```
 #### Implements

 * [Iterator](builtin-iterator)[N] ref

 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/collections/list/#L684)

 Keep the next list node to be examined.

 
```
new ref create(
  head: (N | None val),
  reverse: Bool val = false)
: ListNodes[A, N] ref^

```
 #### Parameters

 * head: (N | [None](builtin-none) val)
* reverse: [Bool](builtin-bool) val = false

 #### Returns

 * [ListNodes](index)[A, N] ref^

 Public Functions
----------------

 ### has\_next

 [[Source]](https://stdlib.ponylang.io/src/collections/list/#L691)

 If we have a list node, we have more values.

 
```
fun box has_next()
: Bool val

```
 #### Returns

 * [Bool](builtin-bool) val

 ### next

 [[Source]](https://stdlib.ponylang.io/src/collections/list/#L697)

 Get the list node and replace it with the next one.

 
```
fun ref next()
: N ?

```
 #### Returns

 * N ?



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/collections-ListNodes>

List[A: A]
==========

 [[Source]](https://stdlib.ponylang.io/src/collections/list/#L1)

 A doubly linked list.

 (The following is paraphrased from [Wikipedia](https://en.wikipedia.org/wiki/Doubly_linked_list).)

 A doubly linked list is a linked data structure that consists of a set of sequentially linked records called nodes. (Implemented in Ponylang via the collections.ListNode class.) Each node contains four fields: two link fields (references to the previous and to the next node in the sequence of nodes), one data field, and the reference to the in which it resides. A doubly linked list can be conceptualized as two singly linked lists formed from the same data items, but in opposite sequential orders.

 As you would expect. functions are provided to perform all the common list operations such as creation, traversal, node addition and removal, iteration, mapping, filtering, etc.

 Example program
---------------

 There are a *lot* of functions in List. The following code picks out a few common examples.

 It outputs:

 
```
A new empty list has 0 nodes.
Adding one node to our empty list means it now has a size of 1.
The first (index 0) node has the value: A single String
A list created by appending our second single-node list onto our first has size: 2
The List nodes of our first list are now:
  A single String
  Another String
Append *moves* the nodes from the second list so that now has 0 nodes.
A list created from an array of three strings has size: 3
  First
  Second
  Third
Mapping over our three-node list produces a new list of size: 3
Each node-value in the resulting list is now far more exciting:
  First BOOM!
  Second BOOM!
  Third BOOM!
Filtering our three-node list produces a new list of size: 2
  Second BOOM!
  Third BOOM!
The size of our first partitioned list (matches predicate): 1
The size of our second partitioned list (doesn't match predicate): 1
Our matching partition elements are:
  Second BOOM!

```
 
```
  use "collections"

  actor Main
    new create(env:Env) =>

      // Create a new empty List of type String
      let my_list = List[String]()

      env.out.print("A new empty list has " + my_list.size().string() + " nodes.") // 0

      // Push a String literal onto our empty List
      my_list.push("A single String")
      env.out.print("Adding one node to our empty list means it now has a size of "
                    + my_list.size().string() + ".") // 1

      // Get the first element of our List
      try env.out.print("The first (index 0) node has the value: "
                        + my_list.index(0)?()?.string()) end // A single String

      // Create a second List from a single String literal
      let my_second_list = List[String].unit("Another String")

      // Append the second List to the first
      my_list.append_list(my_second_list)
      env.out.print("A list created by appending our second single-node list onto our first has size: "
                    + my_list.size().string()) // 2
      env.out.print("The List nodes of our first list are now:")
      for n in my_list.values() do
        env.out.print("\t" + n.string())
      end
      // NOTE: this _moves_ the elements so second_list consequently ends up empty
      env.out.print("Append *moves* the nodes from the second list so that now has "
                    + my_second_list.size().string() + " nodes.") // 0

      // Create a third List from a Seq(ence)
      // (In this case a literal array of Strings)
      let my_third_list = List[String].from(["First"; "Second"; "Third"])
      env.out.print("A list created from an array of three strings has size: "
                    + my_third_list.size().string()) // 3
      for n in my_third_list.values() do
        env.out.print("\t" + n.string())
      end

      // Map over the third List, concatenating some "BOOM!'s" into a new List
      let new_list = my_third_list.map[String]({ (n) => n + " BOOM!" })
      env.out.print("Mapping over our three-node list produces a new list of size: "
                    + new_list.size().string()) // 3
      env.out.print("Each node-value in the resulting list is now far more exciting:")
      for n in new_list.values() do
        env.out.print("\t" + n.string())
      end

      // Filter the new list to extract 2 elements
      let filtered_list = new_list.filter({ (n) => n.string().contains("d BOOM!") })
      env.out.print("Filtering our three-node list produces a new list of size: "
                        + filtered_list.size().string()) // 2
      for n in filtered_list.values() do
        env.out.print("\t" + n.string()) // Second BOOM!\nThird BOOM!
      end

      // Partition the filtered list
      let partitioned_lists = filtered_list.partition({ (n) => n.string().contains("Second") })
      env.out.print("The size of our first partitioned list (matches predicate): " + partitioned_lists._1.size().string())        // 1
      env.out.print("The size of our second partitioned list (doesn't match predicate): " + partitioned_lists._2.size().string())  // 1
      env.out.print("Our matching partition elements are:")
      for n in partitioned_lists._1.values() do
        env.out.print("\t" + n.string()) // Second BOOM!
      end

```
 
```
class ref List[A: A] is
  Seq[A] ref

```
 #### Implements

 * [Seq](builtin-seq)[A] ref

 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/collections/list/#L123)

 Do nothing, but be compatible with Seq.

 
```
new ref create(
  len: USize val = 0)
: List[A] ref^

```
 #### Parameters

 * len: [USize](builtin-usize) val = 0

 #### Returns

 * [List](index)[A] ref^

 ### unit

 [[Source]](https://stdlib.ponylang.io/src/collections/list/#L129)

 Builds a new list from an element.

 
```
new ref unit(
  a: A)
: List[A] ref^

```
 #### Parameters

 * a: A

 #### Returns

 * [List](index)[A] ref^

 ### from

 [[Source]](https://stdlib.ponylang.io/src/collections/list/#L135)

 Builds a new list from the sequence passed in.

 
```
new ref from(
  seq: Array[A^] ref)
: List[A] ref^

```
 #### Parameters

 * seq: [Array](builtin-array)[A^] ref

 #### Returns

 * [List](index)[A] ref^

 Public Functions
----------------

 ### reserve

 [[Source]](https://stdlib.ponylang.io/src/collections/list/#L143)

 Do nothing, but be compatible with Seq.

 
```
fun ref reserve(
  len: USize val)
: None val

```
 #### Parameters

 * len: [USize](builtin-usize) val

 #### Returns

 * [None](builtin-none) val

 ### size

 [[Source]](https://stdlib.ponylang.io/src/collections/list/#L149)

 Returns the number of items in the list.

 
```
fun box size()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### apply

 [[Source]](https://stdlib.ponylang.io/src/collections/list/#L155)

 Get the i-th element, raising an error if the index is out of bounds.

 
```
fun box apply(
  i: USize val = 0)
: this->A ?

```
 #### Parameters

 * i: [USize](builtin-usize) val = 0

 #### Returns

 * this->A ?

 ### update

 [[Source]](https://stdlib.ponylang.io/src/collections/list/#L161)

 Change the i-th element, raising an error if the index is out of bounds. Returns the previous value, which may be None if the node has been popped but left on the list.

 
```
fun ref update(
  i: USize val,
  value: A)
: A^ ?

```
 #### Parameters

 * i: [USize](builtin-usize) val
* value: A

 #### Returns

 * A^ ?

 ### index

 [[Source]](https://stdlib.ponylang.io/src/collections/list/#L169)

 Gets the i-th node, raising an error if the index is out of bounds.

 
```
fun box index(
  i: USize val)
: this->ListNode[A] ref ?

```
 #### Parameters

 * i: [USize](builtin-usize) val

 #### Returns

 * this->[ListNode](collections-listnode)[A] ref ?

 ### remove

 [[Source]](https://stdlib.ponylang.io/src/collections/list/#L187)

 Remove the i-th node, raising an error if the index is out of bounds. The removed node is returned.

 
```
fun ref remove(
  i: USize val)
: ListNode[A] ref ?

```
 #### Parameters

 * i: [USize](builtin-usize) val

 #### Returns

 * [ListNode](collections-listnode)[A] ref ?

 ### clear

 [[Source]](https://stdlib.ponylang.io/src/collections/list/#L194)

 Empties the list.

 
```
fun ref clear()
: None val

```
 #### Returns

 * [None](builtin-none) val

 ### head

 [[Source]](https://stdlib.ponylang.io/src/collections/list/#L202)

 Get the head of the list.

 
```
fun box head()
: this->ListNode[A] ref ?

```
 #### Returns

 * this->[ListNode](collections-listnode)[A] ref ?

 ### tail

 [[Source]](https://stdlib.ponylang.io/src/collections/list/#L208)

 Get the tail of the list.

 
```
fun box tail()
: this->ListNode[A] ref ?

```
 #### Returns

 * this->[ListNode](collections-listnode)[A] ref ?

 ### prepend\_node

 [[Source]](https://stdlib.ponylang.io/src/collections/list/#L214)

 Adds a node to the head of the list.

 
```
fun ref prepend_node(
  node: ListNode[A] ref)
: None val

```
 #### Parameters

 * node: [ListNode](collections-listnode)[A] ref

 #### Returns

 * [None](builtin-none) val

 ### append\_node

 [[Source]](https://stdlib.ponylang.io/src/collections/list/#L225)

 Adds a node to the tail of the list.

 
```
fun ref append_node(
  node: ListNode[A] ref)
: None val

```
 #### Parameters

 * node: [ListNode](collections-listnode)[A] ref

 #### Returns

 * [None](builtin-none) val

 ### append\_list

 [[Source]](https://stdlib.ponylang.io/src/collections/list/#L236)

 Remove all nodes from that and append them to this.

 
```
fun ref append_list(
  that: List[A] ref)
: None val

```
 #### Parameters

 * that: [List](index)[A] ref

 #### Returns

 * [None](builtin-none) val

 ### prepend\_list

 [[Source]](https://stdlib.ponylang.io/src/collections/list/#L246)

 Remove all nodes from that and prepend them to this.

 
```
fun ref prepend_list(
  that: List[A] ref)
: None val

```
 #### Parameters

 * that: [List](index)[A] ref

 #### Returns

 * [None](builtin-none) val

 ### push

 [[Source]](https://stdlib.ponylang.io/src/collections/list/#L256)

 Adds a value to the tail of the list.

 
```
fun ref push(
  a: A)
: None val

```
 #### Parameters

 * a: A

 #### Returns

 * [None](builtin-none) val

 ### pop

 [[Source]](https://stdlib.ponylang.io/src/collections/list/#L262)

 Removes a value from the tail of the list.

 
```
fun ref pop()
: A^ ?

```
 #### Returns

 * A^ ?

 ### unshift

 [[Source]](https://stdlib.ponylang.io/src/collections/list/#L268)

 Adds a value to the head of the list.

 
```
fun ref unshift(
  a: A)
: None val

```
 #### Parameters

 * a: A

 #### Returns

 * [None](builtin-none) val

 ### shift

 [[Source]](https://stdlib.ponylang.io/src/collections/list/#L274)

 Removes a value from the head of the list.

 
```
fun ref shift()
: A^ ?

```
 #### Returns

 * A^ ?

 ### append

 [[Source]](https://stdlib.ponylang.io/src/collections/list/#L280)

 Append len elements from a sequence, starting from the given offset.

 
```
fun ref append(
  seq: (ReadSeq[A] box & ReadElement[A^] box),
  offset: USize val = 0,
  len: USize val = call)
: None val

```
 #### Parameters

 * seq: ([ReadSeq](builtin-readseq)[A] box & [ReadElement](builtin-readelement)[A^] box)
* offset: [USize](builtin-usize) val = 0
* len: [USize](builtin-usize) val = call

 #### Returns

 * [None](builtin-none) val

 ### concat

 [[Source]](https://stdlib.ponylang.io/src/collections/list/#L305)

 Add len iterated elements to the end of the list, starting from the given offset.

 
```
fun ref concat(
  iter: Iterator[A^] ref,
  offset: USize val = 0,
  len: USize val = call)
: None val

```
 #### Parameters

 * iter: [Iterator](builtin-iterator)[A^] ref
* offset: [USize](builtin-usize) val = 0
* len: [USize](builtin-usize) val = call

 #### Returns

 * [None](builtin-none) val

 ### truncate

 [[Source]](https://stdlib.ponylang.io/src/collections/list/#L328)

 Truncate the list to the given length, discarding excess elements. If the list is already smaller than len, do nothing.

 
```
fun ref truncate(
  len: USize val)
: None val

```
 #### Parameters

 * len: [USize](builtin-usize) val

 #### Returns

 * [None](builtin-none) val

 ### clone

 [[Source]](https://stdlib.ponylang.io/src/collections/list/#L339)

 Clone the list.

 
```
fun box clone()
: List[this->A!] ref^

```
 #### Returns

 * [List](index)[this->A!] ref^

 ### map[B: B]

 [[Source]](https://stdlib.ponylang.io/src/collections/list/#L350)

 Builds a new list by applying a function to every member of the list.

 
```
fun box map[B: B](
  f: {(this->A!): B^}[A, B] box)
: List[B] ref^

```
 #### Parameters

 * f: {(this->A!): B^}[A, B] box

 #### Returns

 * [List](index)[B] ref^

 ### flat\_map[B: B]

 [[Source]](https://stdlib.ponylang.io/src/collections/list/#L377)

 Builds a new list by applying a function to every member of the list and using the elements of the resulting lists.

 
```
fun box flat_map[B: B](
  f: {(this->A!): List[B]}[A, B] box)
: List[B] ref^

```
 #### Parameters

 * f: {(this->A!): List[B]}[A, B] box

 #### Returns

 * [List](index)[B] ref^

 ### filter

 [[Source]](https://stdlib.ponylang.io/src/collections/list/#L404)

 Builds a new list with those elements that satisfy a provided predicate.

 
```
fun box filter(
  f: {(this->A!): Bool}[A] box)
: List[this->A!] ref^

```
 #### Parameters

 * f: {(this->A!): Bool}[A] box

 #### Returns

 * [List](index)[this->A!] ref^

 ### fold[B: B]

 [[Source]](https://stdlib.ponylang.io/src/collections/list/#L433)

 Folds the elements of the list using the supplied function.

 
```
fun box fold[B: B](
  f: {(B!, this->A!): B^}[A, B] box,
  acc: B)
: B

```
 #### Parameters

 * f: {(B!, this->A!): B^}[A, B] box
* acc: B

 #### Returns

 * B

 ### every

 [[Source]](https://stdlib.ponylang.io/src/collections/list/#L463)

 Returns true if every element satisfies the provided predicate, false otherwise.

 
```
fun box every(
  f: {(this->A!): Bool}[A] box)
: Bool val

```
 #### Parameters

 * f: {(this->A!): Bool}[A] box

 #### Returns

 * [Bool](builtin-bool) val

 ### exists

 [[Source]](https://stdlib.ponylang.io/src/collections/list/#L488)

 Returns true if at least one element satisfies the provided predicate, false otherwise.

 
```
fun box exists(
  f: {(this->A!): Bool}[A] box)
: Bool val

```
 #### Parameters

 * f: {(this->A!): Bool}[A] box

 #### Returns

 * [Bool](builtin-bool) val

 ### partition

 [[Source]](https://stdlib.ponylang.io/src/collections/list/#L513)

 Builds a pair of lists, the first of which is made up of the elements satisfying the supplied predicate and the second of which is made up of those that do not.

 
```
fun box partition(
  f: {(this->A!): Bool}[A] box)
: (List[this->A!] ref^ , List[this->A!] ref^)

```
 #### Parameters

 * f: {(this->A!): Bool}[A] box

 #### Returns

 * ([List](index)[this->A!] ref^ , [List](index)[this->A!] ref^)

 ### drop

 [[Source]](https://stdlib.ponylang.io/src/collections/list/#L529)

 Builds a list by dropping the first n elements.

 
```
fun box drop(
  n: USize val)
: List[this->A!] ref^

```
 #### Parameters

 * n: [USize](builtin-usize) val

 #### Returns

 * [List](index)[this->A!] ref^

 ### take

 [[Source]](https://stdlib.ponylang.io/src/collections/list/#L547)

 Builds a list of the first n elements.

 
```
fun box take(
  n: USize val)
: List[this->A!] ref

```
 #### Parameters

 * n: [USize](builtin-usize) val

 #### Returns

 * [List](index)[this->A!] ref

 ### take\_while

 [[Source]](https://stdlib.ponylang.io/src/collections/list/#L565)

 Builds a list of elements satisfying the provided predicate until one does not.

 
```
fun box take_while(
  f: {(this->A!): Bool}[A] box)
: List[this->A!] ref^

```
 #### Parameters

 * f: {(this->A!): Bool}[A] box

 #### Returns

 * [List](index)[this->A!] ref^

 ### reverse

 [[Source]](https://stdlib.ponylang.io/src/collections/list/#L585)

 Builds a new list by reversing the elements in the list.

 
```
fun box reverse()
: List[this->A!] ref^

```
 #### Returns

 * [List](index)[this->A!] ref^

 ### contains[optional B: (A & [HasEq](builtin-haseq)[A!] #read)]

 [[Source]](https://stdlib.ponylang.io/src/collections/list/#L607)

 Returns true if the list contains the provided element, false otherwise.

 
```
fun box contains[optional B: (A & HasEq[A!] #read)](
  a: box->B)
: Bool val

```
 #### Parameters

 * a: box->B

 #### Returns

 * [Bool](builtin-bool) val

 ### nodes

 [[Source]](https://stdlib.ponylang.io/src/collections/list/#L635)

 Return an iterator on the nodes in the list.

 
```
fun box nodes()
: ListNodes[A, this->ListNode[A] ref] ref^

```
 #### Returns

 * [ListNodes](collections-listnodes)[A, this->[ListNode](collections-listnode)[A] ref] ref^

 ### rnodes

 [[Source]](https://stdlib.ponylang.io/src/collections/list/#L641)

 Return an iterator on the nodes in the list.

 
```
fun box rnodes()
: ListNodes[A, this->ListNode[A] ref] ref^

```
 #### Returns

 * [ListNodes](collections-listnodes)[A, this->[ListNode](collections-listnode)[A] ref] ref^

 ### values

 [[Source]](https://stdlib.ponylang.io/src/collections/list/#L647)

 Return an iterator on the values in the list.

 
```
fun box values()
: ListValues[A, this->ListNode[A] ref] ref^

```
 #### Returns

 * [ListValues](collections-listvalues)[A, this->[ListNode](collections-listnode)[A] ref] ref^

 ### rvalues

 [[Source]](https://stdlib.ponylang.io/src/collections/list/#L653)

 Return an iterator on the values in the list.

 
```
fun box rvalues()
: ListValues[A, this->ListNode[A] ref] ref^

```
 #### Returns

 * [ListValues](collections-listvalues)[A, this->[ListNode](collections-listnode)[A] ref] ref^



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/collections-List>

ListValues[A: A, N: [ListNode](collections-listnode)[A] #read]
==============================================================

 [[Source]](https://stdlib.ponylang.io/src/collections/list/#L714)

 Iterate over the values in a list.

 
```
class ref ListValues[A: A, N: ListNode[A] #read] is
  Iterator[N->A] ref

```
 #### Implements

 * [Iterator](builtin-iterator)[N->A] ref

 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/collections/list/#L721)

 Keep the next list node to be examined.

 
```
new ref create(
  head: (N | None val),
  reverse: Bool val = false)
: ListValues[A, N] ref^

```
 #### Parameters

 * head: (N | [None](builtin-none) val)
* reverse: [Bool](builtin-bool) val = false

 #### Returns

 * [ListValues](index)[A, N] ref^

 Public Functions
----------------

 ### has\_next

 [[Source]](https://stdlib.ponylang.io/src/collections/list/#L728)

 If we have a list node, we have more values.

 
```
fun box has_next()
: Bool val

```
 #### Returns

 * [Bool](builtin-bool) val

 ### next

 [[Source]](https://stdlib.ponylang.io/src/collections/list/#L734)

 Get the value of the list node and replace it with the next one.

 
```
fun ref next()
: N->A ?

```
 #### Returns

 * N->A ?



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/collections-ListValues>

Hashable64
==========

 [[Source]](https://stdlib.ponylang.io/src/collections/hashable/#L7)

 A version of Hashable that returns 64-bit hashes on every platform.

 
```
interface ref Hashable64

```
 Public Functions
----------------

 ### hash64

 [[Source]](https://stdlib.ponylang.io/src/collections/hashable/#L11)

 
```
fun box hash64()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/collections-Hashable64>

BinaryHeapPriority[A: [Comparable](builtin-comparable)[A] #read]
================================================================

 [[Source]](https://stdlib.ponylang.io/src/collections/heap/#L131)

 
```
type BinaryHeapPriority[A: Comparable[A] #read] is
  (_BinaryHeapPriority[A] val & (MinHeapPriority[A] val | MaxHeapPriority[A] val))

```
 #### Type Alias For

 * (\_BinaryHeapPriority[A] val & ([MinHeapPriority](collections-minheappriority)[A] val | [MaxHeapPriority](collections-maxheappriority)[A] val))



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/collections-BinaryHeapPriority>

MaxHeapPriority[A: [Comparable](builtin-comparable)[A] #read]
=============================================================

 [[Source]](https://stdlib.ponylang.io/src/collections/heap/#L143)

 
```
primitive val MaxHeapPriority[A: Comparable[A] #read] is
  _BinaryHeapPriority[A] val

```
 #### Implements

 * \_BinaryHeapPriority[A] val

 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/collections/heap/#L143)

 
```
new val create()
: MaxHeapPriority[A] val^

```
 #### Returns

 * [MaxHeapPriority](index)[A] val^

 Public Functions
----------------

 ### apply

 [[Source]](https://stdlib.ponylang.io/src/collections/heap/#L144)

 
```
fun box apply(
  x: A,
  y: A)
: Bool val

```
 #### Parameters

 * x: A
* y: A

 #### Returns

 * [Bool](builtin-bool) val

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/collections/heap/#L144)

 
```
fun box eq(
  that: MaxHeapPriority[A] val)
: Bool val

```
 #### Parameters

 * that: [MaxHeapPriority](index)[A] val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/collections/heap/#L144)

 
```
fun box ne(
  that: MaxHeapPriority[A] val)
: Bool val

```
 #### Parameters

 * that: [MaxHeapPriority](index)[A] val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/collections-MaxHeapPriority>

MinHeapPriority[A: [Comparable](builtin-comparable)[A] #read]
=============================================================

 [[Source]](https://stdlib.ponylang.io/src/collections/heap/#L139)

 
```
primitive val MinHeapPriority[A: Comparable[A] #read] is
  _BinaryHeapPriority[A] val

```
 #### Implements

 * \_BinaryHeapPriority[A] val

 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/collections/heap/#L139)

 
```
new val create()
: MinHeapPriority[A] val^

```
 #### Returns

 * [MinHeapPriority](index)[A] val^

 Public Functions
----------------

 ### apply

 [[Source]](https://stdlib.ponylang.io/src/collections/heap/#L140)

 
```
fun box apply(
  x: A,
  y: A)
: Bool val

```
 #### Parameters

 * x: A
* y: A

 #### Returns

 * [Bool](builtin-bool) val

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/collections/heap/#L140)

 
```
fun box eq(
  that: MinHeapPriority[A] val)
: Bool val

```
 #### Parameters

 * that: [MinHeapPriority](index)[A] val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/collections/heap/#L140)

 
```
fun box ne(
  that: MinHeapPriority[A] val)
: Bool val

```
 #### Parameters

 * that: [MinHeapPriority](index)[A] val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/collections-MinHeapPriority>

HashByteSeq
===========

 [[Source]](https://stdlib.ponylang.io/src/collections/hashable/#L103)

 Hash and equality functions for arbitrary ByteSeq.

 
```
primitive val HashByteSeq is
  HashFunction[(String box | Array[U8 val] box)] val,
  HashFunction64[(String box | Array[U8 val] box)] val

```
 #### Implements

 * [HashFunction](collections-hashfunction)[([String](builtin-string) box | [Array](builtin-array)[[U8](builtin-u8) val] box)] val
* [HashFunction64](collections-hashfunction64)[([String](builtin-string) box | [Array](builtin-array)[[U8](builtin-u8) val] box)] val

 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/collections/hashable/#L103)

 
```
new val create()
: HashByteSeq val^

```
 #### Returns

 * [HashByteSeq](index) val^

 Public Functions
----------------

 ### hash

 [[Source]](https://stdlib.ponylang.io/src/collections/hashable/#L108)

 
```
fun box hash(
  x: (String box | Array[U8 val] box))
: USize val

```
 #### Parameters

 * x: ([String](builtin-string) box | [Array](builtin-array)[[U8](builtin-u8) val] box)

 #### Returns

 * [USize](builtin-usize) val

 ### hash64

 [[Source]](https://stdlib.ponylang.io/src/collections/hashable/#L111)

 
```
fun box hash64(
  x: (String box | Array[U8 val] box))
: U64 val

```
 #### Parameters

 * x: ([String](builtin-string) box | [Array](builtin-array)[[U8](builtin-u8) val] box)

 #### Returns

 * [U64](builtin-u64) val

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/collections/hashable/#L114)

 
```
fun box eq(
  x: (String box | Array[U8 val] box),
  y: (String box | Array[U8 val] box))
: Bool val

```
 #### Parameters

 * x: ([String](builtin-string) box | [Array](builtin-array)[[U8](builtin-u8) val] box)
* y: ([String](builtin-string) box | [Array](builtin-array)[[U8](builtin-u8) val] box)

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/collections/hashable/#L108)

 
```
fun box ne(
  that: HashByteSeq val)
: Bool val

```
 #### Parameters

 * that: [HashByteSeq](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/collections-HashByteSeq>

BinaryHeap[A: [Comparable](builtin-comparable)[A] #read, P: (\_BinaryHeapPriority[A] val & ([MinHeapPriority](collections-minheappriority)[A] val | [MaxHeapPriority](collections-maxheappriority)[A] val))]
============================================================================================================================================================================================================

 [[Source]](https://stdlib.ponylang.io/src/collections/heap/#L5)

 A priority queue implemented as a binary heap. The `BinaryHeapPriority` type parameter determines whether this is max-heap or a min-heap.

 
```
class ref BinaryHeap[A: Comparable[A] #read, P: (_BinaryHeapPriority[A] val & (MinHeapPriority[A] val | MaxHeapPriority[A] val))]

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/collections/heap/#L12)

 Create an empty heap with space for `len` elements.

 
```
new ref create(
  len: USize val)
: BinaryHeap[A, P] ref^

```
 #### Parameters

 * len: [USize](builtin-usize) val

 #### Returns

 * [BinaryHeap](index)[A, P] ref^

 Public Functions
----------------

 ### clear

 [[Source]](https://stdlib.ponylang.io/src/collections/heap/#L18)

 Remove all elements from the heap.

 
```
fun ref clear()
: None val

```
 #### Returns

 * [None](builtin-none) val

 ### size

 [[Source]](https://stdlib.ponylang.io/src/collections/heap/#L24)

 Return the number of elements in the heap.

 
```
fun box size()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### peek

 [[Source]](https://stdlib.ponylang.io/src/collections/heap/#L30)

 Return the highest priority item in the heap. For max-heaps, the greatest item will be returned. For min-heaps, the smallest item will be returned.

 
```
fun box peek()
: this->A ?

```
 #### Returns

 * this->A ?

 ### push

 [[Source]](https://stdlib.ponylang.io/src/collections/heap/#L37)

 Push an item into the heap.

 The time complexity of this operation is O(log(n)) with respect to the size of the heap.

 
```
fun ref push(
  value: A)
: None val

```
 #### Parameters

 * value: A

 #### Returns

 * [None](builtin-none) val

 ### pop

 [[Source]](https://stdlib.ponylang.io/src/collections/heap/#L47)

 Remove the highest priority value from the heap and return it. For max-heaps, the greatest item will be returned. For min-heaps, the smallest item will be returned.

 The time complexity of this operation is O(log(n)) with respect to the size of the heap.

 
```
fun ref pop()
: A^ ?

```
 #### Returns

 * A^ ?

 ### append

 [[Source]](https://stdlib.ponylang.io/src/collections/heap/#L61)

 Append len elements from a sequence, starting from the given offset.

 
```
fun ref append(
  seq: (ReadSeq[A] box & ReadElement[A^] box),
  offset: USize val = 0,
  len: USize val = call)
: None val

```
 #### Parameters

 * seq: ([ReadSeq](builtin-readseq)[A] box & [ReadElement](builtin-readelement)[A^] box)
* offset: [USize](builtin-usize) val = 0
* len: [USize](builtin-usize) val = call

 #### Returns

 * [None](builtin-none) val

 ### concat

 [[Source]](https://stdlib.ponylang.io/src/collections/heap/#L72)

 Add len iterated elements, starting from the given offset.

 
```
fun ref concat(
  iter: Iterator[A^] ref,
  offset: USize val = 0,
  len: USize val = call)
: None val

```
 #### Parameters

 * iter: [Iterator](builtin-iterator)[A^] ref
* offset: [USize](builtin-usize) val = 0
* len: [USize](builtin-usize) val = call

 #### Returns

 * [None](builtin-none) val

 ### values

 [[Source]](https://stdlib.ponylang.io/src/collections/heap/#L79)

 Return an iterator for the elements in the heap. The order of elements is arbitrary.

 
```
fun box values()
: ArrayValues[A, this->Array[A] ref] ref^

```
 #### Returns

 * [ArrayValues](builtin-arrayvalues)[A, this->[Array](builtin-array)[A] ref] ref^



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/collections-BinaryHeap>

HashFunction64[A: A]
====================

 [[Source]](https://stdlib.ponylang.io/src/collections/hashable/#L35)

 A pluggable hash function with 64-bit hashes.

 
```
interface val HashFunction64[A: A]

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/collections/hashable/#L39)

 Data structures create instances internally. Use a primitive if possible.

 
```
new val create()
: HashFunction64[A] val^

```
 #### Returns

 * [HashFunction64](index)[A] val^

 Public Functions
----------------

 ### hash64

 [[Source]](https://stdlib.ponylang.io/src/collections/hashable/#L44)

 Calculate the hash of some type. This is an alias of the type parameter to allow data structures to hash things without consuming them.

 
```
fun box hash64(
  x: box->A!)
: U64 val

```
 #### Parameters

 * x: box->A!

 #### Returns

 * [U64](builtin-u64) val

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/collections/hashable/#L50)

 Determine equality between two keys with the same hash. This is done with viewpoint adapted aliases to allow data structures to determine equality in a box fun without consuming keys.

 
```
fun box eq(
  x: box->A!,
  y: box->A!)
: Bool val

```
 #### Parameters

 * x: box->A!
* y: box->A!

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/collections-HashFunction64>

MaxHeap[A: [Comparable](builtin-comparable)[A] #read]
=====================================================

 [[Source]](https://stdlib.ponylang.io/src/collections/heap/#L3)

 
```
type MaxHeap[A: Comparable[A] #read] is
  BinaryHeap[A, MaxHeapPriority[A] val] ref

```
 #### Type Alias For

 * [BinaryHeap](collections-binaryheap)[A, [MaxHeapPriority](collections-maxheappriority)[A] val] ref



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/collections-MaxHeap>

HashEq64[A: ([Hashable64](collections-hashable64) #read & [Equatable](builtin-equatable)[A] #read)]
===================================================================================================

 [[Source]](https://stdlib.ponylang.io/src/collections/hashable/#L70)

 
```
primitive val HashEq64[A: (Hashable64 #read & Equatable[A] #read)] is
  HashFunction64[A] val

```
 #### Implements

 * [HashFunction64](collections-hashfunction64)[A] val

 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/collections/hashable/#L70)

 
```
new val create()
: HashEq64[A] val^

```
 #### Returns

 * [HashEq64](index)[A] val^

 Public Functions
----------------

 ### hash64

 [[Source]](https://stdlib.ponylang.io/src/collections/hashable/#L72)

 Use the hash function from the type parameter.

 
```
fun box hash64(
  x: box->A)
: U64 val

```
 #### Parameters

 * x: box->A

 #### Returns

 * [U64](builtin-u64) val

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/collections/hashable/#L78)

 Use the structural equality function from the type parameter.

 
```
fun box eq(
  x: box->A,
  y: box->A)
: Bool val

```
 #### Parameters

 * x: box->A
* y: box->A

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/collections/hashable/#L72)

 
```
fun box ne(
  that: HashEq64[A] val)
: Bool val

```
 #### Parameters

 * that: [HashEq64](index)[A] val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/collections-HashEq64>

Hashable
========

 [[Source]](https://stdlib.ponylang.io/src/collections/hashable/#L1)

 Anything with a hash method is hashable.

 
```
interface ref Hashable

```
 Public Functions
----------------

 ### hash

 [[Source]](https://stdlib.ponylang.io/src/collections/hashable/#L5)

 
```
fun box hash()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/collections-Hashable>

HashFunction[A: A]
==================

 [[Source]](https://stdlib.ponylang.io/src/collections/hashable/#L13)

 A pluggable hash function.

 
```
interface val HashFunction[A: A]

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/collections/hashable/#L17)

 Data structures create instances internally. Use a primitive if possible.

 
```
new val create()
: HashFunction[A] val^

```
 #### Returns

 * [HashFunction](index)[A] val^

 Public Functions
----------------

 ### hash

 [[Source]](https://stdlib.ponylang.io/src/collections/hashable/#L22)

 Calculate the hash of some type. This is an alias of the type parameter to allow data structures to hash things without consuming them.

 
```
fun box hash(
  x: box->A!)
: USize val

```
 #### Parameters

 * x: box->A!

 #### Returns

 * [USize](builtin-usize) val

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/collections/hashable/#L28)

 Determine equality between two keys with the same hash. This is done with viewpoint adapted aliases to allow data structures to determine equality in a box fun without consuming keys.

 
```
fun box eq(
  x: box->A!,
  y: box->A!)
: Bool val

```
 #### Parameters

 * x: box->A!
* y: box->A!

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/collections-HashFunction>

HashEq[A: ([Hashable](collections-hashable) #read & [Equatable](builtin-equatable)[A] #read)]
=============================================================================================

 [[Source]](https://stdlib.ponylang.io/src/collections/hashable/#L57)

 
```
primitive val HashEq[A: (Hashable #read & Equatable[A] #read)] is
  HashFunction[A] val

```
 #### Implements

 * [HashFunction](collections-hashfunction)[A] val

 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/collections/hashable/#L57)

 
```
new val create()
: HashEq[A] val^

```
 #### Returns

 * [HashEq](index)[A] val^

 Public Functions
----------------

 ### hash

 [[Source]](https://stdlib.ponylang.io/src/collections/hashable/#L58)

 Use the hash function from the type parameter.

 
```
fun box hash(
  x: box->A)
: USize val

```
 #### Parameters

 * x: box->A

 #### Returns

 * [USize](builtin-usize) val

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/collections/hashable/#L64)

 Use the structural equality function from the type parameter.

 
```
fun box eq(
  x: box->A,
  y: box->A)
: Bool val

```
 #### Parameters

 * x: box->A
* y: box->A

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/collections/hashable/#L58)

 
```
fun box ne(
  that: HashEq[A] val)
: Bool val

```
 #### Parameters

 * that: [HashEq](index)[A] val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/collections-HashEq>

Flag[A: (([U8](builtin-u8) val | [U16](builtin-u16) val | [U32](builtin-u32) val | [U64](builtin-u64) val | [U128](builtin-u128) val | [ULong](builtin-ulong) val | [USize](builtin-usize) val) & [Integer](builtin-integer)[A] val)]
=====================================================================================================================================================================================================================================

 [[Source]](https://stdlib.ponylang.io/src/collections/flag/#L1)

 A flag should be a primitive with a value method that returns the bits that represent the flag. This allows a flag to encode a single bit, or any combination of bits.

 
```
interface val Flag[A: ((U8 val | U16 val | U32 val | 
    U64 val | U128 val | ULong val | 
    USize val) & Integer[A] val)]

```
 Public Functions
----------------

 ### value

 [[Source]](https://stdlib.ponylang.io/src/collections/flag/#L7)

 
```
fun box value()
: A

```
 #### Returns

 * A



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/collections-Flag>

Flags[A: [Flag](collections-flag)[B] val, optional B: (([U8](builtin-u8) val | [U16](builtin-u16) val | [U32](builtin-u32) val | [U64](builtin-u64) val | [U128](builtin-u128) val | [ULong](builtin-ulong) val | [USize](builtin-usize) val) & [Integer](builtin-integer)[B] val)]
===================================================================================================================================================================================================================================================================================

 [[Source]](https://stdlib.ponylang.io/src/collections/flag/#L9)

 Flags is a set of flags. The flags that are recognised should be passed as a union type for type parameter A. For example:

 primitive SSE fun value(): U64 => 1

 primitive AVX fun value(): U64 => 2

 primitive RDTSCP fun value(): U64 => 4

 type Features is Flags[(SSE | AVX | RDTSCP)]

 Type parameter B is the unlying field used to store the flags.

 
```
class ref Flags[A: Flag[B] val, optional B: ((U8 val | U16 val | U32 val | 
    U64 val | U128 val | ULong val | 
    USize val) & Integer[B] val)] is
  Comparable[Flags[A, B] box] ref

```
 #### Implements

 * [Comparable](builtin-comparable)[[Flags](index)[A, B] box] ref

 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/collections/flag/#L9)

 
```
new iso create()
: Flags[A, B] iso^

```
 #### Returns

 * [Flags](index)[A, B] iso^

 Public Functions
----------------

 ### value

 [[Source]](https://stdlib.ponylang.io/src/collections/flag/#L30)

 Returns the bit encoding of the set flags.

 
```
fun box value()
: B

```
 #### Returns

 * B

 ### apply

 [[Source]](https://stdlib.ponylang.io/src/collections/flag/#L36)

 Returns true if the flag is set.

 
```
fun box apply(
  flag: A)
: Bool val

```
 #### Parameters

 * flag: A

 #### Returns

 * [Bool](builtin-bool) val

 ### all

 [[Source]](https://stdlib.ponylang.io/src/collections/flag/#L42)

 Sets all bits, including undefined flags.

 
```
fun ref all()
: None val

```
 #### Returns

 * [None](builtin-none) val

 ### clear

 [[Source]](https://stdlib.ponylang.io/src/collections/flag/#L48)

 Unsets all flags.

 
```
fun ref clear()
: None val

```
 #### Returns

 * [None](builtin-none) val

 ### set

 [[Source]](https://stdlib.ponylang.io/src/collections/flag/#L54)

 Sets the flag.

 
```
fun ref set(
  flag: A)
: None val

```
 #### Parameters

 * flag: A

 #### Returns

 * [None](builtin-none) val

 ### unset

 [[Source]](https://stdlib.ponylang.io/src/collections/flag/#L60)

 Unsets the flag.

 
```
fun ref unset(
  flag: A)
: None val

```
 #### Parameters

 * flag: A

 #### Returns

 * [None](builtin-none) val

 ### flip

 [[Source]](https://stdlib.ponylang.io/src/collections/flag/#L66)

 Sets the flag if it is unset, unsets the flag if it is set.

 
```
fun ref flip(
  flag: A)
: None val

```
 #### Parameters

 * flag: A

 #### Returns

 * [None](builtin-none) val

 ### union

 [[Source]](https://stdlib.ponylang.io/src/collections/flag/#L72)

 The union of this and that.

 
```
fun ref union(
  that: Flags[A, B] box)
: None val

```
 #### Parameters

 * that: [Flags](index)[A, B] box

 #### Returns

 * [None](builtin-none) val

 ### intersect

 [[Source]](https://stdlib.ponylang.io/src/collections/flag/#L78)

 The intersection of this and that.

 
```
fun ref intersect(
  that: Flags[A, B] box)
: None val

```
 #### Parameters

 * that: [Flags](index)[A, B] box

 #### Returns

 * [None](builtin-none) val

 ### difference

 [[Source]](https://stdlib.ponylang.io/src/collections/flag/#L84)

 The symmetric difference of this and that.

 
```
fun ref difference(
  that: Flags[A, B] box)
: None val

```
 #### Parameters

 * that: [Flags](index)[A, B] box

 #### Returns

 * [None](builtin-none) val

 ### remove

 [[Source]](https://stdlib.ponylang.io/src/collections/flag/#L90)

 Unset flags that are set in that.

 
```
fun ref remove(
  that: Flags[A, B] box)
: None val

```
 #### Parameters

 * that: [Flags](index)[A, B] box

 #### Returns

 * [None](builtin-none) val

 ### add

 [[Source]](https://stdlib.ponylang.io/src/collections/flag/#L96)

 This with the flag set.

 
```
fun box add(
  flag: A)
: Flags[A, B] iso^

```
 #### Parameters

 * flag: A

 #### Returns

 * [Flags](index)[A, B] iso^

 ### sub

 [[Source]](https://stdlib.ponylang.io/src/collections/flag/#L104)

 This with the flag unset.

 
```
fun box sub(
  flag: A)
: Flags[A, B] iso^

```
 #### Parameters

 * flag: A

 #### Returns

 * [Flags](index)[A, B] iso^

 ### op\_or

 [[Source]](https://stdlib.ponylang.io/src/collections/flag/#L112)

 The union of this and that.

 
```
fun box op_or(
  that: Flags[A, B] box)
: Flags[A, B] iso^

```
 #### Parameters

 * that: [Flags](index)[A, B] box

 #### Returns

 * [Flags](index)[A, B] iso^

 ### op\_and

 [[Source]](https://stdlib.ponylang.io/src/collections/flag/#L120)

 The intersection of this and that.

 
```
fun box op_and(
  that: Flags[A, B] box)
: Flags[A, B] iso^

```
 #### Parameters

 * that: [Flags](index)[A, B] box

 #### Returns

 * [Flags](index)[A, B] iso^

 ### op\_xor

 [[Source]](https://stdlib.ponylang.io/src/collections/flag/#L128)

 The symmetric difference of this and that.

 
```
fun box op_xor(
  that: Flags[A, B] box)
: Flags[A, B] iso^

```
 #### Parameters

 * that: [Flags](index)[A, B] box

 #### Returns

 * [Flags](index)[A, B] iso^

 ### without

 [[Source]](https://stdlib.ponylang.io/src/collections/flag/#L136)

 The flags in this that are not in that.

 
```
fun box without(
  that: Flags[A, B] box)
: Flags[A, B] iso^

```
 #### Parameters

 * that: [Flags](index)[A, B] box

 #### Returns

 * [Flags](index)[A, B] iso^

 ### clone

 [[Source]](https://stdlib.ponylang.io/src/collections/flag/#L144)

 Create a clone.

 
```
fun box clone()
: Flags[A, B] iso^

```
 #### Returns

 * [Flags](index)[A, B] iso^

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/collections/flag/#L152)

 Returns true if this has the same flags set as that.

 
```
fun box eq(
  that: Flags[A, B] box)
: Bool val

```
 #### Parameters

 * that: [Flags](index)[A, B] box

 #### Returns

 * [Bool](builtin-bool) val

 ### lt

 [[Source]](https://stdlib.ponylang.io/src/collections/flag/#L158)

 Returns true if the flags set on this are a strict subset of the flags set on that. Flags is only partially ordered, so lt is not the opposite of ge.

 
```
fun box lt(
  that: Flags[A, B] box)
: Bool val

```
 #### Parameters

 * that: [Flags](index)[A, B] box

 #### Returns

 * [Bool](builtin-bool) val

 ### le

 [[Source]](https://stdlib.ponylang.io/src/collections/flag/#L165)

 Returns true if the flags set on this are a subset of the flags set on that or they are the same. Flags is only partially ordered, so le is not the opposite of te.

 
```
fun box le(
  that: Flags[A, B] box)
: Bool val

```
 #### Parameters

 * that: [Flags](index)[A, B] box

 #### Returns

 * [Bool](builtin-bool) val

 ### gt

 [[Source]](https://stdlib.ponylang.io/src/collections/flag/#L173)

 Returns true if the flags set on this are a struct superset of the flags set on that. Flags is only partially ordered, so gt is not the opposite of le.

 
```
fun box gt(
  that: Flags[A, B] box)
: Bool val

```
 #### Parameters

 * that: [Flags](index)[A, B] box

 #### Returns

 * [Bool](builtin-bool) val

 ### ge

 [[Source]](https://stdlib.ponylang.io/src/collections/flag/#L181)

 Returns true if the flags set on this are a superset of the flags set on that or they are the same. Flags is only partially ordered, so ge is not the opposite of lt.

 
```
fun box ge(
  that: Flags[A, B] box)
: Bool val

```
 #### Parameters

 * that: [Flags](index)[A, B] box

 #### Returns

 * [Bool](builtin-bool) val

 ### compare

 [[Source]](https://stdlib.ponylang.io/src/builtin/compare/#L28)

 
```
fun box compare(
  that: Flags[A, B] box)
: (Less val | Equal val | Greater val)

```
 #### Parameters

 * that: [Flags](index)[A, B] box

 #### Returns

 * ([Less](builtin-less) val | [Equal](builtin-equal) val | [Greater](builtin-greater) val)

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/builtin/compare/#L20)

 
```
fun box ne(
  that: Flags[A, B] box)
: Bool val

```
 #### Parameters

 * that: [Flags](index)[A, B] box

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/collections-Flags>

HashIs[A: A]
============

 [[Source]](https://stdlib.ponylang.io/src/collections/hashable/#L84)

 
```
primitive val HashIs[A: A] is
  HashFunction[A] val,
  HashFunction64[A] val

```
 #### Implements

 * [HashFunction](collections-hashfunction)[A] val
* [HashFunction64](collections-hashfunction64)[A] val

 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/collections/hashable/#L84)

 
```
new val create()
: HashIs[A] val^

```
 #### Returns

 * [HashIs](index)[A] val^

 Public Functions
----------------

 ### hash

 [[Source]](https://stdlib.ponylang.io/src/collections/hashable/#L85)

 Hash the identity rather than the contents.

 
```
fun box hash(
  x: box->A!)
: USize val

```
 #### Parameters

 * x: box->A!

 #### Returns

 * [USize](builtin-usize) val

 ### hash64

 [[Source]](https://stdlib.ponylang.io/src/collections/hashable/#L91)

 Hash the identity rather than the contents.

 
```
fun box hash64(
  x: box->A!)
: U64 val

```
 #### Parameters

 * x: box->A!

 #### Returns

 * [U64](builtin-u64) val

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/collections/hashable/#L97)

 Determine equality by identity rather than structurally.

 
```
fun box eq(
  x: box->A!,
  y: box->A!)
: Bool val

```
 #### Parameters

 * x: box->A!
* y: box->A!

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/collections/hashable/#L85)

 
```
fun box ne(
  that: HashIs[A] val)
: Bool val

```
 #### Parameters

 * that: [HashIs](index)[A] val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/collections-HashIs>

Base64
======

 [[Source]](https://stdlib.ponylang.io/src/encode-base64/base64/#L26)

 
```
primitive val Base64

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/encode-base64/base64/#L26)

 
```
new val create()
: Base64 val^

```
 #### Returns

 * [Base64](index) val^

 Public Functions
----------------

 ### encode\_pem

 [[Source]](https://stdlib.ponylang.io/src/encode-base64/base64/#L27)

 Encode for PEM (RFC 1421).

 
```
fun box encode_pem(
  data: ReadSeq[U8 val] box)
: String iso^

```
 #### Parameters

 * data: [ReadSeq](builtin-readseq)[[U8](builtin-u8) val] box

 #### Returns

 * [String](builtin-string) iso^

 ### encode\_mime

 [[Source]](https://stdlib.ponylang.io/src/encode-base64/base64/#L33)

 Encode for MIME (RFC 2045).

 
```
fun box encode_mime(
  data: ReadSeq[U8 val] box)
: String iso^

```
 #### Parameters

 * data: [ReadSeq](builtin-readseq)[[U8](builtin-u8) val] box

 #### Returns

 * [String](builtin-string) iso^

 ### encode\_url[optional A: [Seq](builtin-seq)[[U8](builtin-u8) val] iso]

 [[Source]](https://stdlib.ponylang.io/src/encode-base64/base64/#L39)

 Encode for URLs (RFC 4648). Padding characters are stripped by default.

 
```
fun box encode_url[optional A: Seq[U8 val] iso](
  data: ReadSeq[U8 val] box,
  pad: Bool val = false)
: A^

```
 #### Parameters

 * data: [ReadSeq](builtin-readseq)[[U8](builtin-u8) val] box
* pad: [Bool](builtin-bool) val = false

 #### Returns

 * A^

 ### encode[optional A: [Seq](builtin-seq)[[U8](builtin-u8) val] iso]

 [[Source]](https://stdlib.ponylang.io/src/encode-base64/base64/#L50)

 Configurable encoding. The defaults are for RFC 4648.

 
```
fun box encode[optional A: Seq[U8 val] iso](
  data: ReadSeq[U8 val] box,
  at62: U8 val = 43,
  at63: U8 val = 47,
  pad: U8 val = 61,
  linelen: USize val = 0,
  linesep: String val = "
")
: A^

```
 #### Parameters

 * data: [ReadSeq](builtin-readseq)[[U8](builtin-u8) val] box
* at62: [U8](builtin-u8) val = 43
* at63: [U8](builtin-u8) val = 47
* pad: [U8](builtin-u8) val = 61
* linelen: [USize](builtin-usize) val = 0
* linesep: [String](builtin-string) val = " "

 #### Returns

 * A^

 ### decode\_url[optional A: [Seq](builtin-seq)[[U8](builtin-u8) val] iso]

 [[Source]](https://stdlib.ponylang.io/src/encode-base64/base64/#L125)

 Decode for URLs (RFC 4648).

 
```
fun box decode_url[optional A: Seq[U8 val] iso](
  data: ReadSeq[U8 val] box)
: A^ ?

```
 #### Parameters

 * data: [ReadSeq](builtin-readseq)[[U8](builtin-u8) val] box

 #### Returns

 * A^ ?

 ### decode[optional A: [Seq](builtin-seq)[[U8](builtin-u8) val] iso]

 [[Source]](https://stdlib.ponylang.io/src/encode-base64/base64/#L131)

 Configurable decoding. The defaults are for RFC 4648. Missing padding is not an error. Non-base64 data, other than whitespace (which can appear at any time), is an error.

 
```
fun box decode[optional A: Seq[U8 val] iso](
  data: ReadSeq[U8 val] box,
  at62: U8 val = 43,
  at63: U8 val = 47,
  pad: U8 val = 61)
: A^ ?

```
 #### Parameters

 * data: [ReadSeq](builtin-readseq)[[U8](builtin-u8) val] box
* at62: [U8](builtin-u8) val = 43
* at63: [U8](builtin-u8) val = 47
* pad: [U8](builtin-u8) val = 61

 #### Returns

 * A^ ?

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/encode-base64/base64/#L27)

 
```
fun box eq(
  that: Base64 val)
: Bool val

```
 #### Parameters

 * that: [Base64](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/encode-base64/base64/#L27)

 
```
fun box ne(
  that: Base64 val)
: Bool val

```
 #### Parameters

 * that: [Base64](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/encode-base64-Base64>

U16
===

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L73)

 
```
primitive val U16 is
  UnsignedInteger[U16 val] val

```
 #### Implements

 * [UnsignedInteger](builtin-unsignedinteger)[[U16](index) val] val

 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L74)

 
```
new val create(
  value: U16 val)
: U16 val^

```
 #### Parameters

 * value: [U16](index) val

 #### Returns

 * [U16](index) val^

 ### from[A: (([I8](builtin-i8) val | [I16](builtin-i16) val | [I32](builtin-i32) val | [I64](builtin-i64) val | [I128](builtin-i128) val | [ILong](builtin-ilong) val | [ISize](builtin-isize) val | [U8](builtin-u8) val | [U16](index) val | [U32](builtin-u32) val | [U64](builtin-u64) val | [U128](builtin-u128) val | [ULong](builtin-ulong) val | [USize](builtin-usize) val | [F32](builtin-f32) val | [F64](builtin-f64) val) & [Real](builtin-real)[A] val)]

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L75)

 
```
new val from[A: ((I8 val | I16 val | I32 val | 
    I64 val | I128 val | ILong val | 
    ISize val | U8 val | U16 val | 
    U32 val | U64 val | U128 val | 
    ULong val | USize val | F32 val | 
    F64 val) & Real[A] val)](
  a: A)
: U16 val^

```
 #### Parameters

 * a: A

 #### Returns

 * [U16](index) val^

 ### min\_value

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L77)

 
```
new val min_value()
: U16 val^

```
 #### Returns

 * [U16](index) val^

 ### max\_value

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L78)

 
```
new val max_value()
: U16 val^

```
 #### Returns

 * [U16](index) val^

 Public Functions
----------------

 ### next\_pow2

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L80)

 
```
fun box next_pow2()
: U16 val

```
 #### Returns

 * [U16](index) val

 ### abs

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L84)

 
```
fun box abs()
: U16 val

```
 #### Returns

 * [U16](index) val

 ### bit\_reverse

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L85)

 
```
fun box bit_reverse()
: U16 val

```
 #### Returns

 * [U16](index) val

 ### bswap

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L86)

 
```
fun box bswap()
: U16 val

```
 #### Returns

 * [U16](index) val

 ### popcount

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L87)

 
```
fun box popcount()
: U16 val

```
 #### Returns

 * [U16](index) val

 ### clz

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L88)

 
```
fun box clz()
: U16 val

```
 #### Returns

 * [U16](index) val

 ### ctz

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L89)

 
```
fun box ctz()
: U16 val

```
 #### Returns

 * [U16](index) val

 ### clz\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L91)

 Unsafe operation. If this is 0, the result is undefined.

 
```
fun box clz_unsafe()
: U16 val

```
 #### Returns

 * [U16](index) val

 ### ctz\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L98)

 Unsafe operation. If this is 0, the result is undefined.

 
```
fun box ctz_unsafe()
: U16 val

```
 #### Returns

 * [U16](index) val

 ### bitwidth

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L105)

 
```
fun box bitwidth()
: U16 val

```
 #### Returns

 * [U16](index) val

 ### bytewidth

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L107)

 
```
fun box bytewidth()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### min

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L109)

 
```
fun box min(
  y: U16 val)
: U16 val

```
 #### Parameters

 * y: [U16](index) val

 #### Returns

 * [U16](index) val

 ### max

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L110)

 
```
fun box max(
  y: U16 val)
: U16 val

```
 #### Parameters

 * y: [U16](index) val

 #### Returns

 * [U16](index) val

 ### addc

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L112)

 
```
fun box addc(
  y: U16 val)
: (U16 val , Bool val)

```
 #### Parameters

 * y: [U16](index) val

 #### Returns

 * ([U16](index) val , [Bool](builtin-bool) val)

 ### subc

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L115)

 
```
fun box subc(
  y: U16 val)
: (U16 val , Bool val)

```
 #### Parameters

 * y: [U16](index) val

 #### Returns

 * ([U16](index) val , [Bool](builtin-bool) val)

 ### mulc

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L118)

 
```
fun box mulc(
  y: U16 val)
: (U16 val , Bool val)

```
 #### Parameters

 * y: [U16](index) val

 #### Returns

 * ([U16](index) val , [Bool](builtin-bool) val)

 ### divc

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L121)

 
```
fun box divc(
  y: U16 val)
: (U16 val , Bool val)

```
 #### Parameters

 * y: [U16](index) val

 #### Returns

 * ([U16](index) val , [Bool](builtin-bool) val)

 ### remc

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L124)

 
```
fun box remc(
  y: U16 val)
: (U16 val , Bool val)

```
 #### Parameters

 * y: [U16](index) val

 #### Returns

 * ([U16](index) val , [Bool](builtin-bool) val)

 ### add\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L127)

 
```
fun box add_partial(
  y: U16 val)
: U16 val ?

```
 #### Parameters

 * y: [U16](index) val

 #### Returns

 * [U16](index) val ?

 ### sub\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L130)

 
```
fun box sub_partial(
  y: U16 val)
: U16 val ?

```
 #### Parameters

 * y: [U16](index) val

 #### Returns

 * [U16](index) val ?

 ### mul\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L133)

 
```
fun box mul_partial(
  y: U16 val)
: U16 val ?

```
 #### Parameters

 * y: [U16](index) val

 #### Returns

 * [U16](index) val ?

 ### div\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L136)

 
```
fun box div_partial(
  y: U16 val)
: U16 val ?

```
 #### Parameters

 * y: [U16](index) val

 #### Returns

 * [U16](index) val ?

 ### rem\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L139)

 
```
fun box rem_partial(
  y: U16 val)
: U16 val ?

```
 #### Parameters

 * y: [U16](index) val

 #### Returns

 * [U16](index) val ?

 ### divrem\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L142)

 
```
fun box divrem_partial(
  y: U16 val)
: (U16 val , U16 val) ?

```
 #### Parameters

 * y: [U16](index) val

 #### Returns

 * ([U16](index) val , [U16](index) val) ?

 ### shl

 
```
fun box shl(
  y: U16 val)
: U16 val

```
 #### Parameters

 * y: [U16](index) val

 #### Returns

 * [U16](index) val

 ### shr

 
```
fun box shr(
  y: U16 val)
: U16 val

```
 #### Parameters

 * y: [U16](index) val

 #### Returns

 * [U16](index) val

 ### fld

 
```
fun box fld(
  y: U16 val)
: U16 val

```
 #### Parameters

 * y: [U16](index) val

 #### Returns

 * [U16](index) val

 ### fldc

 
```
fun box fldc(
  y: U16 val)
: (U16 val , Bool val)

```
 #### Parameters

 * y: [U16](index) val

 #### Returns

 * ([U16](index) val , [Bool](builtin-bool) val)

 ### fld\_partial

 
```
fun box fld_partial(
  y: U16 val)
: U16 val ?

```
 #### Parameters

 * y: [U16](index) val

 #### Returns

 * [U16](index) val ?

 ### fld\_unsafe

 
```
fun box fld_unsafe(
  y: U16 val)
: U16 val

```
 #### Parameters

 * y: [U16](index) val

 #### Returns

 * [U16](index) val

 ### mod

 
```
fun box mod(
  y: U16 val)
: U16 val

```
 #### Parameters

 * y: [U16](index) val

 #### Returns

 * [U16](index) val

 ### modc

 
```
fun box modc(
  y: U16 val)
: (U16 val , Bool val)

```
 #### Parameters

 * y: [U16](index) val

 #### Returns

 * ([U16](index) val , [Bool](builtin-bool) val)

 ### mod\_partial

 
```
fun box mod_partial(
  y: U16 val)
: U16 val ?

```
 #### Parameters

 * y: [U16](index) val

 #### Returns

 * [U16](index) val ?

 ### mod\_unsafe

 
```
fun box mod_unsafe(
  y: U16 val)
: U16 val

```
 #### Parameters

 * y: [U16](index) val

 #### Returns

 * [U16](index) val

 ### shl\_unsafe

 
```
fun box shl_unsafe(
  y: U16 val)
: U16 val

```
 #### Parameters

 * y: [U16](index) val

 #### Returns

 * [U16](index) val

 ### shr\_unsafe

 
```
fun box shr_unsafe(
  y: U16 val)
: U16 val

```
 #### Parameters

 * y: [U16](index) val

 #### Returns

 * [U16](index) val

 ### rotl

 
```
fun box rotl(
  y: U16 val)
: U16 val

```
 #### Parameters

 * y: [U16](index) val

 #### Returns

 * [U16](index) val

 ### rotr

 
```
fun box rotr(
  y: U16 val)
: U16 val

```
 #### Parameters

 * y: [U16](index) val

 #### Returns

 * [U16](index) val

 ### string

 
```
fun box string()
: String iso^

```
 #### Returns

 * [String](builtin-string) iso^

 ### add\_unsafe

 
```
fun box add_unsafe(
  y: U16 val)
: U16 val

```
 #### Parameters

 * y: [U16](index) val

 #### Returns

 * [U16](index) val

 ### sub\_unsafe

 
```
fun box sub_unsafe(
  y: U16 val)
: U16 val

```
 #### Parameters

 * y: [U16](index) val

 #### Returns

 * [U16](index) val

 ### mul\_unsafe

 
```
fun box mul_unsafe(
  y: U16 val)
: U16 val

```
 #### Parameters

 * y: [U16](index) val

 #### Returns

 * [U16](index) val

 ### div\_unsafe

 
```
fun box div_unsafe(
  y: U16 val)
: U16 val

```
 #### Parameters

 * y: [U16](index) val

 #### Returns

 * [U16](index) val

 ### divrem\_unsafe

 
```
fun box divrem_unsafe(
  y: U16 val)
: (U16 val , U16 val)

```
 #### Parameters

 * y: [U16](index) val

 #### Returns

 * ([U16](index) val , [U16](index) val)

 ### rem\_unsafe

 
```
fun box rem_unsafe(
  y: U16 val)
: U16 val

```
 #### Parameters

 * y: [U16](index) val

 #### Returns

 * [U16](index) val

 ### neg\_unsafe

 
```
fun box neg_unsafe()
: U16 val

```
 #### Returns

 * [U16](index) val

 ### op\_and

 
```
fun box op_and(
  y: U16 val)
: U16 val

```
 #### Parameters

 * y: [U16](index) val

 #### Returns

 * [U16](index) val

 ### op\_or

 
```
fun box op_or(
  y: U16 val)
: U16 val

```
 #### Parameters

 * y: [U16](index) val

 #### Returns

 * [U16](index) val

 ### op\_xor

 
```
fun box op_xor(
  y: U16 val)
: U16 val

```
 #### Parameters

 * y: [U16](index) val

 #### Returns

 * [U16](index) val

 ### op\_not

 
```
fun box op_not()
: U16 val

```
 #### Returns

 * [U16](index) val

 ### add

 
```
fun box add(
  y: U16 val)
: U16 val

```
 #### Parameters

 * y: [U16](index) val

 #### Returns

 * [U16](index) val

 ### sub

 
```
fun box sub(
  y: U16 val)
: U16 val

```
 #### Parameters

 * y: [U16](index) val

 #### Returns

 * [U16](index) val

 ### mul

 
```
fun box mul(
  y: U16 val)
: U16 val

```
 #### Parameters

 * y: [U16](index) val

 #### Returns

 * [U16](index) val

 ### div

 
```
fun box div(
  y: U16 val)
: U16 val

```
 #### Parameters

 * y: [U16](index) val

 #### Returns

 * [U16](index) val

 ### divrem

 
```
fun box divrem(
  y: U16 val)
: (U16 val , U16 val)

```
 #### Parameters

 * y: [U16](index) val

 #### Returns

 * ([U16](index) val , [U16](index) val)

 ### rem

 
```
fun box rem(
  y: U16 val)
: U16 val

```
 #### Parameters

 * y: [U16](index) val

 #### Returns

 * [U16](index) val

 ### neg

 
```
fun box neg()
: U16 val

```
 #### Returns

 * [U16](index) val

 ### eq

 
```
fun box eq(
  y: U16 val)
: Bool val

```
 #### Parameters

 * y: [U16](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 
```
fun box ne(
  y: U16 val)
: Bool val

```
 #### Parameters

 * y: [U16](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### lt

 
```
fun box lt(
  y: U16 val)
: Bool val

```
 #### Parameters

 * y: [U16](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### le

 
```
fun box le(
  y: U16 val)
: Bool val

```
 #### Parameters

 * y: [U16](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ge

 
```
fun box ge(
  y: U16 val)
: Bool val

```
 #### Parameters

 * y: [U16](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### gt

 
```
fun box gt(
  y: U16 val)
: Bool val

```
 #### Parameters

 * y: [U16](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### hash

 
```
fun box hash()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### hash64

 
```
fun box hash64()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### i8

 
```
fun box i8()
: I8 val

```
 #### Returns

 * [I8](builtin-i8) val

 ### i16

 
```
fun box i16()
: I16 val

```
 #### Returns

 * [I16](builtin-i16) val

 ### i32

 
```
fun box i32()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### i64

 
```
fun box i64()
: I64 val

```
 #### Returns

 * [I64](builtin-i64) val

 ### i128

 
```
fun box i128()
: I128 val

```
 #### Returns

 * [I128](builtin-i128) val

 ### ilong

 
```
fun box ilong()
: ILong val

```
 #### Returns

 * [ILong](builtin-ilong) val

 ### isize

 
```
fun box isize()
: ISize val

```
 #### Returns

 * [ISize](builtin-isize) val

 ### u8

 
```
fun box u8()
: U8 val

```
 #### Returns

 * [U8](builtin-u8) val

 ### u16

 
```
fun box u16()
: U16 val

```
 #### Returns

 * [U16](index) val

 ### u32

 
```
fun box u32()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### u64

 
```
fun box u64()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### u128

 
```
fun box u128()
: U128 val

```
 #### Returns

 * [U128](builtin-u128) val

 ### ulong

 
```
fun box ulong()
: ULong val

```
 #### Returns

 * [ULong](builtin-ulong) val

 ### usize

 
```
fun box usize()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### f32

 
```
fun box f32()
: F32 val

```
 #### Returns

 * [F32](builtin-f32) val

 ### f64

 
```
fun box f64()
: F64 val

```
 #### Returns

 * [F64](builtin-f64) val

 ### i8\_unsafe

 
```
fun box i8_unsafe()
: I8 val

```
 #### Returns

 * [I8](builtin-i8) val

 ### i16\_unsafe

 
```
fun box i16_unsafe()
: I16 val

```
 #### Returns

 * [I16](builtin-i16) val

 ### i32\_unsafe

 
```
fun box i32_unsafe()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### i64\_unsafe

 
```
fun box i64_unsafe()
: I64 val

```
 #### Returns

 * [I64](builtin-i64) val

 ### i128\_unsafe

 
```
fun box i128_unsafe()
: I128 val

```
 #### Returns

 * [I128](builtin-i128) val

 ### ilong\_unsafe

 
```
fun box ilong_unsafe()
: ILong val

```
 #### Returns

 * [ILong](builtin-ilong) val

 ### isize\_unsafe

 
```
fun box isize_unsafe()
: ISize val

```
 #### Returns

 * [ISize](builtin-isize) val

 ### u8\_unsafe

 
```
fun box u8_unsafe()
: U8 val

```
 #### Returns

 * [U8](builtin-u8) val

 ### u16\_unsafe

 
```
fun box u16_unsafe()
: U16 val

```
 #### Returns

 * [U16](index) val

 ### u32\_unsafe

 
```
fun box u32_unsafe()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### u64\_unsafe

 
```
fun box u64_unsafe()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### u128\_unsafe

 
```
fun box u128_unsafe()
: U128 val

```
 #### Returns

 * [U128](builtin-u128) val

 ### ulong\_unsafe

 
```
fun box ulong_unsafe()
: ULong val

```
 #### Returns

 * [ULong](builtin-ulong) val

 ### usize\_unsafe

 
```
fun box usize_unsafe()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### f32\_unsafe

 
```
fun box f32_unsafe()
: F32 val

```
 #### Returns

 * [F32](builtin-f32) val

 ### f64\_unsafe

 
```
fun box f64_unsafe()
: F64 val

```
 #### Returns

 * [F64](builtin-f64) val

 ### compare

 
```
fun box compare(
  that: U16 val)
: (Less val | Equal val | Greater val)

```
 #### Parameters

 * that: [U16](index) val

 #### Returns

 * ([Less](builtin-less) val | [Equal](builtin-equal) val | [Greater](builtin-greater) val)



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/builtin-U16>

Stringable
==========

 [[Source]](https://stdlib.ponylang.io/src/builtin/stringable/#L1)

 Things that can be turned into a String.

 
```
interface box Stringable

```
 Public Functions
----------------

 ### string

 [[Source]](https://stdlib.ponylang.io/src/builtin/stringable/#L5)

 Generate a string representation of this object.

 
```
fun box string()
: String iso^

```
 #### Returns

 * [String](builtin-string) iso^



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/builtin-Stringable>

U8
==

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L1)

 
```
primitive val U8 is
  UnsignedInteger[U8 val] val

```
 #### Implements

 * [UnsignedInteger](builtin-unsignedinteger)[[U8](index) val] val

 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L2)

 
```
new val create(
  value: U8 val)
: U8 val^

```
 #### Parameters

 * value: [U8](index) val

 #### Returns

 * [U8](index) val^

 ### from[B: (([I8](builtin-i8) val | [I16](builtin-i16) val | [I32](builtin-i32) val | [I64](builtin-i64) val | [I128](builtin-i128) val | [ILong](builtin-ilong) val | [ISize](builtin-isize) val | [U8](index) val | [U16](builtin-u16) val | [U32](builtin-u32) val | [U64](builtin-u64) val | [U128](builtin-u128) val | [ULong](builtin-ulong) val | [USize](builtin-usize) val | [F32](builtin-f32) val | [F64](builtin-f64) val) & [Real](builtin-real)[B] val)]

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L3)

 
```
new val from[B: ((I8 val | I16 val | I32 val | 
    I64 val | I128 val | ILong val | 
    ISize val | U8 val | U16 val | 
    U32 val | U64 val | U128 val | 
    ULong val | USize val | F32 val | 
    F64 val) & Real[B] val)](
  a: B)
: U8 val^

```
 #### Parameters

 * a: B

 #### Returns

 * [U8](index) val^

 ### min\_value

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L5)

 
```
new val min_value()
: U8 val^

```
 #### Returns

 * [U8](index) val^

 ### max\_value

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L6)

 
```
new val max_value()
: U8 val^

```
 #### Returns

 * [U8](index) val^

 Public Functions
----------------

 ### next\_pow2

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L8)

 
```
fun box next_pow2()
: U8 val

```
 #### Returns

 * [U8](index) val

 ### abs

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L12)

 
```
fun box abs()
: U8 val

```
 #### Returns

 * [U8](index) val

 ### bit\_reverse

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L13)

 
```
fun box bit_reverse()
: U8 val

```
 #### Returns

 * [U8](index) val

 ### bswap

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L14)

 
```
fun box bswap()
: U8 val

```
 #### Returns

 * [U8](index) val

 ### popcount

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L15)

 
```
fun box popcount()
: U8 val

```
 #### Returns

 * [U8](index) val

 ### clz

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L16)

 
```
fun box clz()
: U8 val

```
 #### Returns

 * [U8](index) val

 ### ctz

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L17)

 
```
fun box ctz()
: U8 val

```
 #### Returns

 * [U8](index) val

 ### clz\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L19)

 Unsafe operation. If this is 0, the result is undefined.

 
```
fun box clz_unsafe()
: U8 val

```
 #### Returns

 * [U8](index) val

 ### ctz\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L26)

 Unsafe operation. If this is 0, the result is undefined.

 
```
fun box ctz_unsafe()
: U8 val

```
 #### Returns

 * [U8](index) val

 ### bitwidth

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L33)

 
```
fun box bitwidth()
: U8 val

```
 #### Returns

 * [U8](index) val

 ### bytewidth

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L35)

 
```
fun box bytewidth()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### min

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L37)

 
```
fun box min(
  y: U8 val)
: U8 val

```
 #### Parameters

 * y: [U8](index) val

 #### Returns

 * [U8](index) val

 ### max

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L38)

 
```
fun box max(
  y: U8 val)
: U8 val

```
 #### Parameters

 * y: [U8](index) val

 #### Returns

 * [U8](index) val

 ### addc

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L40)

 
```
fun box addc(
  y: U8 val)
: (U8 val , Bool val)

```
 #### Parameters

 * y: [U8](index) val

 #### Returns

 * ([U8](index) val , [Bool](builtin-bool) val)

 ### subc

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L43)

 
```
fun box subc(
  y: U8 val)
: (U8 val , Bool val)

```
 #### Parameters

 * y: [U8](index) val

 #### Returns

 * ([U8](index) val , [Bool](builtin-bool) val)

 ### mulc

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L46)

 
```
fun box mulc(
  y: U8 val)
: (U8 val , Bool val)

```
 #### Parameters

 * y: [U8](index) val

 #### Returns

 * ([U8](index) val , [Bool](builtin-bool) val)

 ### divc

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L49)

 
```
fun box divc(
  y: U8 val)
: (U8 val , Bool val)

```
 #### Parameters

 * y: [U8](index) val

 #### Returns

 * ([U8](index) val , [Bool](builtin-bool) val)

 ### remc

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L52)

 
```
fun box remc(
  y: U8 val)
: (U8 val , Bool val)

```
 #### Parameters

 * y: [U8](index) val

 #### Returns

 * ([U8](index) val , [Bool](builtin-bool) val)

 ### add\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L55)

 
```
fun box add_partial(
  y: U8 val)
: U8 val ?

```
 #### Parameters

 * y: [U8](index) val

 #### Returns

 * [U8](index) val ?

 ### sub\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L58)

 
```
fun box sub_partial(
  y: U8 val)
: U8 val ?

```
 #### Parameters

 * y: [U8](index) val

 #### Returns

 * [U8](index) val ?

 ### mul\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L61)

 
```
fun box mul_partial(
  y: U8 val)
: U8 val ?

```
 #### Parameters

 * y: [U8](index) val

 #### Returns

 * [U8](index) val ?

 ### div\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L64)

 
```
fun box div_partial(
  y: U8 val)
: U8 val ?

```
 #### Parameters

 * y: [U8](index) val

 #### Returns

 * [U8](index) val ?

 ### rem\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L67)

 
```
fun box rem_partial(
  y: U8 val)
: U8 val ?

```
 #### Parameters

 * y: [U8](index) val

 #### Returns

 * [U8](index) val ?

 ### divrem\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L70)

 
```
fun box divrem_partial(
  y: U8 val)
: (U8 val , U8 val) ?

```
 #### Parameters

 * y: [U8](index) val

 #### Returns

 * ([U8](index) val , [U8](index) val) ?

 ### shl

 
```
fun box shl(
  y: U8 val)
: U8 val

```
 #### Parameters

 * y: [U8](index) val

 #### Returns

 * [U8](index) val

 ### shr

 
```
fun box shr(
  y: U8 val)
: U8 val

```
 #### Parameters

 * y: [U8](index) val

 #### Returns

 * [U8](index) val

 ### fld

 
```
fun box fld(
  y: U8 val)
: U8 val

```
 #### Parameters

 * y: [U8](index) val

 #### Returns

 * [U8](index) val

 ### fldc

 
```
fun box fldc(
  y: U8 val)
: (U8 val , Bool val)

```
 #### Parameters

 * y: [U8](index) val

 #### Returns

 * ([U8](index) val , [Bool](builtin-bool) val)

 ### fld\_partial

 
```
fun box fld_partial(
  y: U8 val)
: U8 val ?

```
 #### Parameters

 * y: [U8](index) val

 #### Returns

 * [U8](index) val ?

 ### fld\_unsafe

 
```
fun box fld_unsafe(
  y: U8 val)
: U8 val

```
 #### Parameters

 * y: [U8](index) val

 #### Returns

 * [U8](index) val

 ### mod

 
```
fun box mod(
  y: U8 val)
: U8 val

```
 #### Parameters

 * y: [U8](index) val

 #### Returns

 * [U8](index) val

 ### modc

 
```
fun box modc(
  y: U8 val)
: (U8 val , Bool val)

```
 #### Parameters

 * y: [U8](index) val

 #### Returns

 * ([U8](index) val , [Bool](builtin-bool) val)

 ### mod\_partial

 
```
fun box mod_partial(
  y: U8 val)
: U8 val ?

```
 #### Parameters

 * y: [U8](index) val

 #### Returns

 * [U8](index) val ?

 ### mod\_unsafe

 
```
fun box mod_unsafe(
  y: U8 val)
: U8 val

```
 #### Parameters

 * y: [U8](index) val

 #### Returns

 * [U8](index) val

 ### shl\_unsafe

 
```
fun box shl_unsafe(
  y: U8 val)
: U8 val

```
 #### Parameters

 * y: [U8](index) val

 #### Returns

 * [U8](index) val

 ### shr\_unsafe

 
```
fun box shr_unsafe(
  y: U8 val)
: U8 val

```
 #### Parameters

 * y: [U8](index) val

 #### Returns

 * [U8](index) val

 ### rotl

 
```
fun box rotl(
  y: U8 val)
: U8 val

```
 #### Parameters

 * y: [U8](index) val

 #### Returns

 * [U8](index) val

 ### rotr

 
```
fun box rotr(
  y: U8 val)
: U8 val

```
 #### Parameters

 * y: [U8](index) val

 #### Returns

 * [U8](index) val

 ### string

 
```
fun box string()
: String iso^

```
 #### Returns

 * [String](builtin-string) iso^

 ### add\_unsafe

 
```
fun box add_unsafe(
  y: U8 val)
: U8 val

```
 #### Parameters

 * y: [U8](index) val

 #### Returns

 * [U8](index) val

 ### sub\_unsafe

 
```
fun box sub_unsafe(
  y: U8 val)
: U8 val

```
 #### Parameters

 * y: [U8](index) val

 #### Returns

 * [U8](index) val

 ### mul\_unsafe

 
```
fun box mul_unsafe(
  y: U8 val)
: U8 val

```
 #### Parameters

 * y: [U8](index) val

 #### Returns

 * [U8](index) val

 ### div\_unsafe

 
```
fun box div_unsafe(
  y: U8 val)
: U8 val

```
 #### Parameters

 * y: [U8](index) val

 #### Returns

 * [U8](index) val

 ### divrem\_unsafe

 
```
fun box divrem_unsafe(
  y: U8 val)
: (U8 val , U8 val)

```
 #### Parameters

 * y: [U8](index) val

 #### Returns

 * ([U8](index) val , [U8](index) val)

 ### rem\_unsafe

 
```
fun box rem_unsafe(
  y: U8 val)
: U8 val

```
 #### Parameters

 * y: [U8](index) val

 #### Returns

 * [U8](index) val

 ### neg\_unsafe

 
```
fun box neg_unsafe()
: U8 val

```
 #### Returns

 * [U8](index) val

 ### op\_and

 
```
fun box op_and(
  y: U8 val)
: U8 val

```
 #### Parameters

 * y: [U8](index) val

 #### Returns

 * [U8](index) val

 ### op\_or

 
```
fun box op_or(
  y: U8 val)
: U8 val

```
 #### Parameters

 * y: [U8](index) val

 #### Returns

 * [U8](index) val

 ### op\_xor

 
```
fun box op_xor(
  y: U8 val)
: U8 val

```
 #### Parameters

 * y: [U8](index) val

 #### Returns

 * [U8](index) val

 ### op\_not

 
```
fun box op_not()
: U8 val

```
 #### Returns

 * [U8](index) val

 ### add

 
```
fun box add(
  y: U8 val)
: U8 val

```
 #### Parameters

 * y: [U8](index) val

 #### Returns

 * [U8](index) val

 ### sub

 
```
fun box sub(
  y: U8 val)
: U8 val

```
 #### Parameters

 * y: [U8](index) val

 #### Returns

 * [U8](index) val

 ### mul

 
```
fun box mul(
  y: U8 val)
: U8 val

```
 #### Parameters

 * y: [U8](index) val

 #### Returns

 * [U8](index) val

 ### div

 
```
fun box div(
  y: U8 val)
: U8 val

```
 #### Parameters

 * y: [U8](index) val

 #### Returns

 * [U8](index) val

 ### divrem

 
```
fun box divrem(
  y: U8 val)
: (U8 val , U8 val)

```
 #### Parameters

 * y: [U8](index) val

 #### Returns

 * ([U8](index) val , [U8](index) val)

 ### rem

 
```
fun box rem(
  y: U8 val)
: U8 val

```
 #### Parameters

 * y: [U8](index) val

 #### Returns

 * [U8](index) val

 ### neg

 
```
fun box neg()
: U8 val

```
 #### Returns

 * [U8](index) val

 ### eq

 
```
fun box eq(
  y: U8 val)
: Bool val

```
 #### Parameters

 * y: [U8](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 
```
fun box ne(
  y: U8 val)
: Bool val

```
 #### Parameters

 * y: [U8](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### lt

 
```
fun box lt(
  y: U8 val)
: Bool val

```
 #### Parameters

 * y: [U8](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### le

 
```
fun box le(
  y: U8 val)
: Bool val

```
 #### Parameters

 * y: [U8](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ge

 
```
fun box ge(
  y: U8 val)
: Bool val

```
 #### Parameters

 * y: [U8](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### gt

 
```
fun box gt(
  y: U8 val)
: Bool val

```
 #### Parameters

 * y: [U8](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### hash

 
```
fun box hash()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### hash64

 
```
fun box hash64()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### i8

 
```
fun box i8()
: I8 val

```
 #### Returns

 * [I8](builtin-i8) val

 ### i16

 
```
fun box i16()
: I16 val

```
 #### Returns

 * [I16](builtin-i16) val

 ### i32

 
```
fun box i32()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### i64

 
```
fun box i64()
: I64 val

```
 #### Returns

 * [I64](builtin-i64) val

 ### i128

 
```
fun box i128()
: I128 val

```
 #### Returns

 * [I128](builtin-i128) val

 ### ilong

 
```
fun box ilong()
: ILong val

```
 #### Returns

 * [ILong](builtin-ilong) val

 ### isize

 
```
fun box isize()
: ISize val

```
 #### Returns

 * [ISize](builtin-isize) val

 ### u8

 
```
fun box u8()
: U8 val

```
 #### Returns

 * [U8](index) val

 ### u16

 
```
fun box u16()
: U16 val

```
 #### Returns

 * [U16](builtin-u16) val

 ### u32

 
```
fun box u32()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### u64

 
```
fun box u64()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### u128

 
```
fun box u128()
: U128 val

```
 #### Returns

 * [U128](builtin-u128) val

 ### ulong

 
```
fun box ulong()
: ULong val

```
 #### Returns

 * [ULong](builtin-ulong) val

 ### usize

 
```
fun box usize()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### f32

 
```
fun box f32()
: F32 val

```
 #### Returns

 * [F32](builtin-f32) val

 ### f64

 
```
fun box f64()
: F64 val

```
 #### Returns

 * [F64](builtin-f64) val

 ### i8\_unsafe

 
```
fun box i8_unsafe()
: I8 val

```
 #### Returns

 * [I8](builtin-i8) val

 ### i16\_unsafe

 
```
fun box i16_unsafe()
: I16 val

```
 #### Returns

 * [I16](builtin-i16) val

 ### i32\_unsafe

 
```
fun box i32_unsafe()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### i64\_unsafe

 
```
fun box i64_unsafe()
: I64 val

```
 #### Returns

 * [I64](builtin-i64) val

 ### i128\_unsafe

 
```
fun box i128_unsafe()
: I128 val

```
 #### Returns

 * [I128](builtin-i128) val

 ### ilong\_unsafe

 
```
fun box ilong_unsafe()
: ILong val

```
 #### Returns

 * [ILong](builtin-ilong) val

 ### isize\_unsafe

 
```
fun box isize_unsafe()
: ISize val

```
 #### Returns

 * [ISize](builtin-isize) val

 ### u8\_unsafe

 
```
fun box u8_unsafe()
: U8 val

```
 #### Returns

 * [U8](index) val

 ### u16\_unsafe

 
```
fun box u16_unsafe()
: U16 val

```
 #### Returns

 * [U16](builtin-u16) val

 ### u32\_unsafe

 
```
fun box u32_unsafe()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### u64\_unsafe

 
```
fun box u64_unsafe()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### u128\_unsafe

 
```
fun box u128_unsafe()
: U128 val

```
 #### Returns

 * [U128](builtin-u128) val

 ### ulong\_unsafe

 
```
fun box ulong_unsafe()
: ULong val

```
 #### Returns

 * [ULong](builtin-ulong) val

 ### usize\_unsafe

 
```
fun box usize_unsafe()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### f32\_unsafe

 
```
fun box f32_unsafe()
: F32 val

```
 #### Returns

 * [F32](builtin-f32) val

 ### f64\_unsafe

 
```
fun box f64_unsafe()
: F64 val

```
 #### Returns

 * [F64](builtin-f64) val

 ### compare

 
```
fun box compare(
  that: U8 val)
: (Less val | Equal val | Greater val)

```
 #### Parameters

 * that: [U8](index) val

 #### Returns

 * ([Less](builtin-less) val | [Equal](builtin-equal) val | [Greater](builtin-greater) val)



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/builtin-U8>

USize
=====

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L431)

 
```
primitive val USize is
  UnsignedInteger[USize val] val

```
 #### Implements

 * [UnsignedInteger](builtin-unsignedinteger)[[USize](index) val] val

 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L432)

 
```
new val create(
  value: USize val)
: USize val^

```
 #### Parameters

 * value: [USize](index) val

 #### Returns

 * [USize](index) val^

 ### from[A: (([I8](builtin-i8) val | [I16](builtin-i16) val | [I32](builtin-i32) val | [I64](builtin-i64) val | [I128](builtin-i128) val | [ILong](builtin-ilong) val | [ISize](builtin-isize) val | [U8](builtin-u8) val | [U16](builtin-u16) val | [U32](builtin-u32) val | [U64](builtin-u64) val | [U128](builtin-u128) val | [ULong](builtin-ulong) val | [USize](index) val | [F32](builtin-f32) val | [F64](builtin-f64) val) & [Real](builtin-real)[A] val)]

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L433)

 
```
new val from[A: ((I8 val | I16 val | I32 val | 
    I64 val | I128 val | ILong val | 
    ISize val | U8 val | U16 val | 
    U32 val | U64 val | U128 val | 
    ULong val | USize val | F32 val | 
    F64 val) & Real[A] val)](
  a: A)
: USize val^

```
 #### Parameters

 * a: A

 #### Returns

 * [USize](index) val^

 ### min\_value

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L435)

 
```
new val min_value()
: USize val^

```
 #### Returns

 * [USize](index) val^

 ### max\_value

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L437)

 
```
new val max_value()
: USize val^

```
 #### Returns

 * [USize](index) val^

 Public Functions
----------------

 ### next\_pow2

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L444)

 
```
fun box next_pow2()
: USize val

```
 #### Returns

 * [USize](index) val

 ### abs

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L448)

 
```
fun box abs()
: USize val

```
 #### Returns

 * [USize](index) val

 ### bit\_reverse

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L450)

 
```
fun box bit_reverse()
: USize val

```
 #### Returns

 * [USize](index) val

 ### bswap

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L457)

 
```
fun box bswap()
: USize val

```
 #### Returns

 * [USize](index) val

 ### popcount

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L464)

 
```
fun box popcount()
: USize val

```
 #### Returns

 * [USize](index) val

 ### clz

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L471)

 
```
fun box clz()
: USize val

```
 #### Returns

 * [USize](index) val

 ### ctz

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L478)

 
```
fun box ctz()
: USize val

```
 #### Returns

 * [USize](index) val

 ### clz\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L485)

 Unsafe operation. If this is 0, the result is undefined.

 
```
fun box clz_unsafe()
: USize val

```
 #### Returns

 * [USize](index) val

 ### ctz\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L496)

 Unsafe operation. If this is 0, the result is undefined.

 
```
fun box ctz_unsafe()
: USize val

```
 #### Returns

 * [USize](index) val

 ### bitwidth

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L507)

 
```
fun box bitwidth()
: USize val

```
 #### Returns

 * [USize](index) val

 ### bytewidth

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L509)

 
```
fun box bytewidth()
: USize val

```
 #### Returns

 * [USize](index) val

 ### min

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L511)

 
```
fun box min(
  y: USize val)
: USize val

```
 #### Parameters

 * y: [USize](index) val

 #### Returns

 * [USize](index) val

 ### max

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L512)

 
```
fun box max(
  y: USize val)
: USize val

```
 #### Parameters

 * y: [USize](index) val

 #### Returns

 * [USize](index) val

 ### addc

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L514)

 
```
fun box addc(
  y: USize val)
: (USize val , Bool val)

```
 #### Parameters

 * y: [USize](index) val

 #### Returns

 * ([USize](index) val , [Bool](builtin-bool) val)

 ### subc

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L521)

 
```
fun box subc(
  y: USize val)
: (USize val , Bool val)

```
 #### Parameters

 * y: [USize](index) val

 #### Returns

 * ([USize](index) val , [Bool](builtin-bool) val)

 ### mulc

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L528)

 
```
fun box mulc(
  y: USize val)
: (USize val , Bool val)

```
 #### Parameters

 * y: [USize](index) val

 #### Returns

 * ([USize](index) val , [Bool](builtin-bool) val)

 ### divc

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L535)

 
```
fun box divc(
  y: USize val)
: (USize val , Bool val)

```
 #### Parameters

 * y: [USize](index) val

 #### Returns

 * ([USize](index) val , [Bool](builtin-bool) val)

 ### remc

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L538)

 
```
fun box remc(
  y: USize val)
: (USize val , Bool val)

```
 #### Parameters

 * y: [USize](index) val

 #### Returns

 * ([USize](index) val , [Bool](builtin-bool) val)

 ### add\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L541)

 
```
fun box add_partial(
  y: USize val)
: USize val ?

```
 #### Parameters

 * y: [USize](index) val

 #### Returns

 * [USize](index) val ?

 ### sub\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L544)

 
```
fun box sub_partial(
  y: USize val)
: USize val ?

```
 #### Parameters

 * y: [USize](index) val

 #### Returns

 * [USize](index) val ?

 ### mul\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L547)

 
```
fun box mul_partial(
  y: USize val)
: USize val ?

```
 #### Parameters

 * y: [USize](index) val

 #### Returns

 * [USize](index) val ?

 ### div\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L550)

 
```
fun box div_partial(
  y: USize val)
: USize val ?

```
 #### Parameters

 * y: [USize](index) val

 #### Returns

 * [USize](index) val ?

 ### rem\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L553)

 
```
fun box rem_partial(
  y: USize val)
: USize val ?

```
 #### Parameters

 * y: [USize](index) val

 #### Returns

 * [USize](index) val ?

 ### divrem\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L556)

 
```
fun box divrem_partial(
  y: USize val)
: (USize val , USize val) ?

```
 #### Parameters

 * y: [USize](index) val

 #### Returns

 * ([USize](index) val , [USize](index) val) ?

 ### shl

 
```
fun box shl(
  y: USize val)
: USize val

```
 #### Parameters

 * y: [USize](index) val

 #### Returns

 * [USize](index) val

 ### shr

 
```
fun box shr(
  y: USize val)
: USize val

```
 #### Parameters

 * y: [USize](index) val

 #### Returns

 * [USize](index) val

 ### fld

 
```
fun box fld(
  y: USize val)
: USize val

```
 #### Parameters

 * y: [USize](index) val

 #### Returns

 * [USize](index) val

 ### fldc

 
```
fun box fldc(
  y: USize val)
: (USize val , Bool val)

```
 #### Parameters

 * y: [USize](index) val

 #### Returns

 * ([USize](index) val , [Bool](builtin-bool) val)

 ### fld\_partial

 
```
fun box fld_partial(
  y: USize val)
: USize val ?

```
 #### Parameters

 * y: [USize](index) val

 #### Returns

 * [USize](index) val ?

 ### fld\_unsafe

 
```
fun box fld_unsafe(
  y: USize val)
: USize val

```
 #### Parameters

 * y: [USize](index) val

 #### Returns

 * [USize](index) val

 ### mod

 
```
fun box mod(
  y: USize val)
: USize val

```
 #### Parameters

 * y: [USize](index) val

 #### Returns

 * [USize](index) val

 ### modc

 
```
fun box modc(
  y: USize val)
: (USize val , Bool val)

```
 #### Parameters

 * y: [USize](index) val

 #### Returns

 * ([USize](index) val , [Bool](builtin-bool) val)

 ### mod\_partial

 
```
fun box mod_partial(
  y: USize val)
: USize val ?

```
 #### Parameters

 * y: [USize](index) val

 #### Returns

 * [USize](index) val ?

 ### mod\_unsafe

 
```
fun box mod_unsafe(
  y: USize val)
: USize val

```
 #### Parameters

 * y: [USize](index) val

 #### Returns

 * [USize](index) val

 ### shl\_unsafe

 
```
fun box shl_unsafe(
  y: USize val)
: USize val

```
 #### Parameters

 * y: [USize](index) val

 #### Returns

 * [USize](index) val

 ### shr\_unsafe

 
```
fun box shr_unsafe(
  y: USize val)
: USize val

```
 #### Parameters

 * y: [USize](index) val

 #### Returns

 * [USize](index) val

 ### rotl

 
```
fun box rotl(
  y: USize val)
: USize val

```
 #### Parameters

 * y: [USize](index) val

 #### Returns

 * [USize](index) val

 ### rotr

 
```
fun box rotr(
  y: USize val)
: USize val

```
 #### Parameters

 * y: [USize](index) val

 #### Returns

 * [USize](index) val

 ### string

 
```
fun box string()
: String iso^

```
 #### Returns

 * [String](builtin-string) iso^

 ### add\_unsafe

 
```
fun box add_unsafe(
  y: USize val)
: USize val

```
 #### Parameters

 * y: [USize](index) val

 #### Returns

 * [USize](index) val

 ### sub\_unsafe

 
```
fun box sub_unsafe(
  y: USize val)
: USize val

```
 #### Parameters

 * y: [USize](index) val

 #### Returns

 * [USize](index) val

 ### mul\_unsafe

 
```
fun box mul_unsafe(
  y: USize val)
: USize val

```
 #### Parameters

 * y: [USize](index) val

 #### Returns

 * [USize](index) val

 ### div\_unsafe

 
```
fun box div_unsafe(
  y: USize val)
: USize val

```
 #### Parameters

 * y: [USize](index) val

 #### Returns

 * [USize](index) val

 ### divrem\_unsafe

 
```
fun box divrem_unsafe(
  y: USize val)
: (USize val , USize val)

```
 #### Parameters

 * y: [USize](index) val

 #### Returns

 * ([USize](index) val , [USize](index) val)

 ### rem\_unsafe

 
```
fun box rem_unsafe(
  y: USize val)
: USize val

```
 #### Parameters

 * y: [USize](index) val

 #### Returns

 * [USize](index) val

 ### neg\_unsafe

 
```
fun box neg_unsafe()
: USize val

```
 #### Returns

 * [USize](index) val

 ### op\_and

 
```
fun box op_and(
  y: USize val)
: USize val

```
 #### Parameters

 * y: [USize](index) val

 #### Returns

 * [USize](index) val

 ### op\_or

 
```
fun box op_or(
  y: USize val)
: USize val

```
 #### Parameters

 * y: [USize](index) val

 #### Returns

 * [USize](index) val

 ### op\_xor

 
```
fun box op_xor(
  y: USize val)
: USize val

```
 #### Parameters

 * y: [USize](index) val

 #### Returns

 * [USize](index) val

 ### op\_not

 
```
fun box op_not()
: USize val

```
 #### Returns

 * [USize](index) val

 ### add

 
```
fun box add(
  y: USize val)
: USize val

```
 #### Parameters

 * y: [USize](index) val

 #### Returns

 * [USize](index) val

 ### sub

 
```
fun box sub(
  y: USize val)
: USize val

```
 #### Parameters

 * y: [USize](index) val

 #### Returns

 * [USize](index) val

 ### mul

 
```
fun box mul(
  y: USize val)
: USize val

```
 #### Parameters

 * y: [USize](index) val

 #### Returns

 * [USize](index) val

 ### div

 
```
fun box div(
  y: USize val)
: USize val

```
 #### Parameters

 * y: [USize](index) val

 #### Returns

 * [USize](index) val

 ### divrem

 
```
fun box divrem(
  y: USize val)
: (USize val , USize val)

```
 #### Parameters

 * y: [USize](index) val

 #### Returns

 * ([USize](index) val , [USize](index) val)

 ### rem

 
```
fun box rem(
  y: USize val)
: USize val

```
 #### Parameters

 * y: [USize](index) val

 #### Returns

 * [USize](index) val

 ### neg

 
```
fun box neg()
: USize val

```
 #### Returns

 * [USize](index) val

 ### eq

 
```
fun box eq(
  y: USize val)
: Bool val

```
 #### Parameters

 * y: [USize](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 
```
fun box ne(
  y: USize val)
: Bool val

```
 #### Parameters

 * y: [USize](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### lt

 
```
fun box lt(
  y: USize val)
: Bool val

```
 #### Parameters

 * y: [USize](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### le

 
```
fun box le(
  y: USize val)
: Bool val

```
 #### Parameters

 * y: [USize](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ge

 
```
fun box ge(
  y: USize val)
: Bool val

```
 #### Parameters

 * y: [USize](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### gt

 
```
fun box gt(
  y: USize val)
: Bool val

```
 #### Parameters

 * y: [USize](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### hash

 
```
fun box hash()
: USize val

```
 #### Returns

 * [USize](index) val

 ### hash64

 
```
fun box hash64()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### i8

 
```
fun box i8()
: I8 val

```
 #### Returns

 * [I8](builtin-i8) val

 ### i16

 
```
fun box i16()
: I16 val

```
 #### Returns

 * [I16](builtin-i16) val

 ### i32

 
```
fun box i32()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### i64

 
```
fun box i64()
: I64 val

```
 #### Returns

 * [I64](builtin-i64) val

 ### i128

 
```
fun box i128()
: I128 val

```
 #### Returns

 * [I128](builtin-i128) val

 ### ilong

 
```
fun box ilong()
: ILong val

```
 #### Returns

 * [ILong](builtin-ilong) val

 ### isize

 
```
fun box isize()
: ISize val

```
 #### Returns

 * [ISize](builtin-isize) val

 ### u8

 
```
fun box u8()
: U8 val

```
 #### Returns

 * [U8](builtin-u8) val

 ### u16

 
```
fun box u16()
: U16 val

```
 #### Returns

 * [U16](builtin-u16) val

 ### u32

 
```
fun box u32()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### u64

 
```
fun box u64()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### u128

 
```
fun box u128()
: U128 val

```
 #### Returns

 * [U128](builtin-u128) val

 ### ulong

 
```
fun box ulong()
: ULong val

```
 #### Returns

 * [ULong](builtin-ulong) val

 ### usize

 
```
fun box usize()
: USize val

```
 #### Returns

 * [USize](index) val

 ### f32

 
```
fun box f32()
: F32 val

```
 #### Returns

 * [F32](builtin-f32) val

 ### f64

 
```
fun box f64()
: F64 val

```
 #### Returns

 * [F64](builtin-f64) val

 ### i8\_unsafe

 
```
fun box i8_unsafe()
: I8 val

```
 #### Returns

 * [I8](builtin-i8) val

 ### i16\_unsafe

 
```
fun box i16_unsafe()
: I16 val

```
 #### Returns

 * [I16](builtin-i16) val

 ### i32\_unsafe

 
```
fun box i32_unsafe()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### i64\_unsafe

 
```
fun box i64_unsafe()
: I64 val

```
 #### Returns

 * [I64](builtin-i64) val

 ### i128\_unsafe

 
```
fun box i128_unsafe()
: I128 val

```
 #### Returns

 * [I128](builtin-i128) val

 ### ilong\_unsafe

 
```
fun box ilong_unsafe()
: ILong val

```
 #### Returns

 * [ILong](builtin-ilong) val

 ### isize\_unsafe

 
```
fun box isize_unsafe()
: ISize val

```
 #### Returns

 * [ISize](builtin-isize) val

 ### u8\_unsafe

 
```
fun box u8_unsafe()
: U8 val

```
 #### Returns

 * [U8](builtin-u8) val

 ### u16\_unsafe

 
```
fun box u16_unsafe()
: U16 val

```
 #### Returns

 * [U16](builtin-u16) val

 ### u32\_unsafe

 
```
fun box u32_unsafe()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### u64\_unsafe

 
```
fun box u64_unsafe()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### u128\_unsafe

 
```
fun box u128_unsafe()
: U128 val

```
 #### Returns

 * [U128](builtin-u128) val

 ### ulong\_unsafe

 
```
fun box ulong_unsafe()
: ULong val

```
 #### Returns

 * [ULong](builtin-ulong) val

 ### usize\_unsafe

 
```
fun box usize_unsafe()
: USize val

```
 #### Returns

 * [USize](index) val

 ### f32\_unsafe

 
```
fun box f32_unsafe()
: F32 val

```
 #### Returns

 * [F32](builtin-f32) val

 ### f64\_unsafe

 
```
fun box f64_unsafe()
: F64 val

```
 #### Returns

 * [F64](builtin-f64) val

 ### compare

 
```
fun box compare(
  that: USize val)
: (Less val | Equal val | Greater val)

```
 #### Parameters

 * that: [USize](index) val

 #### Returns

 * ([Less](builtin-less) val | [Equal](builtin-equal) val | [Greater](builtin-greater) val)



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/builtin-USize>

InputStream
===========

 [[Source]](https://stdlib.ponylang.io/src/builtin/stdin/#L27)

 Asynchronous access to some input stream.

 
```
interface tag InputStream

```
 Public Behaviours
-----------------

 ### apply

 [[Source]](https://stdlib.ponylang.io/src/builtin/stdin/#L31)

 Set the notifier. Optionally, also sets the chunk size, dictating the maximum number of bytes of each chunk that will be passed to the notifier.

 
```
be apply(
  notify: (InputNotify iso | None val),
  chunk_size: USize val = 32)

```
 #### Parameters

 * notify: ([InputNotify](builtin-inputnotify) iso | [None](builtin-none) val)
* chunk\_size: [USize](builtin-usize) val = 32

 ### dispose

 [[Source]](https://stdlib.ponylang.io/src/builtin/stdin/#L37)

 Clear the notifier in order to shut down input.

 
```
be dispose()

```


 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/builtin-InputStream>

U32
===

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L145)

 
```
primitive val U32 is
  UnsignedInteger[U32 val] val

```
 #### Implements

 * [UnsignedInteger](builtin-unsignedinteger)[[U32](index) val] val

 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L146)

 
```
new val create(
  value: U32 val)
: U32 val^

```
 #### Parameters

 * value: [U32](index) val

 #### Returns

 * [U32](index) val^

 ### from[A: (([I8](builtin-i8) val | [I16](builtin-i16) val | [I32](builtin-i32) val | [I64](builtin-i64) val | [I128](builtin-i128) val | [ILong](builtin-ilong) val | [ISize](builtin-isize) val | [U8](builtin-u8) val | [U16](builtin-u16) val | [U32](index) val | [U64](builtin-u64) val | [U128](builtin-u128) val | [ULong](builtin-ulong) val | [USize](builtin-usize) val | [F32](builtin-f32) val | [F64](builtin-f64) val) & [Real](builtin-real)[A] val)]

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L147)

 
```
new val from[A: ((I8 val | I16 val | I32 val | 
    I64 val | I128 val | ILong val | 
    ISize val | U8 val | U16 val | 
    U32 val | U64 val | U128 val | 
    ULong val | USize val | F32 val | 
    F64 val) & Real[A] val)](
  a: A)
: U32 val^

```
 #### Parameters

 * a: A

 #### Returns

 * [U32](index) val^

 ### min\_value

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L149)

 
```
new val min_value()
: U32 val^

```
 #### Returns

 * [U32](index) val^

 ### max\_value

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L150)

 
```
new val max_value()
: U32 val^

```
 #### Returns

 * [U32](index) val^

 Public Functions
----------------

 ### next\_pow2

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L152)

 
```
fun box next_pow2()
: U32 val

```
 #### Returns

 * [U32](index) val

 ### abs

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L156)

 
```
fun box abs()
: U32 val

```
 #### Returns

 * [U32](index) val

 ### bit\_reverse

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L157)

 
```
fun box bit_reverse()
: U32 val

```
 #### Returns

 * [U32](index) val

 ### bswap

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L158)

 
```
fun box bswap()
: U32 val

```
 #### Returns

 * [U32](index) val

 ### popcount

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L159)

 
```
fun box popcount()
: U32 val

```
 #### Returns

 * [U32](index) val

 ### clz

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L160)

 
```
fun box clz()
: U32 val

```
 #### Returns

 * [U32](index) val

 ### ctz

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L161)

 
```
fun box ctz()
: U32 val

```
 #### Returns

 * [U32](index) val

 ### clz\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L163)

 Unsafe operation. If this is 0, the result is undefined.

 
```
fun box clz_unsafe()
: U32 val

```
 #### Returns

 * [U32](index) val

 ### ctz\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L170)

 Unsafe operation. If this is 0, the result is undefined.

 
```
fun box ctz_unsafe()
: U32 val

```
 #### Returns

 * [U32](index) val

 ### bitwidth

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L177)

 
```
fun box bitwidth()
: U32 val

```
 #### Returns

 * [U32](index) val

 ### bytewidth

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L179)

 
```
fun box bytewidth()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### min

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L181)

 
```
fun box min(
  y: U32 val)
: U32 val

```
 #### Parameters

 * y: [U32](index) val

 #### Returns

 * [U32](index) val

 ### max

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L182)

 
```
fun box max(
  y: U32 val)
: U32 val

```
 #### Parameters

 * y: [U32](index) val

 #### Returns

 * [U32](index) val

 ### addc

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L184)

 
```
fun box addc(
  y: U32 val)
: (U32 val , Bool val)

```
 #### Parameters

 * y: [U32](index) val

 #### Returns

 * ([U32](index) val , [Bool](builtin-bool) val)

 ### subc

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L187)

 
```
fun box subc(
  y: U32 val)
: (U32 val , Bool val)

```
 #### Parameters

 * y: [U32](index) val

 #### Returns

 * ([U32](index) val , [Bool](builtin-bool) val)

 ### mulc

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L190)

 
```
fun box mulc(
  y: U32 val)
: (U32 val , Bool val)

```
 #### Parameters

 * y: [U32](index) val

 #### Returns

 * ([U32](index) val , [Bool](builtin-bool) val)

 ### divc

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L193)

 
```
fun box divc(
  y: U32 val)
: (U32 val , Bool val)

```
 #### Parameters

 * y: [U32](index) val

 #### Returns

 * ([U32](index) val , [Bool](builtin-bool) val)

 ### remc

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L196)

 
```
fun box remc(
  y: U32 val)
: (U32 val , Bool val)

```
 #### Parameters

 * y: [U32](index) val

 #### Returns

 * ([U32](index) val , [Bool](builtin-bool) val)

 ### add\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L199)

 
```
fun box add_partial(
  y: U32 val)
: U32 val ?

```
 #### Parameters

 * y: [U32](index) val

 #### Returns

 * [U32](index) val ?

 ### sub\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L202)

 
```
fun box sub_partial(
  y: U32 val)
: U32 val ?

```
 #### Parameters

 * y: [U32](index) val

 #### Returns

 * [U32](index) val ?

 ### mul\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L205)

 
```
fun box mul_partial(
  y: U32 val)
: U32 val ?

```
 #### Parameters

 * y: [U32](index) val

 #### Returns

 * [U32](index) val ?

 ### div\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L208)

 
```
fun box div_partial(
  y: U32 val)
: U32 val ?

```
 #### Parameters

 * y: [U32](index) val

 #### Returns

 * [U32](index) val ?

 ### rem\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L211)

 
```
fun box rem_partial(
  y: U32 val)
: U32 val ?

```
 #### Parameters

 * y: [U32](index) val

 #### Returns

 * [U32](index) val ?

 ### divrem\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L214)

 
```
fun box divrem_partial(
  y: U32 val)
: (U32 val , U32 val) ?

```
 #### Parameters

 * y: [U32](index) val

 #### Returns

 * ([U32](index) val , [U32](index) val) ?

 ### shl

 
```
fun box shl(
  y: U32 val)
: U32 val

```
 #### Parameters

 * y: [U32](index) val

 #### Returns

 * [U32](index) val

 ### shr

 
```
fun box shr(
  y: U32 val)
: U32 val

```
 #### Parameters

 * y: [U32](index) val

 #### Returns

 * [U32](index) val

 ### fld

 
```
fun box fld(
  y: U32 val)
: U32 val

```
 #### Parameters

 * y: [U32](index) val

 #### Returns

 * [U32](index) val

 ### fldc

 
```
fun box fldc(
  y: U32 val)
: (U32 val , Bool val)

```
 #### Parameters

 * y: [U32](index) val

 #### Returns

 * ([U32](index) val , [Bool](builtin-bool) val)

 ### fld\_partial

 
```
fun box fld_partial(
  y: U32 val)
: U32 val ?

```
 #### Parameters

 * y: [U32](index) val

 #### Returns

 * [U32](index) val ?

 ### fld\_unsafe

 
```
fun box fld_unsafe(
  y: U32 val)
: U32 val

```
 #### Parameters

 * y: [U32](index) val

 #### Returns

 * [U32](index) val

 ### mod

 
```
fun box mod(
  y: U32 val)
: U32 val

```
 #### Parameters

 * y: [U32](index) val

 #### Returns

 * [U32](index) val

 ### modc

 
```
fun box modc(
  y: U32 val)
: (U32 val , Bool val)

```
 #### Parameters

 * y: [U32](index) val

 #### Returns

 * ([U32](index) val , [Bool](builtin-bool) val)

 ### mod\_partial

 
```
fun box mod_partial(
  y: U32 val)
: U32 val ?

```
 #### Parameters

 * y: [U32](index) val

 #### Returns

 * [U32](index) val ?

 ### mod\_unsafe

 
```
fun box mod_unsafe(
  y: U32 val)
: U32 val

```
 #### Parameters

 * y: [U32](index) val

 #### Returns

 * [U32](index) val

 ### shl\_unsafe

 
```
fun box shl_unsafe(
  y: U32 val)
: U32 val

```
 #### Parameters

 * y: [U32](index) val

 #### Returns

 * [U32](index) val

 ### shr\_unsafe

 
```
fun box shr_unsafe(
  y: U32 val)
: U32 val

```
 #### Parameters

 * y: [U32](index) val

 #### Returns

 * [U32](index) val

 ### rotl

 
```
fun box rotl(
  y: U32 val)
: U32 val

```
 #### Parameters

 * y: [U32](index) val

 #### Returns

 * [U32](index) val

 ### rotr

 
```
fun box rotr(
  y: U32 val)
: U32 val

```
 #### Parameters

 * y: [U32](index) val

 #### Returns

 * [U32](index) val

 ### string

 
```
fun box string()
: String iso^

```
 #### Returns

 * [String](builtin-string) iso^

 ### add\_unsafe

 
```
fun box add_unsafe(
  y: U32 val)
: U32 val

```
 #### Parameters

 * y: [U32](index) val

 #### Returns

 * [U32](index) val

 ### sub\_unsafe

 
```
fun box sub_unsafe(
  y: U32 val)
: U32 val

```
 #### Parameters

 * y: [U32](index) val

 #### Returns

 * [U32](index) val

 ### mul\_unsafe

 
```
fun box mul_unsafe(
  y: U32 val)
: U32 val

```
 #### Parameters

 * y: [U32](index) val

 #### Returns

 * [U32](index) val

 ### div\_unsafe

 
```
fun box div_unsafe(
  y: U32 val)
: U32 val

```
 #### Parameters

 * y: [U32](index) val

 #### Returns

 * [U32](index) val

 ### divrem\_unsafe

 
```
fun box divrem_unsafe(
  y: U32 val)
: (U32 val , U32 val)

```
 #### Parameters

 * y: [U32](index) val

 #### Returns

 * ([U32](index) val , [U32](index) val)

 ### rem\_unsafe

 
```
fun box rem_unsafe(
  y: U32 val)
: U32 val

```
 #### Parameters

 * y: [U32](index) val

 #### Returns

 * [U32](index) val

 ### neg\_unsafe

 
```
fun box neg_unsafe()
: U32 val

```
 #### Returns

 * [U32](index) val

 ### op\_and

 
```
fun box op_and(
  y: U32 val)
: U32 val

```
 #### Parameters

 * y: [U32](index) val

 #### Returns

 * [U32](index) val

 ### op\_or

 
```
fun box op_or(
  y: U32 val)
: U32 val

```
 #### Parameters

 * y: [U32](index) val

 #### Returns

 * [U32](index) val

 ### op\_xor

 
```
fun box op_xor(
  y: U32 val)
: U32 val

```
 #### Parameters

 * y: [U32](index) val

 #### Returns

 * [U32](index) val

 ### op\_not

 
```
fun box op_not()
: U32 val

```
 #### Returns

 * [U32](index) val

 ### add

 
```
fun box add(
  y: U32 val)
: U32 val

```
 #### Parameters

 * y: [U32](index) val

 #### Returns

 * [U32](index) val

 ### sub

 
```
fun box sub(
  y: U32 val)
: U32 val

```
 #### Parameters

 * y: [U32](index) val

 #### Returns

 * [U32](index) val

 ### mul

 
```
fun box mul(
  y: U32 val)
: U32 val

```
 #### Parameters

 * y: [U32](index) val

 #### Returns

 * [U32](index) val

 ### div

 
```
fun box div(
  y: U32 val)
: U32 val

```
 #### Parameters

 * y: [U32](index) val

 #### Returns

 * [U32](index) val

 ### divrem

 
```
fun box divrem(
  y: U32 val)
: (U32 val , U32 val)

```
 #### Parameters

 * y: [U32](index) val

 #### Returns

 * ([U32](index) val , [U32](index) val)

 ### rem

 
```
fun box rem(
  y: U32 val)
: U32 val

```
 #### Parameters

 * y: [U32](index) val

 #### Returns

 * [U32](index) val

 ### neg

 
```
fun box neg()
: U32 val

```
 #### Returns

 * [U32](index) val

 ### eq

 
```
fun box eq(
  y: U32 val)
: Bool val

```
 #### Parameters

 * y: [U32](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 
```
fun box ne(
  y: U32 val)
: Bool val

```
 #### Parameters

 * y: [U32](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### lt

 
```
fun box lt(
  y: U32 val)
: Bool val

```
 #### Parameters

 * y: [U32](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### le

 
```
fun box le(
  y: U32 val)
: Bool val

```
 #### Parameters

 * y: [U32](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ge

 
```
fun box ge(
  y: U32 val)
: Bool val

```
 #### Parameters

 * y: [U32](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### gt

 
```
fun box gt(
  y: U32 val)
: Bool val

```
 #### Parameters

 * y: [U32](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### hash

 
```
fun box hash()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### hash64

 
```
fun box hash64()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### i8

 
```
fun box i8()
: I8 val

```
 #### Returns

 * [I8](builtin-i8) val

 ### i16

 
```
fun box i16()
: I16 val

```
 #### Returns

 * [I16](builtin-i16) val

 ### i32

 
```
fun box i32()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### i64

 
```
fun box i64()
: I64 val

```
 #### Returns

 * [I64](builtin-i64) val

 ### i128

 
```
fun box i128()
: I128 val

```
 #### Returns

 * [I128](builtin-i128) val

 ### ilong

 
```
fun box ilong()
: ILong val

```
 #### Returns

 * [ILong](builtin-ilong) val

 ### isize

 
```
fun box isize()
: ISize val

```
 #### Returns

 * [ISize](builtin-isize) val

 ### u8

 
```
fun box u8()
: U8 val

```
 #### Returns

 * [U8](builtin-u8) val

 ### u16

 
```
fun box u16()
: U16 val

```
 #### Returns

 * [U16](builtin-u16) val

 ### u32

 
```
fun box u32()
: U32 val

```
 #### Returns

 * [U32](index) val

 ### u64

 
```
fun box u64()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### u128

 
```
fun box u128()
: U128 val

```
 #### Returns

 * [U128](builtin-u128) val

 ### ulong

 
```
fun box ulong()
: ULong val

```
 #### Returns

 * [ULong](builtin-ulong) val

 ### usize

 
```
fun box usize()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### f32

 
```
fun box f32()
: F32 val

```
 #### Returns

 * [F32](builtin-f32) val

 ### f64

 
```
fun box f64()
: F64 val

```
 #### Returns

 * [F64](builtin-f64) val

 ### i8\_unsafe

 
```
fun box i8_unsafe()
: I8 val

```
 #### Returns

 * [I8](builtin-i8) val

 ### i16\_unsafe

 
```
fun box i16_unsafe()
: I16 val

```
 #### Returns

 * [I16](builtin-i16) val

 ### i32\_unsafe

 
```
fun box i32_unsafe()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### i64\_unsafe

 
```
fun box i64_unsafe()
: I64 val

```
 #### Returns

 * [I64](builtin-i64) val

 ### i128\_unsafe

 
```
fun box i128_unsafe()
: I128 val

```
 #### Returns

 * [I128](builtin-i128) val

 ### ilong\_unsafe

 
```
fun box ilong_unsafe()
: ILong val

```
 #### Returns

 * [ILong](builtin-ilong) val

 ### isize\_unsafe

 
```
fun box isize_unsafe()
: ISize val

```
 #### Returns

 * [ISize](builtin-isize) val

 ### u8\_unsafe

 
```
fun box u8_unsafe()
: U8 val

```
 #### Returns

 * [U8](builtin-u8) val

 ### u16\_unsafe

 
```
fun box u16_unsafe()
: U16 val

```
 #### Returns

 * [U16](builtin-u16) val

 ### u32\_unsafe

 
```
fun box u32_unsafe()
: U32 val

```
 #### Returns

 * [U32](index) val

 ### u64\_unsafe

 
```
fun box u64_unsafe()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### u128\_unsafe

 
```
fun box u128_unsafe()
: U128 val

```
 #### Returns

 * [U128](builtin-u128) val

 ### ulong\_unsafe

 
```
fun box ulong_unsafe()
: ULong val

```
 #### Returns

 * [ULong](builtin-ulong) val

 ### usize\_unsafe

 
```
fun box usize_unsafe()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### f32\_unsafe

 
```
fun box f32_unsafe()
: F32 val

```
 #### Returns

 * [F32](builtin-f32) val

 ### f64\_unsafe

 
```
fun box f64_unsafe()
: F64 val

```
 #### Returns

 * [F64](builtin-f64) val

 ### compare

 
```
fun box compare(
  that: U32 val)
: (Less val | Equal val | Greater val)

```
 #### Parameters

 * that: [U32](index) val

 #### Returns

 * ([Less](builtin-less) val | [Equal](builtin-equal) val | [Greater](builtin-greater) val)



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/builtin-U32>

U64
===

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L217)

 
```
primitive val U64 is
  UnsignedInteger[U64 val] val

```
 #### Implements

 * [UnsignedInteger](builtin-unsignedinteger)[[U64](index) val] val

 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L218)

 
```
new val create(
  value: U64 val)
: U64 val^

```
 #### Parameters

 * value: [U64](index) val

 #### Returns

 * [U64](index) val^

 ### from[A: (([I8](builtin-i8) val | [I16](builtin-i16) val | [I32](builtin-i32) val | [I64](builtin-i64) val | [I128](builtin-i128) val | [ILong](builtin-ilong) val | [ISize](builtin-isize) val | [U8](builtin-u8) val | [U16](builtin-u16) val | [U32](builtin-u32) val | [U64](index) val | [U128](builtin-u128) val | [ULong](builtin-ulong) val | [USize](builtin-usize) val | [F32](builtin-f32) val | [F64](builtin-f64) val) & [Real](builtin-real)[A] val)]

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L219)

 
```
new val from[A: ((I8 val | I16 val | I32 val | 
    I64 val | I128 val | ILong val | 
    ISize val | U8 val | U16 val | 
    U32 val | U64 val | U128 val | 
    ULong val | USize val | F32 val | 
    F64 val) & Real[A] val)](
  a: A)
: U64 val^

```
 #### Parameters

 * a: A

 #### Returns

 * [U64](index) val^

 ### min\_value

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L221)

 
```
new val min_value()
: U64 val^

```
 #### Returns

 * [U64](index) val^

 ### max\_value

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L222)

 
```
new val max_value()
: U64 val^

```
 #### Returns

 * [U64](index) val^

 Public Functions
----------------

 ### next\_pow2

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L224)

 
```
fun box next_pow2()
: U64 val

```
 #### Returns

 * [U64](index) val

 ### abs

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L228)

 
```
fun box abs()
: U64 val

```
 #### Returns

 * [U64](index) val

 ### bit\_reverse

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L229)

 
```
fun box bit_reverse()
: U64 val

```
 #### Returns

 * [U64](index) val

 ### bswap

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L230)

 
```
fun box bswap()
: U64 val

```
 #### Returns

 * [U64](index) val

 ### popcount

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L231)

 
```
fun box popcount()
: U64 val

```
 #### Returns

 * [U64](index) val

 ### clz

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L232)

 
```
fun box clz()
: U64 val

```
 #### Returns

 * [U64](index) val

 ### ctz

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L233)

 
```
fun box ctz()
: U64 val

```
 #### Returns

 * [U64](index) val

 ### clz\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L235)

 Unsafe operation. If this is 0, the result is undefined.

 
```
fun box clz_unsafe()
: U64 val

```
 #### Returns

 * [U64](index) val

 ### ctz\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L242)

 Unsafe operation. If this is 0, the result is undefined.

 
```
fun box ctz_unsafe()
: U64 val

```
 #### Returns

 * [U64](index) val

 ### bitwidth

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L249)

 
```
fun box bitwidth()
: U64 val

```
 #### Returns

 * [U64](index) val

 ### bytewidth

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L251)

 
```
fun box bytewidth()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### min

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L253)

 
```
fun box min(
  y: U64 val)
: U64 val

```
 #### Parameters

 * y: [U64](index) val

 #### Returns

 * [U64](index) val

 ### max

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L254)

 
```
fun box max(
  y: U64 val)
: U64 val

```
 #### Parameters

 * y: [U64](index) val

 #### Returns

 * [U64](index) val

 ### hash

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L256)

 
```
fun box hash()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### addc

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L263)

 
```
fun box addc(
  y: U64 val)
: (U64 val , Bool val)

```
 #### Parameters

 * y: [U64](index) val

 #### Returns

 * ([U64](index) val , [Bool](builtin-bool) val)

 ### subc

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L266)

 
```
fun box subc(
  y: U64 val)
: (U64 val , Bool val)

```
 #### Parameters

 * y: [U64](index) val

 #### Returns

 * ([U64](index) val , [Bool](builtin-bool) val)

 ### mulc

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L269)

 
```
fun box mulc(
  y: U64 val)
: (U64 val , Bool val)

```
 #### Parameters

 * y: [U64](index) val

 #### Returns

 * ([U64](index) val , [Bool](builtin-bool) val)

 ### divc

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L272)

 
```
fun box divc(
  y: U64 val)
: (U64 val , Bool val)

```
 #### Parameters

 * y: [U64](index) val

 #### Returns

 * ([U64](index) val , [Bool](builtin-bool) val)

 ### remc

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L275)

 
```
fun box remc(
  y: U64 val)
: (U64 val , Bool val)

```
 #### Parameters

 * y: [U64](index) val

 #### Returns

 * ([U64](index) val , [Bool](builtin-bool) val)

 ### add\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L278)

 
```
fun box add_partial(
  y: U64 val)
: U64 val ?

```
 #### Parameters

 * y: [U64](index) val

 #### Returns

 * [U64](index) val ?

 ### sub\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L281)

 
```
fun box sub_partial(
  y: U64 val)
: U64 val ?

```
 #### Parameters

 * y: [U64](index) val

 #### Returns

 * [U64](index) val ?

 ### mul\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L284)

 
```
fun box mul_partial(
  y: U64 val)
: U64 val ?

```
 #### Parameters

 * y: [U64](index) val

 #### Returns

 * [U64](index) val ?

 ### div\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L287)

 
```
fun box div_partial(
  y: U64 val)
: U64 val ?

```
 #### Parameters

 * y: [U64](index) val

 #### Returns

 * [U64](index) val ?

 ### rem\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L290)

 
```
fun box rem_partial(
  y: U64 val)
: U64 val ?

```
 #### Parameters

 * y: [U64](index) val

 #### Returns

 * [U64](index) val ?

 ### divrem\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L293)

 
```
fun box divrem_partial(
  y: U64 val)
: (U64 val , U64 val) ?

```
 #### Parameters

 * y: [U64](index) val

 #### Returns

 * ([U64](index) val , [U64](index) val) ?

 ### shl

 
```
fun box shl(
  y: U64 val)
: U64 val

```
 #### Parameters

 * y: [U64](index) val

 #### Returns

 * [U64](index) val

 ### shr

 
```
fun box shr(
  y: U64 val)
: U64 val

```
 #### Parameters

 * y: [U64](index) val

 #### Returns

 * [U64](index) val

 ### fld

 
```
fun box fld(
  y: U64 val)
: U64 val

```
 #### Parameters

 * y: [U64](index) val

 #### Returns

 * [U64](index) val

 ### fldc

 
```
fun box fldc(
  y: U64 val)
: (U64 val , Bool val)

```
 #### Parameters

 * y: [U64](index) val

 #### Returns

 * ([U64](index) val , [Bool](builtin-bool) val)

 ### fld\_partial

 
```
fun box fld_partial(
  y: U64 val)
: U64 val ?

```
 #### Parameters

 * y: [U64](index) val

 #### Returns

 * [U64](index) val ?

 ### fld\_unsafe

 
```
fun box fld_unsafe(
  y: U64 val)
: U64 val

```
 #### Parameters

 * y: [U64](index) val

 #### Returns

 * [U64](index) val

 ### mod

 
```
fun box mod(
  y: U64 val)
: U64 val

```
 #### Parameters

 * y: [U64](index) val

 #### Returns

 * [U64](index) val

 ### modc

 
```
fun box modc(
  y: U64 val)
: (U64 val , Bool val)

```
 #### Parameters

 * y: [U64](index) val

 #### Returns

 * ([U64](index) val , [Bool](builtin-bool) val)

 ### mod\_partial

 
```
fun box mod_partial(
  y: U64 val)
: U64 val ?

```
 #### Parameters

 * y: [U64](index) val

 #### Returns

 * [U64](index) val ?

 ### mod\_unsafe

 
```
fun box mod_unsafe(
  y: U64 val)
: U64 val

```
 #### Parameters

 * y: [U64](index) val

 #### Returns

 * [U64](index) val

 ### shl\_unsafe

 
```
fun box shl_unsafe(
  y: U64 val)
: U64 val

```
 #### Parameters

 * y: [U64](index) val

 #### Returns

 * [U64](index) val

 ### shr\_unsafe

 
```
fun box shr_unsafe(
  y: U64 val)
: U64 val

```
 #### Parameters

 * y: [U64](index) val

 #### Returns

 * [U64](index) val

 ### rotl

 
```
fun box rotl(
  y: U64 val)
: U64 val

```
 #### Parameters

 * y: [U64](index) val

 #### Returns

 * [U64](index) val

 ### rotr

 
```
fun box rotr(
  y: U64 val)
: U64 val

```
 #### Parameters

 * y: [U64](index) val

 #### Returns

 * [U64](index) val

 ### string

 
```
fun box string()
: String iso^

```
 #### Returns

 * [String](builtin-string) iso^

 ### add\_unsafe

 
```
fun box add_unsafe(
  y: U64 val)
: U64 val

```
 #### Parameters

 * y: [U64](index) val

 #### Returns

 * [U64](index) val

 ### sub\_unsafe

 
```
fun box sub_unsafe(
  y: U64 val)
: U64 val

```
 #### Parameters

 * y: [U64](index) val

 #### Returns

 * [U64](index) val

 ### mul\_unsafe

 
```
fun box mul_unsafe(
  y: U64 val)
: U64 val

```
 #### Parameters

 * y: [U64](index) val

 #### Returns

 * [U64](index) val

 ### div\_unsafe

 
```
fun box div_unsafe(
  y: U64 val)
: U64 val

```
 #### Parameters

 * y: [U64](index) val

 #### Returns

 * [U64](index) val

 ### divrem\_unsafe

 
```
fun box divrem_unsafe(
  y: U64 val)
: (U64 val , U64 val)

```
 #### Parameters

 * y: [U64](index) val

 #### Returns

 * ([U64](index) val , [U64](index) val)

 ### rem\_unsafe

 
```
fun box rem_unsafe(
  y: U64 val)
: U64 val

```
 #### Parameters

 * y: [U64](index) val

 #### Returns

 * [U64](index) val

 ### neg\_unsafe

 
```
fun box neg_unsafe()
: U64 val

```
 #### Returns

 * [U64](index) val

 ### op\_and

 
```
fun box op_and(
  y: U64 val)
: U64 val

```
 #### Parameters

 * y: [U64](index) val

 #### Returns

 * [U64](index) val

 ### op\_or

 
```
fun box op_or(
  y: U64 val)
: U64 val

```
 #### Parameters

 * y: [U64](index) val

 #### Returns

 * [U64](index) val

 ### op\_xor

 
```
fun box op_xor(
  y: U64 val)
: U64 val

```
 #### Parameters

 * y: [U64](index) val

 #### Returns

 * [U64](index) val

 ### op\_not

 
```
fun box op_not()
: U64 val

```
 #### Returns

 * [U64](index) val

 ### add

 
```
fun box add(
  y: U64 val)
: U64 val

```
 #### Parameters

 * y: [U64](index) val

 #### Returns

 * [U64](index) val

 ### sub

 
```
fun box sub(
  y: U64 val)
: U64 val

```
 #### Parameters

 * y: [U64](index) val

 #### Returns

 * [U64](index) val

 ### mul

 
```
fun box mul(
  y: U64 val)
: U64 val

```
 #### Parameters

 * y: [U64](index) val

 #### Returns

 * [U64](index) val

 ### div

 
```
fun box div(
  y: U64 val)
: U64 val

```
 #### Parameters

 * y: [U64](index) val

 #### Returns

 * [U64](index) val

 ### divrem

 
```
fun box divrem(
  y: U64 val)
: (U64 val , U64 val)

```
 #### Parameters

 * y: [U64](index) val

 #### Returns

 * ([U64](index) val , [U64](index) val)

 ### rem

 
```
fun box rem(
  y: U64 val)
: U64 val

```
 #### Parameters

 * y: [U64](index) val

 #### Returns

 * [U64](index) val

 ### neg

 
```
fun box neg()
: U64 val

```
 #### Returns

 * [U64](index) val

 ### eq

 
```
fun box eq(
  y: U64 val)
: Bool val

```
 #### Parameters

 * y: [U64](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 
```
fun box ne(
  y: U64 val)
: Bool val

```
 #### Parameters

 * y: [U64](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### lt

 
```
fun box lt(
  y: U64 val)
: Bool val

```
 #### Parameters

 * y: [U64](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### le

 
```
fun box le(
  y: U64 val)
: Bool val

```
 #### Parameters

 * y: [U64](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ge

 
```
fun box ge(
  y: U64 val)
: Bool val

```
 #### Parameters

 * y: [U64](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### gt

 
```
fun box gt(
  y: U64 val)
: Bool val

```
 #### Parameters

 * y: [U64](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### hash64

 
```
fun box hash64()
: U64 val

```
 #### Returns

 * [U64](index) val

 ### i8

 
```
fun box i8()
: I8 val

```
 #### Returns

 * [I8](builtin-i8) val

 ### i16

 
```
fun box i16()
: I16 val

```
 #### Returns

 * [I16](builtin-i16) val

 ### i32

 
```
fun box i32()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### i64

 
```
fun box i64()
: I64 val

```
 #### Returns

 * [I64](builtin-i64) val

 ### i128

 
```
fun box i128()
: I128 val

```
 #### Returns

 * [I128](builtin-i128) val

 ### ilong

 
```
fun box ilong()
: ILong val

```
 #### Returns

 * [ILong](builtin-ilong) val

 ### isize

 
```
fun box isize()
: ISize val

```
 #### Returns

 * [ISize](builtin-isize) val

 ### u8

 
```
fun box u8()
: U8 val

```
 #### Returns

 * [U8](builtin-u8) val

 ### u16

 
```
fun box u16()
: U16 val

```
 #### Returns

 * [U16](builtin-u16) val

 ### u32

 
```
fun box u32()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### u64

 
```
fun box u64()
: U64 val

```
 #### Returns

 * [U64](index) val

 ### u128

 
```
fun box u128()
: U128 val

```
 #### Returns

 * [U128](builtin-u128) val

 ### ulong

 
```
fun box ulong()
: ULong val

```
 #### Returns

 * [ULong](builtin-ulong) val

 ### usize

 
```
fun box usize()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### f32

 
```
fun box f32()
: F32 val

```
 #### Returns

 * [F32](builtin-f32) val

 ### f64

 
```
fun box f64()
: F64 val

```
 #### Returns

 * [F64](builtin-f64) val

 ### i8\_unsafe

 
```
fun box i8_unsafe()
: I8 val

```
 #### Returns

 * [I8](builtin-i8) val

 ### i16\_unsafe

 
```
fun box i16_unsafe()
: I16 val

```
 #### Returns

 * [I16](builtin-i16) val

 ### i32\_unsafe

 
```
fun box i32_unsafe()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### i64\_unsafe

 
```
fun box i64_unsafe()
: I64 val

```
 #### Returns

 * [I64](builtin-i64) val

 ### i128\_unsafe

 
```
fun box i128_unsafe()
: I128 val

```
 #### Returns

 * [I128](builtin-i128) val

 ### ilong\_unsafe

 
```
fun box ilong_unsafe()
: ILong val

```
 #### Returns

 * [ILong](builtin-ilong) val

 ### isize\_unsafe

 
```
fun box isize_unsafe()
: ISize val

```
 #### Returns

 * [ISize](builtin-isize) val

 ### u8\_unsafe

 
```
fun box u8_unsafe()
: U8 val

```
 #### Returns

 * [U8](builtin-u8) val

 ### u16\_unsafe

 
```
fun box u16_unsafe()
: U16 val

```
 #### Returns

 * [U16](builtin-u16) val

 ### u32\_unsafe

 
```
fun box u32_unsafe()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### u64\_unsafe

 
```
fun box u64_unsafe()
: U64 val

```
 #### Returns

 * [U64](index) val

 ### u128\_unsafe

 
```
fun box u128_unsafe()
: U128 val

```
 #### Returns

 * [U128](builtin-u128) val

 ### ulong\_unsafe

 
```
fun box ulong_unsafe()
: ULong val

```
 #### Returns

 * [ULong](builtin-ulong) val

 ### usize\_unsafe

 
```
fun box usize_unsafe()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### f32\_unsafe

 
```
fun box f32_unsafe()
: F32 val

```
 #### Returns

 * [F32](builtin-f32) val

 ### f64\_unsafe

 
```
fun box f64_unsafe()
: F64 val

```
 #### Returns

 * [F64](builtin-f64) val

 ### compare

 
```
fun box compare(
  that: U64 val)
: (Less val | Equal val | Greater val)

```
 #### Parameters

 * that: [U64](index) val

 #### Returns

 * ([Less](builtin-less) val | [Equal](builtin-equal) val | [Greater](builtin-greater) val)



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/builtin-U64>

StringBytes
===========

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L1683)

 
```
class ref StringBytes is
  Iterator[U8 val] ref

```
 #### Implements

 * [Iterator](builtin-iterator)[[U8](builtin-u8) val] ref

 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L1687)

 
```
new ref create(
  string: String box)
: StringBytes ref^

```
 #### Parameters

 * string: [String](builtin-string) box

 #### Returns

 * [StringBytes](index) ref^

 Public Functions
----------------

 ### has\_next

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L1691)

 
```
fun box has_next()
: Bool val

```
 #### Returns

 * [Bool](builtin-bool) val

 ### next

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L1694)

 
```
fun ref next()
: U8 val ?

```
 #### Returns

 * [U8](builtin-u8) val ?



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/builtin-StringBytes>

ByteSeq
=======

 [[Source]](https://stdlib.ponylang.io/src/builtin/std_stream/#L1)

 
```
type ByteSeq is
  (String val | Array[U8 val] val)

```
 #### Type Alias For

 * ([String](builtin-string) val | [Array](builtin-array)[[U8](builtin-u8) val] val)



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/builtin-ByteSeq>

StringRunes
===========

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L1697)

 
```
class ref StringRunes is
  Iterator[U32 val] ref

```
 #### Implements

 * [Iterator](builtin-iterator)[[U32](builtin-u32) val] ref

 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L1701)

 
```
new ref create(
  string: String box)
: StringRunes ref^

```
 #### Parameters

 * string: [String](builtin-string) box

 #### Returns

 * [StringRunes](index) ref^

 Public Functions
----------------

 ### has\_next

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L1705)

 
```
fun box has_next()
: Bool val

```
 #### Returns

 * [Bool](builtin-bool) val

 ### next

 [[Source]](https://stdlib.ponylang.io/src/builtin/string/#L1708)

 
```
fun ref next()
: U32 val ?

```
 #### Returns

 * [U32](builtin-u32) val ?



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/builtin-StringRunes>

Unsigned
========

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L841)

 
```
type Unsigned is
  (U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val)

```
 #### Type Alias For

 * ([U8](builtin-u8) val | [U16](builtin-u16) val | [U32](builtin-u32) val | [U64](builtin-u64) val | [U128](builtin-u128) val | [ULong](builtin-ulong) val | [USize](builtin-usize) val)



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/builtin-Unsigned>

Stdin
=====

 [[Source]](https://stdlib.ponylang.io/src/builtin/stdin/#L43)

 Asynchronous access to stdin. The constructor is private to ensure that access is provided only via an environment.

 Reading from stdin is done by registering an `InputNotify`:

 
```
actor Main
  new create(env: Env) =>
    // do not forget to call `env.input.dispose` at some point
    env.input(
      object iso is InputNotify
        fun ref apply(data: Array[U8] iso) =>
          env.out.write(String.from_iso_array(consume data))

        fun ref dispose() =>
          env.out.print("Done.")
      end,
      512)

```
 **Note:** For reading user input from a terminal, use the [term](term--index) package.

 
```
actor tag Stdin

```
 Public Behaviours
-----------------

 ### apply

 [[Source]](https://stdlib.ponylang.io/src/builtin/stdin/#L78)

 Set the notifier. Optionally, also sets the chunk size, dictating the maximum number of bytes of each chunk that will be passed to the notifier.

 
```
be apply(
  notify: (InputNotify iso | None val),
  chunk_size: USize val = 32)

```
 #### Parameters

 * notify: ([InputNotify](builtin-inputnotify) iso | [None](builtin-none) val)
* chunk\_size: [USize](builtin-usize) val = 32

 ### dispose

 [[Source]](https://stdlib.ponylang.io/src/builtin/stdin/#L86)

 Clear the notifier in order to shut down input.

 
```
be dispose()

```


 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/builtin-Stdin>

InputNotify
===========

 [[Source]](https://stdlib.ponylang.io/src/builtin/stdin/#L11)

 Notification for data arriving via an input stream.

 
```
interface ref InputNotify

```
 Public Functions
----------------

 ### apply

 [[Source]](https://stdlib.ponylang.io/src/builtin/stdin/#L15)

 Called when data is available on the stream.

 
```
fun ref apply(
  data: Array[U8 val] iso)
: None val

```
 #### Parameters

 * data: [Array](builtin-array)[[U8](builtin-u8) val] iso

 #### Returns

 * [None](builtin-none) val

 ### dispose

 [[Source]](https://stdlib.ponylang.io/src/builtin/stdin/#L21)

 Called when no more data will arrive on the stream.

 
```
fun ref dispose()
: None val

```
 #### Returns

 * [None](builtin-none) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/builtin-InputNotify>

OutStream
=========

 [[Source]](https://stdlib.ponylang.io/src/builtin/std_stream/#L9)

 Asnychronous access to some output stream.

 
```
interface tag OutStream

```
 Public Behaviours
-----------------

 ### print

 [[Source]](https://stdlib.ponylang.io/src/builtin/std_stream/#L13)

 Print some bytes and insert a newline afterwards.

 
```
be print(
  data: (String val | Array[U8 val] val))

```
 #### Parameters

 * data: ([String](builtin-string) val | [Array](builtin-array)[[U8](builtin-u8) val] val)

 ### write

 [[Source]](https://stdlib.ponylang.io/src/builtin/std_stream/#L18)

 Print some bytes without inserting a newline afterwards.

 
```
be write(
  data: (String val | Array[U8 val] val))

```
 #### Parameters

 * data: ([String](builtin-string) val | [Array](builtin-array)[[U8](builtin-u8) val] val)

 ### printv

 [[Source]](https://stdlib.ponylang.io/src/builtin/std_stream/#L23)

 Print an iterable collection of ByteSeqs.

 
```
be printv(
  data: ByteSeqIter val)

```
 #### Parameters

 * data: [ByteSeqIter](builtin-byteseqiter) val

 ### writev

 [[Source]](https://stdlib.ponylang.io/src/builtin/std_stream/#L28)

 Write an iterable collection of ByteSeqs.

 
```
be writev(
  data: ByteSeqIter val)

```
 #### Parameters

 * data: [ByteSeqIter](builtin-byteseqiter) val

 ### flush

 [[Source]](https://stdlib.ponylang.io/src/builtin/std_stream/#L33)

 Flush the stream.

 
```
be flush()

```


 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/builtin-OutStream>

ByteSeqIter
===========

 [[Source]](https://stdlib.ponylang.io/src/builtin/std_stream/#L3)

 Accept an iterable collection of String or Array[U8] val.

 
```
interface val ByteSeqIter

```
 Public Functions
----------------

 ### values

 [[Source]](https://stdlib.ponylang.io/src/builtin/std_stream/#L7)

 
```
fun box values()
: Iterator[(this->String box | this->Array[U8 val] box)] ref

```
 #### Returns

 * [Iterator](builtin-iterator)[(this->[String](builtin-string) box | this->[Array](builtin-array)[[U8](builtin-u8) val] box)] ref



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/builtin-ByteSeqIter>

U128
====

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L559)

 
```
primitive val U128 is
  UnsignedInteger[U128 val] val

```
 #### Implements

 * [UnsignedInteger](builtin-unsignedinteger)[[U128](index) val] val

 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L560)

 
```
new val create(
  value: U128 val)
: U128 val^

```
 #### Parameters

 * value: [U128](index) val

 #### Returns

 * [U128](index) val^

 ### from[A: (([I8](builtin-i8) val | [I16](builtin-i16) val | [I32](builtin-i32) val | [I64](builtin-i64) val | [I128](builtin-i128) val | [ILong](builtin-ilong) val | [ISize](builtin-isize) val | [U8](builtin-u8) val | [U16](builtin-u16) val | [U32](builtin-u32) val | [U64](builtin-u64) val | [U128](index) val | [ULong](builtin-ulong) val | [USize](builtin-usize) val | [F32](builtin-f32) val | [F64](builtin-f64) val) & [Real](builtin-real)[A] val)]

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L561)

 
```
new val from[A: ((I8 val | I16 val | I32 val | 
    I64 val | I128 val | ILong val | 
    ISize val | U8 val | U16 val | 
    U32 val | U64 val | U128 val | 
    ULong val | USize val | F32 val | 
    F64 val) & Real[A] val)](
  a: A)
: U128 val^

```
 #### Parameters

 * a: A

 #### Returns

 * [U128](index) val^

 ### min\_value

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L563)

 
```
new val min_value()
: U128 val^

```
 #### Returns

 * [U128](index) val^

 ### max\_value

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L564)

 
```
new val max_value()
: U128 val^

```
 #### Returns

 * [U128](index) val^

 Public Functions
----------------

 ### next\_pow2

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L566)

 
```
fun box next_pow2()
: U128 val

```
 #### Returns

 * [U128](index) val

 ### abs

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L570)

 
```
fun box abs()
: U128 val

```
 #### Returns

 * [U128](index) val

 ### bit\_reverse

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L571)

 
```
fun box bit_reverse()
: U128 val

```
 #### Returns

 * [U128](index) val

 ### bswap

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L572)

 
```
fun box bswap()
: U128 val

```
 #### Returns

 * [U128](index) val

 ### popcount

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L573)

 
```
fun box popcount()
: U128 val

```
 #### Returns

 * [U128](index) val

 ### clz

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L574)

 
```
fun box clz()
: U128 val

```
 #### Returns

 * [U128](index) val

 ### ctz

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L575)

 
```
fun box ctz()
: U128 val

```
 #### Returns

 * [U128](index) val

 ### clz\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L577)

 Unsafe operation. If this is 0, the result is undefined.

 
```
fun box clz_unsafe()
: U128 val

```
 #### Returns

 * [U128](index) val

 ### ctz\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L584)

 Unsafe operation. If this is 0, the result is undefined.

 
```
fun box ctz_unsafe()
: U128 val

```
 #### Returns

 * [U128](index) val

 ### bitwidth

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L591)

 
```
fun box bitwidth()
: U128 val

```
 #### Returns

 * [U128](index) val

 ### bytewidth

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L593)

 
```
fun box bytewidth()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### min

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L595)

 
```
fun box min(
  y: U128 val)
: U128 val

```
 #### Parameters

 * y: [U128](index) val

 #### Returns

 * [U128](index) val

 ### max

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L596)

 
```
fun box max(
  y: U128 val)
: U128 val

```
 #### Parameters

 * y: [U128](index) val

 #### Returns

 * [U128](index) val

 ### hash

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L598)

 
```
fun box hash()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### hash64

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L608)

 
```
fun box hash64()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### string

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L611)

 
```
fun box string()
: String iso^

```
 #### Returns

 * [String](builtin-string) iso^

 ### mul

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L614)

 
```
fun box mul(
  y: U128 val)
: U128 val

```
 #### Parameters

 * y: [U128](index) val

 #### Returns

 * [U128](index) val

 ### divrem

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L643)

 
```
fun box divrem(
  y: U128 val)
: (U128 val , U128 val)

```
 #### Parameters

 * y: [U128](index) val

 #### Returns

 * ([U128](index) val , [U128](index) val)

 ### div

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L673)

 
```
fun box div(
  y: U128 val)
: U128 val

```
 #### Parameters

 * y: [U128](index) val

 #### Returns

 * [U128](index) val

 ### rem

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L681)

 
```
fun box rem(
  y: U128 val)
: U128 val

```
 #### Parameters

 * y: [U128](index) val

 #### Returns

 * [U128](index) val

 ### mul\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L689)

 Unsafe operation. If the operation overflows, the result is undefined.

 
```
fun box mul_unsafe(
  y: U128 val)
: U128 val

```
 #### Parameters

 * y: [U128](index) val

 #### Returns

 * [U128](index) val

 ### divrem\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L700)

 Unsafe operation. If y is 0, the result is undefined. If the operation overflows, the result is undefined.

 
```
fun box divrem_unsafe(
  y: U128 val)
: (U128 val , U128 val)

```
 #### Parameters

 * y: [U128](index) val

 #### Returns

 * ([U128](index) val , [U128](index) val)

 ### div\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L712)

 Unsafe operation. If y is 0, the result is undefined. If the operation overflows, the result is undefined.

 
```
fun box div_unsafe(
  y: U128 val)
: U128 val

```
 #### Parameters

 * y: [U128](index) val

 #### Returns

 * [U128](index) val

 ### rem\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L724)

 Unsafe operation. If y is 0, the result is undefined. If the operation overflows, the result is undefined.

 
```
fun box rem_unsafe(
  y: U128 val)
: U128 val

```
 #### Parameters

 * y: [U128](index) val

 #### Returns

 * [U128](index) val

 ### f32

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L736)

 
```
fun box f32()
: F32 val

```
 #### Returns

 * [F32](builtin-f32) val

 ### f64

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L744)

 
```
fun box f64()
: F64 val

```
 #### Returns

 * [F64](builtin-f64) val

 ### f32\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L778)

 Unsafe operation. If the value doesn't fit in the destination type, the result is undefined.

 
```
fun box f32_unsafe()
: F32 val

```
 #### Returns

 * [F32](builtin-f32) val

 ### f64\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L785)

 Unsafe operation. If the value doesn't fit in the destination type, the result is undefined.

 
```
fun box f64_unsafe()
: F64 val

```
 #### Returns

 * [F64](builtin-f64) val

 ### addc

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L792)

 
```
fun box addc(
  y: U128 val)
: (U128 val , Bool val)

```
 #### Parameters

 * y: [U128](index) val

 #### Returns

 * ([U128](index) val , [Bool](builtin-bool) val)

 ### subc

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L800)

 
```
fun box subc(
  y: U128 val)
: (U128 val , Bool val)

```
 #### Parameters

 * y: [U128](index) val

 #### Returns

 * ([U128](index) val , [Bool](builtin-bool) val)

 ### mulc

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L808)

 
```
fun box mulc(
  y: U128 val)
: (U128 val , Bool val)

```
 #### Parameters

 * y: [U128](index) val

 #### Returns

 * ([U128](index) val , [Bool](builtin-bool) val)

 ### divc

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L817)

 
```
fun box divc(
  y: U128 val)
: (U128 val , Bool val)

```
 #### Parameters

 * y: [U128](index) val

 #### Returns

 * ([U128](index) val , [Bool](builtin-bool) val)

 ### remc

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L820)

 
```
fun box remc(
  y: U128 val)
: (U128 val , Bool val)

```
 #### Parameters

 * y: [U128](index) val

 #### Returns

 * ([U128](index) val , [Bool](builtin-bool) val)

 ### add\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L823)

 
```
fun box add_partial(
  y: U128 val)
: U128 val ?

```
 #### Parameters

 * y: [U128](index) val

 #### Returns

 * [U128](index) val ?

 ### sub\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L826)

 
```
fun box sub_partial(
  y: U128 val)
: U128 val ?

```
 #### Parameters

 * y: [U128](index) val

 #### Returns

 * [U128](index) val ?

 ### mul\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L829)

 
```
fun box mul_partial(
  y: U128 val)
: U128 val ?

```
 #### Parameters

 * y: [U128](index) val

 #### Returns

 * [U128](index) val ?

 ### div\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L832)

 
```
fun box div_partial(
  y: U128 val)
: U128 val ?

```
 #### Parameters

 * y: [U128](index) val

 #### Returns

 * [U128](index) val ?

 ### rem\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L835)

 
```
fun box rem_partial(
  y: U128 val)
: U128 val ?

```
 #### Parameters

 * y: [U128](index) val

 #### Returns

 * [U128](index) val ?

 ### divrem\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L838)

 
```
fun box divrem_partial(
  y: U128 val)
: (U128 val , U128 val) ?

```
 #### Parameters

 * y: [U128](index) val

 #### Returns

 * ([U128](index) val , [U128](index) val) ?

 ### shl

 
```
fun box shl(
  y: U128 val)
: U128 val

```
 #### Parameters

 * y: [U128](index) val

 #### Returns

 * [U128](index) val

 ### shr

 
```
fun box shr(
  y: U128 val)
: U128 val

```
 #### Parameters

 * y: [U128](index) val

 #### Returns

 * [U128](index) val

 ### fld

 
```
fun box fld(
  y: U128 val)
: U128 val

```
 #### Parameters

 * y: [U128](index) val

 #### Returns

 * [U128](index) val

 ### fldc

 
```
fun box fldc(
  y: U128 val)
: (U128 val , Bool val)

```
 #### Parameters

 * y: [U128](index) val

 #### Returns

 * ([U128](index) val , [Bool](builtin-bool) val)

 ### fld\_partial

 
```
fun box fld_partial(
  y: U128 val)
: U128 val ?

```
 #### Parameters

 * y: [U128](index) val

 #### Returns

 * [U128](index) val ?

 ### fld\_unsafe

 
```
fun box fld_unsafe(
  y: U128 val)
: U128 val

```
 #### Parameters

 * y: [U128](index) val

 #### Returns

 * [U128](index) val

 ### mod

 
```
fun box mod(
  y: U128 val)
: U128 val

```
 #### Parameters

 * y: [U128](index) val

 #### Returns

 * [U128](index) val

 ### modc

 
```
fun box modc(
  y: U128 val)
: (U128 val , Bool val)

```
 #### Parameters

 * y: [U128](index) val

 #### Returns

 * ([U128](index) val , [Bool](builtin-bool) val)

 ### mod\_partial

 
```
fun box mod_partial(
  y: U128 val)
: U128 val ?

```
 #### Parameters

 * y: [U128](index) val

 #### Returns

 * [U128](index) val ?

 ### mod\_unsafe

 
```
fun box mod_unsafe(
  y: U128 val)
: U128 val

```
 #### Parameters

 * y: [U128](index) val

 #### Returns

 * [U128](index) val

 ### shl\_unsafe

 
```
fun box shl_unsafe(
  y: U128 val)
: U128 val

```
 #### Parameters

 * y: [U128](index) val

 #### Returns

 * [U128](index) val

 ### shr\_unsafe

 
```
fun box shr_unsafe(
  y: U128 val)
: U128 val

```
 #### Parameters

 * y: [U128](index) val

 #### Returns

 * [U128](index) val

 ### rotl

 
```
fun box rotl(
  y: U128 val)
: U128 val

```
 #### Parameters

 * y: [U128](index) val

 #### Returns

 * [U128](index) val

 ### rotr

 
```
fun box rotr(
  y: U128 val)
: U128 val

```
 #### Parameters

 * y: [U128](index) val

 #### Returns

 * [U128](index) val

 ### add\_unsafe

 
```
fun box add_unsafe(
  y: U128 val)
: U128 val

```
 #### Parameters

 * y: [U128](index) val

 #### Returns

 * [U128](index) val

 ### sub\_unsafe

 
```
fun box sub_unsafe(
  y: U128 val)
: U128 val

```
 #### Parameters

 * y: [U128](index) val

 #### Returns

 * [U128](index) val

 ### neg\_unsafe

 
```
fun box neg_unsafe()
: U128 val

```
 #### Returns

 * [U128](index) val

 ### op\_and

 
```
fun box op_and(
  y: U128 val)
: U128 val

```
 #### Parameters

 * y: [U128](index) val

 #### Returns

 * [U128](index) val

 ### op\_or

 
```
fun box op_or(
  y: U128 val)
: U128 val

```
 #### Parameters

 * y: [U128](index) val

 #### Returns

 * [U128](index) val

 ### op\_xor

 
```
fun box op_xor(
  y: U128 val)
: U128 val

```
 #### Parameters

 * y: [U128](index) val

 #### Returns

 * [U128](index) val

 ### op\_not

 
```
fun box op_not()
: U128 val

```
 #### Returns

 * [U128](index) val

 ### add

 
```
fun box add(
  y: U128 val)
: U128 val

```
 #### Parameters

 * y: [U128](index) val

 #### Returns

 * [U128](index) val

 ### sub

 
```
fun box sub(
  y: U128 val)
: U128 val

```
 #### Parameters

 * y: [U128](index) val

 #### Returns

 * [U128](index) val

 ### neg

 
```
fun box neg()
: U128 val

```
 #### Returns

 * [U128](index) val

 ### eq

 
```
fun box eq(
  y: U128 val)
: Bool val

```
 #### Parameters

 * y: [U128](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 
```
fun box ne(
  y: U128 val)
: Bool val

```
 #### Parameters

 * y: [U128](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### lt

 
```
fun box lt(
  y: U128 val)
: Bool val

```
 #### Parameters

 * y: [U128](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### le

 
```
fun box le(
  y: U128 val)
: Bool val

```
 #### Parameters

 * y: [U128](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ge

 
```
fun box ge(
  y: U128 val)
: Bool val

```
 #### Parameters

 * y: [U128](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### gt

 
```
fun box gt(
  y: U128 val)
: Bool val

```
 #### Parameters

 * y: [U128](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### i8

 
```
fun box i8()
: I8 val

```
 #### Returns

 * [I8](builtin-i8) val

 ### i16

 
```
fun box i16()
: I16 val

```
 #### Returns

 * [I16](builtin-i16) val

 ### i32

 
```
fun box i32()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### i64

 
```
fun box i64()
: I64 val

```
 #### Returns

 * [I64](builtin-i64) val

 ### i128

 
```
fun box i128()
: I128 val

```
 #### Returns

 * [I128](builtin-i128) val

 ### ilong

 
```
fun box ilong()
: ILong val

```
 #### Returns

 * [ILong](builtin-ilong) val

 ### isize

 
```
fun box isize()
: ISize val

```
 #### Returns

 * [ISize](builtin-isize) val

 ### u8

 
```
fun box u8()
: U8 val

```
 #### Returns

 * [U8](builtin-u8) val

 ### u16

 
```
fun box u16()
: U16 val

```
 #### Returns

 * [U16](builtin-u16) val

 ### u32

 
```
fun box u32()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### u64

 
```
fun box u64()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### u128

 
```
fun box u128()
: U128 val

```
 #### Returns

 * [U128](index) val

 ### ulong

 
```
fun box ulong()
: ULong val

```
 #### Returns

 * [ULong](builtin-ulong) val

 ### usize

 
```
fun box usize()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### i8\_unsafe

 
```
fun box i8_unsafe()
: I8 val

```
 #### Returns

 * [I8](builtin-i8) val

 ### i16\_unsafe

 
```
fun box i16_unsafe()
: I16 val

```
 #### Returns

 * [I16](builtin-i16) val

 ### i32\_unsafe

 
```
fun box i32_unsafe()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### i64\_unsafe

 
```
fun box i64_unsafe()
: I64 val

```
 #### Returns

 * [I64](builtin-i64) val

 ### i128\_unsafe

 
```
fun box i128_unsafe()
: I128 val

```
 #### Returns

 * [I128](builtin-i128) val

 ### ilong\_unsafe

 
```
fun box ilong_unsafe()
: ILong val

```
 #### Returns

 * [ILong](builtin-ilong) val

 ### isize\_unsafe

 
```
fun box isize_unsafe()
: ISize val

```
 #### Returns

 * [ISize](builtin-isize) val

 ### u8\_unsafe

 
```
fun box u8_unsafe()
: U8 val

```
 #### Returns

 * [U8](builtin-u8) val

 ### u16\_unsafe

 
```
fun box u16_unsafe()
: U16 val

```
 #### Returns

 * [U16](builtin-u16) val

 ### u32\_unsafe

 
```
fun box u32_unsafe()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### u64\_unsafe

 
```
fun box u64_unsafe()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### u128\_unsafe

 
```
fun box u128_unsafe()
: U128 val

```
 #### Returns

 * [U128](index) val

 ### ulong\_unsafe

 
```
fun box ulong_unsafe()
: ULong val

```
 #### Returns

 * [ULong](builtin-ulong) val

 ### usize\_unsafe

 
```
fun box usize_unsafe()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### compare

 
```
fun box compare(
  that: U128 val)
: (Less val | Equal val | Greater val)

```
 #### Parameters

 * that: [U128](index) val

 #### Returns

 * ([Less](builtin-less) val | [Equal](builtin-equal) val | [Greater](builtin-greater) val)



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/builtin-U128>

ULong
=====

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L296)

 
```
primitive val ULong is
  UnsignedInteger[ULong val] val

```
 #### Implements

 * [UnsignedInteger](builtin-unsignedinteger)[[ULong](index) val] val

 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L297)

 
```
new val create(
  value: ULong val)
: ULong val^

```
 #### Parameters

 * value: [ULong](index) val

 #### Returns

 * [ULong](index) val^

 ### from[A: (([I8](builtin-i8) val | [I16](builtin-i16) val | [I32](builtin-i32) val | [I64](builtin-i64) val | [I128](builtin-i128) val | [ILong](builtin-ilong) val | [ISize](builtin-isize) val | [U8](builtin-u8) val | [U16](builtin-u16) val | [U32](builtin-u32) val | [U64](builtin-u64) val | [U128](builtin-u128) val | [ULong](index) val | [USize](builtin-usize) val | [F32](builtin-f32) val | [F64](builtin-f64) val) & [Real](builtin-real)[A] val)]

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L298)

 
```
new val from[A: ((I8 val | I16 val | I32 val | 
    I64 val | I128 val | ILong val | 
    ISize val | U8 val | U16 val | 
    U32 val | U64 val | U128 val | 
    ULong val | USize val | F32 val | 
    F64 val) & Real[A] val)](
  a: A)
: ULong val^

```
 #### Parameters

 * a: A

 #### Returns

 * [ULong](index) val^

 ### min\_value

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L300)

 
```
new val min_value()
: ULong val^

```
 #### Returns

 * [ULong](index) val^

 ### max\_value

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L302)

 
```
new val max_value()
: ULong val^

```
 #### Returns

 * [ULong](index) val^

 Public Functions
----------------

 ### next\_pow2

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L309)

 
```
fun box next_pow2()
: ULong val

```
 #### Returns

 * [ULong](index) val

 ### abs

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L313)

 
```
fun box abs()
: ULong val

```
 #### Returns

 * [ULong](index) val

 ### bit\_reverse

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L315)

 
```
fun box bit_reverse()
: ULong val

```
 #### Returns

 * [ULong](index) val

 ### bswap

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L322)

 
```
fun box bswap()
: ULong val

```
 #### Returns

 * [ULong](index) val

 ### popcount

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L329)

 
```
fun box popcount()
: ULong val

```
 #### Returns

 * [ULong](index) val

 ### clz

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L336)

 
```
fun box clz()
: ULong val

```
 #### Returns

 * [ULong](index) val

 ### ctz

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L343)

 
```
fun box ctz()
: ULong val

```
 #### Returns

 * [ULong](index) val

 ### clz\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L350)

 Unsafe operation. If this is 0, the result is undefined.

 
```
fun box clz_unsafe()
: ULong val

```
 #### Returns

 * [ULong](index) val

 ### ctz\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L361)

 Unsafe operation. If this is 0, the result is undefined.

 
```
fun box ctz_unsafe()
: ULong val

```
 #### Returns

 * [ULong](index) val

 ### bitwidth

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L372)

 
```
fun box bitwidth()
: ULong val

```
 #### Returns

 * [ULong](index) val

 ### bytewidth

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L374)

 
```
fun box bytewidth()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### min

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L376)

 
```
fun box min(
  y: ULong val)
: ULong val

```
 #### Parameters

 * y: [ULong](index) val

 #### Returns

 * [ULong](index) val

 ### max

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L377)

 
```
fun box max(
  y: ULong val)
: ULong val

```
 #### Parameters

 * y: [ULong](index) val

 #### Returns

 * [ULong](index) val

 ### hash

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L379)

 
```
fun box hash()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### addc

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L386)

 
```
fun box addc(
  y: ULong val)
: (ULong val , Bool val)

```
 #### Parameters

 * y: [ULong](index) val

 #### Returns

 * ([ULong](index) val , [Bool](builtin-bool) val)

 ### subc

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L393)

 
```
fun box subc(
  y: ULong val)
: (ULong val , Bool val)

```
 #### Parameters

 * y: [ULong](index) val

 #### Returns

 * ([ULong](index) val , [Bool](builtin-bool) val)

 ### mulc

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L400)

 
```
fun box mulc(
  y: ULong val)
: (ULong val , Bool val)

```
 #### Parameters

 * y: [ULong](index) val

 #### Returns

 * ([ULong](index) val , [Bool](builtin-bool) val)

 ### divc

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L407)

 
```
fun box divc(
  y: ULong val)
: (ULong val , Bool val)

```
 #### Parameters

 * y: [ULong](index) val

 #### Returns

 * ([ULong](index) val , [Bool](builtin-bool) val)

 ### remc

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L410)

 
```
fun box remc(
  y: ULong val)
: (ULong val , Bool val)

```
 #### Parameters

 * y: [ULong](index) val

 #### Returns

 * ([ULong](index) val , [Bool](builtin-bool) val)

 ### add\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L413)

 
```
fun box add_partial(
  y: ULong val)
: ULong val ?

```
 #### Parameters

 * y: [ULong](index) val

 #### Returns

 * [ULong](index) val ?

 ### sub\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L416)

 
```
fun box sub_partial(
  y: ULong val)
: ULong val ?

```
 #### Parameters

 * y: [ULong](index) val

 #### Returns

 * [ULong](index) val ?

 ### mul\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L419)

 
```
fun box mul_partial(
  y: ULong val)
: ULong val ?

```
 #### Parameters

 * y: [ULong](index) val

 #### Returns

 * [ULong](index) val ?

 ### div\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L422)

 
```
fun box div_partial(
  y: ULong val)
: ULong val ?

```
 #### Parameters

 * y: [ULong](index) val

 #### Returns

 * [ULong](index) val ?

 ### rem\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L425)

 
```
fun box rem_partial(
  y: ULong val)
: ULong val ?

```
 #### Parameters

 * y: [ULong](index) val

 #### Returns

 * [ULong](index) val ?

 ### divrem\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/unsigned/#L428)

 
```
fun box divrem_partial(
  y: ULong val)
: (ULong val , ULong val) ?

```
 #### Parameters

 * y: [ULong](index) val

 #### Returns

 * ([ULong](index) val , [ULong](index) val) ?

 ### shl

 
```
fun box shl(
  y: ULong val)
: ULong val

```
 #### Parameters

 * y: [ULong](index) val

 #### Returns

 * [ULong](index) val

 ### shr

 
```
fun box shr(
  y: ULong val)
: ULong val

```
 #### Parameters

 * y: [ULong](index) val

 #### Returns

 * [ULong](index) val

 ### fld

 
```
fun box fld(
  y: ULong val)
: ULong val

```
 #### Parameters

 * y: [ULong](index) val

 #### Returns

 * [ULong](index) val

 ### fldc

 
```
fun box fldc(
  y: ULong val)
: (ULong val , Bool val)

```
 #### Parameters

 * y: [ULong](index) val

 #### Returns

 * ([ULong](index) val , [Bool](builtin-bool) val)

 ### fld\_partial

 
```
fun box fld_partial(
  y: ULong val)
: ULong val ?

```
 #### Parameters

 * y: [ULong](index) val

 #### Returns

 * [ULong](index) val ?

 ### fld\_unsafe

 
```
fun box fld_unsafe(
  y: ULong val)
: ULong val

```
 #### Parameters

 * y: [ULong](index) val

 #### Returns

 * [ULong](index) val

 ### mod

 
```
fun box mod(
  y: ULong val)
: ULong val

```
 #### Parameters

 * y: [ULong](index) val

 #### Returns

 * [ULong](index) val

 ### modc

 
```
fun box modc(
  y: ULong val)
: (ULong val , Bool val)

```
 #### Parameters

 * y: [ULong](index) val

 #### Returns

 * ([ULong](index) val , [Bool](builtin-bool) val)

 ### mod\_partial

 
```
fun box mod_partial(
  y: ULong val)
: ULong val ?

```
 #### Parameters

 * y: [ULong](index) val

 #### Returns

 * [ULong](index) val ?

 ### mod\_unsafe

 
```
fun box mod_unsafe(
  y: ULong val)
: ULong val

```
 #### Parameters

 * y: [ULong](index) val

 #### Returns

 * [ULong](index) val

 ### shl\_unsafe

 
```
fun box shl_unsafe(
  y: ULong val)
: ULong val

```
 #### Parameters

 * y: [ULong](index) val

 #### Returns

 * [ULong](index) val

 ### shr\_unsafe

 
```
fun box shr_unsafe(
  y: ULong val)
: ULong val

```
 #### Parameters

 * y: [ULong](index) val

 #### Returns

 * [ULong](index) val

 ### rotl

 
```
fun box rotl(
  y: ULong val)
: ULong val

```
 #### Parameters

 * y: [ULong](index) val

 #### Returns

 * [ULong](index) val

 ### rotr

 
```
fun box rotr(
  y: ULong val)
: ULong val

```
 #### Parameters

 * y: [ULong](index) val

 #### Returns

 * [ULong](index) val

 ### string

 
```
fun box string()
: String iso^

```
 #### Returns

 * [String](builtin-string) iso^

 ### add\_unsafe

 
```
fun box add_unsafe(
  y: ULong val)
: ULong val

```
 #### Parameters

 * y: [ULong](index) val

 #### Returns

 * [ULong](index) val

 ### sub\_unsafe

 
```
fun box sub_unsafe(
  y: ULong val)
: ULong val

```
 #### Parameters

 * y: [ULong](index) val

 #### Returns

 * [ULong](index) val

 ### mul\_unsafe

 
```
fun box mul_unsafe(
  y: ULong val)
: ULong val

```
 #### Parameters

 * y: [ULong](index) val

 #### Returns

 * [ULong](index) val

 ### div\_unsafe

 
```
fun box div_unsafe(
  y: ULong val)
: ULong val

```
 #### Parameters

 * y: [ULong](index) val

 #### Returns

 * [ULong](index) val

 ### divrem\_unsafe

 
```
fun box divrem_unsafe(
  y: ULong val)
: (ULong val , ULong val)

```
 #### Parameters

 * y: [ULong](index) val

 #### Returns

 * ([ULong](index) val , [ULong](index) val)

 ### rem\_unsafe

 
```
fun box rem_unsafe(
  y: ULong val)
: ULong val

```
 #### Parameters

 * y: [ULong](index) val

 #### Returns

 * [ULong](index) val

 ### neg\_unsafe

 
```
fun box neg_unsafe()
: ULong val

```
 #### Returns

 * [ULong](index) val

 ### op\_and

 
```
fun box op_and(
  y: ULong val)
: ULong val

```
 #### Parameters

 * y: [ULong](index) val

 #### Returns

 * [ULong](index) val

 ### op\_or

 
```
fun box op_or(
  y: ULong val)
: ULong val

```
 #### Parameters

 * y: [ULong](index) val

 #### Returns

 * [ULong](index) val

 ### op\_xor

 
```
fun box op_xor(
  y: ULong val)
: ULong val

```
 #### Parameters

 * y: [ULong](index) val

 #### Returns

 * [ULong](index) val

 ### op\_not

 
```
fun box op_not()
: ULong val

```
 #### Returns

 * [ULong](index) val

 ### add

 
```
fun box add(
  y: ULong val)
: ULong val

```
 #### Parameters

 * y: [ULong](index) val

 #### Returns

 * [ULong](index) val

 ### sub

 
```
fun box sub(
  y: ULong val)
: ULong val

```
 #### Parameters

 * y: [ULong](index) val

 #### Returns

 * [ULong](index) val

 ### mul

 
```
fun box mul(
  y: ULong val)
: ULong val

```
 #### Parameters

 * y: [ULong](index) val

 #### Returns

 * [ULong](index) val

 ### div

 
```
fun box div(
  y: ULong val)
: ULong val

```
 #### Parameters

 * y: [ULong](index) val

 #### Returns

 * [ULong](index) val

 ### divrem

 
```
fun box divrem(
  y: ULong val)
: (ULong val , ULong val)

```
 #### Parameters

 * y: [ULong](index) val

 #### Returns

 * ([ULong](index) val , [ULong](index) val)

 ### rem

 
```
fun box rem(
  y: ULong val)
: ULong val

```
 #### Parameters

 * y: [ULong](index) val

 #### Returns

 * [ULong](index) val

 ### neg

 
```
fun box neg()
: ULong val

```
 #### Returns

 * [ULong](index) val

 ### eq

 
```
fun box eq(
  y: ULong val)
: Bool val

```
 #### Parameters

 * y: [ULong](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 
```
fun box ne(
  y: ULong val)
: Bool val

```
 #### Parameters

 * y: [ULong](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### lt

 
```
fun box lt(
  y: ULong val)
: Bool val

```
 #### Parameters

 * y: [ULong](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### le

 
```
fun box le(
  y: ULong val)
: Bool val

```
 #### Parameters

 * y: [ULong](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ge

 
```
fun box ge(
  y: ULong val)
: Bool val

```
 #### Parameters

 * y: [ULong](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### gt

 
```
fun box gt(
  y: ULong val)
: Bool val

```
 #### Parameters

 * y: [ULong](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### hash64

 
```
fun box hash64()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### i8

 
```
fun box i8()
: I8 val

```
 #### Returns

 * [I8](builtin-i8) val

 ### i16

 
```
fun box i16()
: I16 val

```
 #### Returns

 * [I16](builtin-i16) val

 ### i32

 
```
fun box i32()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### i64

 
```
fun box i64()
: I64 val

```
 #### Returns

 * [I64](builtin-i64) val

 ### i128

 
```
fun box i128()
: I128 val

```
 #### Returns

 * [I128](builtin-i128) val

 ### ilong

 
```
fun box ilong()
: ILong val

```
 #### Returns

 * [ILong](builtin-ilong) val

 ### isize

 
```
fun box isize()
: ISize val

```
 #### Returns

 * [ISize](builtin-isize) val

 ### u8

 
```
fun box u8()
: U8 val

```
 #### Returns

 * [U8](builtin-u8) val

 ### u16

 
```
fun box u16()
: U16 val

```
 #### Returns

 * [U16](builtin-u16) val

 ### u32

 
```
fun box u32()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### u64

 
```
fun box u64()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### u128

 
```
fun box u128()
: U128 val

```
 #### Returns

 * [U128](builtin-u128) val

 ### ulong

 
```
fun box ulong()
: ULong val

```
 #### Returns

 * [ULong](index) val

 ### usize

 
```
fun box usize()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### f32

 
```
fun box f32()
: F32 val

```
 #### Returns

 * [F32](builtin-f32) val

 ### f64

 
```
fun box f64()
: F64 val

```
 #### Returns

 * [F64](builtin-f64) val

 ### i8\_unsafe

 
```
fun box i8_unsafe()
: I8 val

```
 #### Returns

 * [I8](builtin-i8) val

 ### i16\_unsafe

 
```
fun box i16_unsafe()
: I16 val

```
 #### Returns

 * [I16](builtin-i16) val

 ### i32\_unsafe

 
```
fun box i32_unsafe()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### i64\_unsafe

 
```
fun box i64_unsafe()
: I64 val

```
 #### Returns

 * [I64](builtin-i64) val

 ### i128\_unsafe

 
```
fun box i128_unsafe()
: I128 val

```
 #### Returns

 * [I128](builtin-i128) val

 ### ilong\_unsafe

 
```
fun box ilong_unsafe()
: ILong val

```
 #### Returns

 * [ILong](builtin-ilong) val

 ### isize\_unsafe

 
```
fun box isize_unsafe()
: ISize val

```
 #### Returns

 * [ISize](builtin-isize) val

 ### u8\_unsafe

 
```
fun box u8_unsafe()
: U8 val

```
 #### Returns

 * [U8](builtin-u8) val

 ### u16\_unsafe

 
```
fun box u16_unsafe()
: U16 val

```
 #### Returns

 * [U16](builtin-u16) val

 ### u32\_unsafe

 
```
fun box u32_unsafe()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### u64\_unsafe

 
```
fun box u64_unsafe()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### u128\_unsafe

 
```
fun box u128_unsafe()
: U128 val

```
 #### Returns

 * [U128](builtin-u128) val

 ### ulong\_unsafe

 
```
fun box ulong_unsafe()
: ULong val

```
 #### Returns

 * [ULong](index) val

 ### usize\_unsafe

 
```
fun box usize_unsafe()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### f32\_unsafe

 
```
fun box f32_unsafe()
: F32 val

```
 #### Returns

 * [F32](builtin-f32) val

 ### f64\_unsafe

 
```
fun box f64_unsafe()
: F64 val

```
 #### Returns

 * [F64](builtin-f64) val

 ### compare

 
```
fun box compare(
  that: ULong val)
: (Less val | Equal val | Greater val)

```
 #### Parameters

 * that: [ULong](index) val

 #### Returns

 * ([Less](builtin-less) val | [Equal](builtin-equal) val | [Greater](builtin-greater) val)



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/builtin-ULong>

SourceLoc
=========

 [[Source]](https://stdlib.ponylang.io/src/builtin/source_loc/#L1)

 Represents a location in a Pony source file, as reported by `__loc`.

 
```
interface val SourceLoc

```
 Public Functions
----------------

 ### file

 [[Source]](https://stdlib.ponylang.io/src/builtin/source_loc/#L5)

 Name and path of source file.

 
```
fun box file()
: String val

```
 #### Returns

 * [String](builtin-string) val

 ### type\_name

 [[Source]](https://stdlib.ponylang.io/src/builtin/source_loc/#L10)

 Name of nearest class, actor, primitive, struct, interface, or trait.

 
```
fun box type_name()
: String val

```
 #### Returns

 * [String](builtin-string) val

 ### method\_name

 [[Source]](https://stdlib.ponylang.io/src/builtin/source_loc/#L15)

 Name of containing method.

 
```
fun box method_name()
: String val

```
 #### Returns

 * [String](builtin-string) val

 ### line

 [[Source]](https://stdlib.ponylang.io/src/builtin/source_loc/#L20)

 Line number within file. Line numbers start at 1.

 
```
fun box line()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### pos

 [[Source]](https://stdlib.ponylang.io/src/builtin/source_loc/#L26)

 Character position on line. Character positions start at 1.

 
```
fun box pos()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/builtin-SourceLoc>

StdStream
=========

 [[Source]](https://stdlib.ponylang.io/src/builtin/std_stream/#L38)

 Asynchronous access to stdout and stderr. The constructors are private to ensure that access is provided only via an environment.

 
```
actor tag StdStream

```
 Public Behaviours
-----------------

 ### print

 [[Source]](https://stdlib.ponylang.io/src/builtin/std_stream/#L57)

 Print some bytes and insert a newline afterwards.

 
```
be print(
  data: (String val | Array[U8 val] val))

```
 #### Parameters

 * data: ([String](builtin-string) val | [Array](builtin-array)[[U8](builtin-u8) val] val)

 ### write

 [[Source]](https://stdlib.ponylang.io/src/builtin/std_stream/#L63)

 Print some bytes without inserting a newline afterwards.

 
```
be write(
  data: (String val | Array[U8 val] val))

```
 #### Parameters

 * data: ([String](builtin-string) val | [Array](builtin-array)[[U8](builtin-u8) val] val)

 ### printv

 [[Source]](https://stdlib.ponylang.io/src/builtin/std_stream/#L69)

 Print an iterable collection of ByteSeqs.

 
```
be printv(
  data: ByteSeqIter val)

```
 #### Parameters

 * data: [ByteSeqIter](builtin-byteseqiter) val

 ### writev

 [[Source]](https://stdlib.ponylang.io/src/builtin/std_stream/#L77)

 Write an iterable collection of ByteSeqs.

 
```
be writev(
  data: ByteSeqIter val)

```
 #### Parameters

 * data: [ByteSeqIter](builtin-byteseqiter) val

 ### flush

 [[Source]](https://stdlib.ponylang.io/src/builtin/std_stream/#L85)

 Flush any data out to the os (ignoring failures).

 
```
be flush()

```


 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/builtin-StdStream>

ILong
=====

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L372)

 
```
primitive val ILong is
  SignedInteger[ILong val, ULong val] val

```
 #### Implements

 * [SignedInteger](builtin-signedinteger)[[ILong](index) val, [ULong](builtin-ulong) val] val

 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L373)

 
```
new val create(
  value: ILong val)
: ILong val^

```
 #### Parameters

 * value: [ILong](index) val

 #### Returns

 * [ILong](index) val^

 ### from[A: (([I8](builtin-i8) val | [I16](builtin-i16) val | [I32](builtin-i32) val | [I64](builtin-i64) val | [I128](builtin-i128) val | [ILong](index) val | [ISize](builtin-isize) val | [U8](builtin-u8) val | [U16](builtin-u16) val | [U32](builtin-u32) val | [U64](builtin-u64) val | [U128](builtin-u128) val | [ULong](builtin-ulong) val | [USize](builtin-usize) val | [F32](builtin-f32) val | [F64](builtin-f64) val) & [Real](builtin-real)[A] val)]

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L374)

 
```
new val from[A: ((I8 val | I16 val | I32 val | 
    I64 val | I128 val | ILong val | 
    ISize val | U8 val | U16 val | 
    U32 val | U64 val | U128 val | 
    ULong val | USize val | F32 val | 
    F64 val) & Real[A] val)](
  a: A)
: ILong val^

```
 #### Parameters

 * a: A

 #### Returns

 * [ILong](index) val^

 ### min\_value

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L376)

 
```
new val min_value()
: ILong val^

```
 #### Returns

 * [ILong](index) val^

 ### max\_value

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L383)

 
```
new val max_value()
: ILong val^

```
 #### Returns

 * [ILong](index) val^

 Public Functions
----------------

 ### abs

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L390)

 
```
fun box abs()
: ULong val

```
 #### Returns

 * [ULong](builtin-ulong) val

 ### bit\_reverse

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L392)

 
```
fun box bit_reverse()
: ILong val

```
 #### Returns

 * [ILong](index) val

 ### bswap

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L399)

 
```
fun box bswap()
: ILong val

```
 #### Returns

 * [ILong](index) val

 ### popcount

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L406)

 
```
fun box popcount()
: ULong val

```
 #### Returns

 * [ULong](builtin-ulong) val

 ### clz

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L413)

 
```
fun box clz()
: ULong val

```
 #### Returns

 * [ULong](builtin-ulong) val

 ### ctz

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L420)

 
```
fun box ctz()
: ULong val

```
 #### Returns

 * [ULong](builtin-ulong) val

 ### clz\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L427)

 
```
fun box clz_unsafe()
: ULong val

```
 #### Returns

 * [ULong](builtin-ulong) val

 ### ctz\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L434)

 
```
fun box ctz_unsafe()
: ULong val

```
 #### Returns

 * [ULong](builtin-ulong) val

 ### bitwidth

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L441)

 
```
fun box bitwidth()
: ULong val

```
 #### Returns

 * [ULong](builtin-ulong) val

 ### bytewidth

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L443)

 
```
fun box bytewidth()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### min

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L445)

 
```
fun box min(
  y: ILong val)
: ILong val

```
 #### Parameters

 * y: [ILong](index) val

 #### Returns

 * [ILong](index) val

 ### max

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L446)

 
```
fun box max(
  y: ILong val)
: ILong val

```
 #### Parameters

 * y: [ILong](index) val

 #### Returns

 * [ILong](index) val

 ### fld

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L448)

 
```
fun box fld(
  y: ILong val)
: ILong val

```
 #### Parameters

 * y: [ILong](index) val

 #### Returns

 * [ILong](index) val

 ### fld\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L451)

 
```
fun box fld_unsafe(
  y: ILong val)
: ILong val

```
 #### Parameters

 * y: [ILong](index) val

 #### Returns

 * [ILong](index) val

 ### mod

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L454)

 
```
fun box mod(
  y: ILong val)
: ILong val

```
 #### Parameters

 * y: [ILong](index) val

 #### Returns

 * [ILong](index) val

 ### mod\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L457)

 
```
fun box mod_unsafe(
  y: ILong val)
: ILong val

```
 #### Parameters

 * y: [ILong](index) val

 #### Returns

 * [ILong](index) val

 ### hash

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L460)

 
```
fun box hash()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### addc

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L462)

 
```
fun box addc(
  y: ILong val)
: (ILong val , Bool val)

```
 #### Parameters

 * y: [ILong](index) val

 #### Returns

 * ([ILong](index) val , [Bool](builtin-bool) val)

 ### subc

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L469)

 
```
fun box subc(
  y: ILong val)
: (ILong val , Bool val)

```
 #### Parameters

 * y: [ILong](index) val

 #### Returns

 * ([ILong](index) val , [Bool](builtin-bool) val)

 ### mulc

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L476)

 
```
fun box mulc(
  y: ILong val)
: (ILong val , Bool val)

```
 #### Parameters

 * y: [ILong](index) val

 #### Returns

 * ([ILong](index) val , [Bool](builtin-bool) val)

 ### divc

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L483)

 
```
fun box divc(
  y: ILong val)
: (ILong val , Bool val)

```
 #### Parameters

 * y: [ILong](index) val

 #### Returns

 * ([ILong](index) val , [Bool](builtin-bool) val)

 ### remc

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L486)

 
```
fun box remc(
  y: ILong val)
: (ILong val , Bool val)

```
 #### Parameters

 * y: [ILong](index) val

 #### Returns

 * ([ILong](index) val , [Bool](builtin-bool) val)

 ### fldc

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L489)

 
```
fun box fldc(
  y: ILong val)
: (ILong val , Bool val)

```
 #### Parameters

 * y: [ILong](index) val

 #### Returns

 * ([ILong](index) val , [Bool](builtin-bool) val)

 ### modc

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L492)

 
```
fun box modc(
  y: ILong val)
: (ILong val , Bool val)

```
 #### Parameters

 * y: [ILong](index) val

 #### Returns

 * ([ILong](index) val , [Bool](builtin-bool) val)

 ### add\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L495)

 
```
fun box add_partial(
  y: ILong val)
: ILong val ?

```
 #### Parameters

 * y: [ILong](index) val

 #### Returns

 * [ILong](index) val ?

 ### sub\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L498)

 
```
fun box sub_partial(
  y: ILong val)
: ILong val ?

```
 #### Parameters

 * y: [ILong](index) val

 #### Returns

 * [ILong](index) val ?

 ### mul\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L501)

 
```
fun box mul_partial(
  y: ILong val)
: ILong val ?

```
 #### Parameters

 * y: [ILong](index) val

 #### Returns

 * [ILong](index) val ?

 ### div\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L504)

 
```
fun box div_partial(
  y: ILong val)
: ILong val ?

```
 #### Parameters

 * y: [ILong](index) val

 #### Returns

 * [ILong](index) val ?

 ### rem\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L507)

 
```
fun box rem_partial(
  y: ILong val)
: ILong val ?

```
 #### Parameters

 * y: [ILong](index) val

 #### Returns

 * [ILong](index) val ?

 ### divrem\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L510)

 
```
fun box divrem_partial(
  y: ILong val)
: (ILong val , ILong val) ?

```
 #### Parameters

 * y: [ILong](index) val

 #### Returns

 * ([ILong](index) val , [ILong](index) val) ?

 ### fld\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L513)

 
```
fun box fld_partial(
  y: ILong val)
: ILong val ?

```
 #### Parameters

 * y: [ILong](index) val

 #### Returns

 * [ILong](index) val ?

 ### mod\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L516)

 
```
fun box mod_partial(
  y: ILong val)
: ILong val ?

```
 #### Parameters

 * y: [ILong](index) val

 #### Returns

 * [ILong](index) val ?

 ### shl

 
```
fun box shl(
  y: ULong val)
: ILong val

```
 #### Parameters

 * y: [ULong](builtin-ulong) val

 #### Returns

 * [ILong](index) val

 ### shr

 
```
fun box shr(
  y: ULong val)
: ILong val

```
 #### Parameters

 * y: [ULong](builtin-ulong) val

 #### Returns

 * [ILong](index) val

 ### shl\_unsafe

 
```
fun box shl_unsafe(
  y: ULong val)
: ILong val

```
 #### Parameters

 * y: [ULong](builtin-ulong) val

 #### Returns

 * [ILong](index) val

 ### shr\_unsafe

 
```
fun box shr_unsafe(
  y: ULong val)
: ILong val

```
 #### Parameters

 * y: [ULong](builtin-ulong) val

 #### Returns

 * [ILong](index) val

 ### string

 
```
fun box string()
: String iso^

```
 #### Returns

 * [String](builtin-string) iso^

 ### add\_unsafe

 
```
fun box add_unsafe(
  y: ILong val)
: ILong val

```
 #### Parameters

 * y: [ILong](index) val

 #### Returns

 * [ILong](index) val

 ### sub\_unsafe

 
```
fun box sub_unsafe(
  y: ILong val)
: ILong val

```
 #### Parameters

 * y: [ILong](index) val

 #### Returns

 * [ILong](index) val

 ### mul\_unsafe

 
```
fun box mul_unsafe(
  y: ILong val)
: ILong val

```
 #### Parameters

 * y: [ILong](index) val

 #### Returns

 * [ILong](index) val

 ### div\_unsafe

 
```
fun box div_unsafe(
  y: ILong val)
: ILong val

```
 #### Parameters

 * y: [ILong](index) val

 #### Returns

 * [ILong](index) val

 ### divrem\_unsafe

 
```
fun box divrem_unsafe(
  y: ILong val)
: (ILong val , ILong val)

```
 #### Parameters

 * y: [ILong](index) val

 #### Returns

 * ([ILong](index) val , [ILong](index) val)

 ### rem\_unsafe

 
```
fun box rem_unsafe(
  y: ILong val)
: ILong val

```
 #### Parameters

 * y: [ILong](index) val

 #### Returns

 * [ILong](index) val

 ### neg\_unsafe

 
```
fun box neg_unsafe()
: ILong val

```
 #### Returns

 * [ILong](index) val

 ### op\_and

 
```
fun box op_and(
  y: ILong val)
: ILong val

```
 #### Parameters

 * y: [ILong](index) val

 #### Returns

 * [ILong](index) val

 ### op\_or

 
```
fun box op_or(
  y: ILong val)
: ILong val

```
 #### Parameters

 * y: [ILong](index) val

 #### Returns

 * [ILong](index) val

 ### op\_xor

 
```
fun box op_xor(
  y: ILong val)
: ILong val

```
 #### Parameters

 * y: [ILong](index) val

 #### Returns

 * [ILong](index) val

 ### op\_not

 
```
fun box op_not()
: ILong val

```
 #### Returns

 * [ILong](index) val

 ### add

 
```
fun box add(
  y: ILong val)
: ILong val

```
 #### Parameters

 * y: [ILong](index) val

 #### Returns

 * [ILong](index) val

 ### sub

 
```
fun box sub(
  y: ILong val)
: ILong val

```
 #### Parameters

 * y: [ILong](index) val

 #### Returns

 * [ILong](index) val

 ### mul

 
```
fun box mul(
  y: ILong val)
: ILong val

```
 #### Parameters

 * y: [ILong](index) val

 #### Returns

 * [ILong](index) val

 ### div

 
```
fun box div(
  y: ILong val)
: ILong val

```
 #### Parameters

 * y: [ILong](index) val

 #### Returns

 * [ILong](index) val

 ### divrem

 
```
fun box divrem(
  y: ILong val)
: (ILong val , ILong val)

```
 #### Parameters

 * y: [ILong](index) val

 #### Returns

 * ([ILong](index) val , [ILong](index) val)

 ### rem

 
```
fun box rem(
  y: ILong val)
: ILong val

```
 #### Parameters

 * y: [ILong](index) val

 #### Returns

 * [ILong](index) val

 ### neg

 
```
fun box neg()
: ILong val

```
 #### Returns

 * [ILong](index) val

 ### eq

 
```
fun box eq(
  y: ILong val)
: Bool val

```
 #### Parameters

 * y: [ILong](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 
```
fun box ne(
  y: ILong val)
: Bool val

```
 #### Parameters

 * y: [ILong](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### lt

 
```
fun box lt(
  y: ILong val)
: Bool val

```
 #### Parameters

 * y: [ILong](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### le

 
```
fun box le(
  y: ILong val)
: Bool val

```
 #### Parameters

 * y: [ILong](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ge

 
```
fun box ge(
  y: ILong val)
: Bool val

```
 #### Parameters

 * y: [ILong](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### gt

 
```
fun box gt(
  y: ILong val)
: Bool val

```
 #### Parameters

 * y: [ILong](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### hash64

 
```
fun box hash64()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### i8

 
```
fun box i8()
: I8 val

```
 #### Returns

 * [I8](builtin-i8) val

 ### i16

 
```
fun box i16()
: I16 val

```
 #### Returns

 * [I16](builtin-i16) val

 ### i32

 
```
fun box i32()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### i64

 
```
fun box i64()
: I64 val

```
 #### Returns

 * [I64](builtin-i64) val

 ### i128

 
```
fun box i128()
: I128 val

```
 #### Returns

 * [I128](builtin-i128) val

 ### ilong

 
```
fun box ilong()
: ILong val

```
 #### Returns

 * [ILong](index) val

 ### isize

 
```
fun box isize()
: ISize val

```
 #### Returns

 * [ISize](builtin-isize) val

 ### u8

 
```
fun box u8()
: U8 val

```
 #### Returns

 * [U8](builtin-u8) val

 ### u16

 
```
fun box u16()
: U16 val

```
 #### Returns

 * [U16](builtin-u16) val

 ### u32

 
```
fun box u32()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### u64

 
```
fun box u64()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### u128

 
```
fun box u128()
: U128 val

```
 #### Returns

 * [U128](builtin-u128) val

 ### ulong

 
```
fun box ulong()
: ULong val

```
 #### Returns

 * [ULong](builtin-ulong) val

 ### usize

 
```
fun box usize()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### f32

 
```
fun box f32()
: F32 val

```
 #### Returns

 * [F32](builtin-f32) val

 ### f64

 
```
fun box f64()
: F64 val

```
 #### Returns

 * [F64](builtin-f64) val

 ### i8\_unsafe

 
```
fun box i8_unsafe()
: I8 val

```
 #### Returns

 * [I8](builtin-i8) val

 ### i16\_unsafe

 
```
fun box i16_unsafe()
: I16 val

```
 #### Returns

 * [I16](builtin-i16) val

 ### i32\_unsafe

 
```
fun box i32_unsafe()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### i64\_unsafe

 
```
fun box i64_unsafe()
: I64 val

```
 #### Returns

 * [I64](builtin-i64) val

 ### i128\_unsafe

 
```
fun box i128_unsafe()
: I128 val

```
 #### Returns

 * [I128](builtin-i128) val

 ### ilong\_unsafe

 
```
fun box ilong_unsafe()
: ILong val

```
 #### Returns

 * [ILong](index) val

 ### isize\_unsafe

 
```
fun box isize_unsafe()
: ISize val

```
 #### Returns

 * [ISize](builtin-isize) val

 ### u8\_unsafe

 
```
fun box u8_unsafe()
: U8 val

```
 #### Returns

 * [U8](builtin-u8) val

 ### u16\_unsafe

 
```
fun box u16_unsafe()
: U16 val

```
 #### Returns

 * [U16](builtin-u16) val

 ### u32\_unsafe

 
```
fun box u32_unsafe()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### u64\_unsafe

 
```
fun box u64_unsafe()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### u128\_unsafe

 
```
fun box u128_unsafe()
: U128 val

```
 #### Returns

 * [U128](builtin-u128) val

 ### ulong\_unsafe

 
```
fun box ulong_unsafe()
: ULong val

```
 #### Returns

 * [ULong](builtin-ulong) val

 ### usize\_unsafe

 
```
fun box usize_unsafe()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### f32\_unsafe

 
```
fun box f32_unsafe()
: F32 val

```
 #### Returns

 * [F32](builtin-f32) val

 ### f64\_unsafe

 
```
fun box f64_unsafe()
: F64 val

```
 #### Returns

 * [F64](builtin-f64) val

 ### compare

 
```
fun box compare(
  that: ILong val)
: (Less val | Equal val | Greater val)

```
 #### Parameters

 * that: [ILong](index) val

 #### Returns

 * ([Less](builtin-less) val | [Equal](builtin-equal) val | [Greater](builtin-greater) val)



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/builtin-ILong>

I8
==

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L1)

 
```
primitive val I8 is
  SignedInteger[I8 val, U8 val] val

```
 #### Implements

 * [SignedInteger](builtin-signedinteger)[[I8](index) val, [U8](builtin-u8) val] val

 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L2)

 
```
new val create(
  value: I8 val)
: I8 val^

```
 #### Parameters

 * value: [I8](index) val

 #### Returns

 * [I8](index) val^

 ### from[A: (([I8](index) val | [I16](builtin-i16) val | [I32](builtin-i32) val | [I64](builtin-i64) val | [I128](builtin-i128) val | [ILong](builtin-ilong) val | [ISize](builtin-isize) val | [U8](builtin-u8) val | [U16](builtin-u16) val | [U32](builtin-u32) val | [U64](builtin-u64) val | [U128](builtin-u128) val | [ULong](builtin-ulong) val | [USize](builtin-usize) val | [F32](builtin-f32) val | [F64](builtin-f64) val) & [Real](builtin-real)[A] val)]

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L3)

 
```
new val from[A: ((I8 val | I16 val | I32 val | 
    I64 val | I128 val | ILong val | 
    ISize val | U8 val | U16 val | 
    U32 val | U64 val | U128 val | 
    ULong val | USize val | F32 val | 
    F64 val) & Real[A] val)](
  a: A)
: I8 val^

```
 #### Parameters

 * a: A

 #### Returns

 * [I8](index) val^

 ### min\_value

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L5)

 
```
new val min_value()
: I8 val^

```
 #### Returns

 * [I8](index) val^

 ### max\_value

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L6)

 
```
new val max_value()
: I8 val^

```
 #### Returns

 * [I8](index) val^

 Public Functions
----------------

 ### abs

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L8)

 
```
fun box abs()
: U8 val

```
 #### Returns

 * [U8](builtin-u8) val

 ### bit\_reverse

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L9)

 
```
fun box bit_reverse()
: I8 val

```
 #### Returns

 * [I8](index) val

 ### bswap

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L10)

 
```
fun box bswap()
: I8 val

```
 #### Returns

 * [I8](index) val

 ### popcount

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L11)

 
```
fun box popcount()
: U8 val

```
 #### Returns

 * [U8](builtin-u8) val

 ### clz

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L12)

 
```
fun box clz()
: U8 val

```
 #### Returns

 * [U8](builtin-u8) val

 ### ctz

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L13)

 
```
fun box ctz()
: U8 val

```
 #### Returns

 * [U8](builtin-u8) val

 ### clz\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L15)

 Unsafe operation. If this is 0, the result is undefined.

 
```
fun box clz_unsafe()
: U8 val

```
 #### Returns

 * [U8](builtin-u8) val

 ### ctz\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L22)

 Unsafe operation. If this is 0, the result is undefined.

 
```
fun box ctz_unsafe()
: U8 val

```
 #### Returns

 * [U8](builtin-u8) val

 ### bitwidth

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L29)

 
```
fun box bitwidth()
: U8 val

```
 #### Returns

 * [U8](builtin-u8) val

 ### bytewidth

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L31)

 
```
fun box bytewidth()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### min

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L33)

 
```
fun box min(
  y: I8 val)
: I8 val

```
 #### Parameters

 * y: [I8](index) val

 #### Returns

 * [I8](index) val

 ### max

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L34)

 
```
fun box max(
  y: I8 val)
: I8 val

```
 #### Parameters

 * y: [I8](index) val

 #### Returns

 * [I8](index) val

 ### fld

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L36)

 
```
fun box fld(
  y: I8 val)
: I8 val

```
 #### Parameters

 * y: [I8](index) val

 #### Returns

 * [I8](index) val

 ### fld\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L39)

 
```
fun box fld_unsafe(
  y: I8 val)
: I8 val

```
 #### Parameters

 * y: [I8](index) val

 #### Returns

 * [I8](index) val

 ### mod

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L42)

 
```
fun box mod(
  y: I8 val)
: I8 val

```
 #### Parameters

 * y: [I8](index) val

 #### Returns

 * [I8](index) val

 ### mod\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L45)

 
```
fun box mod_unsafe(
  y: I8 val)
: I8 val

```
 #### Parameters

 * y: [I8](index) val

 #### Returns

 * [I8](index) val

 ### addc

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L48)

 
```
fun box addc(
  y: I8 val)
: (I8 val , Bool val)

```
 #### Parameters

 * y: [I8](index) val

 #### Returns

 * ([I8](index) val , [Bool](builtin-bool) val)

 ### subc

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L51)

 
```
fun box subc(
  y: I8 val)
: (I8 val , Bool val)

```
 #### Parameters

 * y: [I8](index) val

 #### Returns

 * ([I8](index) val , [Bool](builtin-bool) val)

 ### mulc

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L54)

 
```
fun box mulc(
  y: I8 val)
: (I8 val , Bool val)

```
 #### Parameters

 * y: [I8](index) val

 #### Returns

 * ([I8](index) val , [Bool](builtin-bool) val)

 ### divc

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L57)

 
```
fun box divc(
  y: I8 val)
: (I8 val , Bool val)

```
 #### Parameters

 * y: [I8](index) val

 #### Returns

 * ([I8](index) val , [Bool](builtin-bool) val)

 ### remc

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L60)

 
```
fun box remc(
  y: I8 val)
: (I8 val , Bool val)

```
 #### Parameters

 * y: [I8](index) val

 #### Returns

 * ([I8](index) val , [Bool](builtin-bool) val)

 ### fldc

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L63)

 
```
fun box fldc(
  y: I8 val)
: (I8 val , Bool val)

```
 #### Parameters

 * y: [I8](index) val

 #### Returns

 * ([I8](index) val , [Bool](builtin-bool) val)

 ### modc

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L66)

 
```
fun box modc(
  y: I8 val)
: (I8 val , Bool val)

```
 #### Parameters

 * y: [I8](index) val

 #### Returns

 * ([I8](index) val , [Bool](builtin-bool) val)

 ### add\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L69)

 
```
fun box add_partial(
  y: I8 val)
: I8 val ?

```
 #### Parameters

 * y: [I8](index) val

 #### Returns

 * [I8](index) val ?

 ### sub\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L72)

 
```
fun box sub_partial(
  y: I8 val)
: I8 val ?

```
 #### Parameters

 * y: [I8](index) val

 #### Returns

 * [I8](index) val ?

 ### mul\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L75)

 
```
fun box mul_partial(
  y: I8 val)
: I8 val ?

```
 #### Parameters

 * y: [I8](index) val

 #### Returns

 * [I8](index) val ?

 ### div\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L78)

 
```
fun box div_partial(
  y: I8 val)
: I8 val ?

```
 #### Parameters

 * y: [I8](index) val

 #### Returns

 * [I8](index) val ?

 ### rem\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L81)

 
```
fun box rem_partial(
  y: I8 val)
: I8 val ?

```
 #### Parameters

 * y: [I8](index) val

 #### Returns

 * [I8](index) val ?

 ### divrem\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L84)

 
```
fun box divrem_partial(
  y: I8 val)
: (I8 val , I8 val) ?

```
 #### Parameters

 * y: [I8](index) val

 #### Returns

 * ([I8](index) val , [I8](index) val) ?

 ### fld\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L87)

 
```
fun box fld_partial(
  y: I8 val)
: I8 val ?

```
 #### Parameters

 * y: [I8](index) val

 #### Returns

 * [I8](index) val ?

 ### mod\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L90)

 
```
fun box mod_partial(
  y: I8 val)
: I8 val ?

```
 #### Parameters

 * y: [I8](index) val

 #### Returns

 * [I8](index) val ?

 ### shl

 
```
fun box shl(
  y: U8 val)
: I8 val

```
 #### Parameters

 * y: [U8](builtin-u8) val

 #### Returns

 * [I8](index) val

 ### shr

 
```
fun box shr(
  y: U8 val)
: I8 val

```
 #### Parameters

 * y: [U8](builtin-u8) val

 #### Returns

 * [I8](index) val

 ### shl\_unsafe

 
```
fun box shl_unsafe(
  y: U8 val)
: I8 val

```
 #### Parameters

 * y: [U8](builtin-u8) val

 #### Returns

 * [I8](index) val

 ### shr\_unsafe

 
```
fun box shr_unsafe(
  y: U8 val)
: I8 val

```
 #### Parameters

 * y: [U8](builtin-u8) val

 #### Returns

 * [I8](index) val

 ### string

 
```
fun box string()
: String iso^

```
 #### Returns

 * [String](builtin-string) iso^

 ### add\_unsafe

 
```
fun box add_unsafe(
  y: I8 val)
: I8 val

```
 #### Parameters

 * y: [I8](index) val

 #### Returns

 * [I8](index) val

 ### sub\_unsafe

 
```
fun box sub_unsafe(
  y: I8 val)
: I8 val

```
 #### Parameters

 * y: [I8](index) val

 #### Returns

 * [I8](index) val

 ### mul\_unsafe

 
```
fun box mul_unsafe(
  y: I8 val)
: I8 val

```
 #### Parameters

 * y: [I8](index) val

 #### Returns

 * [I8](index) val

 ### div\_unsafe

 
```
fun box div_unsafe(
  y: I8 val)
: I8 val

```
 #### Parameters

 * y: [I8](index) val

 #### Returns

 * [I8](index) val

 ### divrem\_unsafe

 
```
fun box divrem_unsafe(
  y: I8 val)
: (I8 val , I8 val)

```
 #### Parameters

 * y: [I8](index) val

 #### Returns

 * ([I8](index) val , [I8](index) val)

 ### rem\_unsafe

 
```
fun box rem_unsafe(
  y: I8 val)
: I8 val

```
 #### Parameters

 * y: [I8](index) val

 #### Returns

 * [I8](index) val

 ### neg\_unsafe

 
```
fun box neg_unsafe()
: I8 val

```
 #### Returns

 * [I8](index) val

 ### op\_and

 
```
fun box op_and(
  y: I8 val)
: I8 val

```
 #### Parameters

 * y: [I8](index) val

 #### Returns

 * [I8](index) val

 ### op\_or

 
```
fun box op_or(
  y: I8 val)
: I8 val

```
 #### Parameters

 * y: [I8](index) val

 #### Returns

 * [I8](index) val

 ### op\_xor

 
```
fun box op_xor(
  y: I8 val)
: I8 val

```
 #### Parameters

 * y: [I8](index) val

 #### Returns

 * [I8](index) val

 ### op\_not

 
```
fun box op_not()
: I8 val

```
 #### Returns

 * [I8](index) val

 ### add

 
```
fun box add(
  y: I8 val)
: I8 val

```
 #### Parameters

 * y: [I8](index) val

 #### Returns

 * [I8](index) val

 ### sub

 
```
fun box sub(
  y: I8 val)
: I8 val

```
 #### Parameters

 * y: [I8](index) val

 #### Returns

 * [I8](index) val

 ### mul

 
```
fun box mul(
  y: I8 val)
: I8 val

```
 #### Parameters

 * y: [I8](index) val

 #### Returns

 * [I8](index) val

 ### div

 
```
fun box div(
  y: I8 val)
: I8 val

```
 #### Parameters

 * y: [I8](index) val

 #### Returns

 * [I8](index) val

 ### divrem

 
```
fun box divrem(
  y: I8 val)
: (I8 val , I8 val)

```
 #### Parameters

 * y: [I8](index) val

 #### Returns

 * ([I8](index) val , [I8](index) val)

 ### rem

 
```
fun box rem(
  y: I8 val)
: I8 val

```
 #### Parameters

 * y: [I8](index) val

 #### Returns

 * [I8](index) val

 ### neg

 
```
fun box neg()
: I8 val

```
 #### Returns

 * [I8](index) val

 ### eq

 
```
fun box eq(
  y: I8 val)
: Bool val

```
 #### Parameters

 * y: [I8](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 
```
fun box ne(
  y: I8 val)
: Bool val

```
 #### Parameters

 * y: [I8](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### lt

 
```
fun box lt(
  y: I8 val)
: Bool val

```
 #### Parameters

 * y: [I8](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### le

 
```
fun box le(
  y: I8 val)
: Bool val

```
 #### Parameters

 * y: [I8](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ge

 
```
fun box ge(
  y: I8 val)
: Bool val

```
 #### Parameters

 * y: [I8](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### gt

 
```
fun box gt(
  y: I8 val)
: Bool val

```
 #### Parameters

 * y: [I8](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### hash

 
```
fun box hash()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### hash64

 
```
fun box hash64()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### i8

 
```
fun box i8()
: I8 val

```
 #### Returns

 * [I8](index) val

 ### i16

 
```
fun box i16()
: I16 val

```
 #### Returns

 * [I16](builtin-i16) val

 ### i32

 
```
fun box i32()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### i64

 
```
fun box i64()
: I64 val

```
 #### Returns

 * [I64](builtin-i64) val

 ### i128

 
```
fun box i128()
: I128 val

```
 #### Returns

 * [I128](builtin-i128) val

 ### ilong

 
```
fun box ilong()
: ILong val

```
 #### Returns

 * [ILong](builtin-ilong) val

 ### isize

 
```
fun box isize()
: ISize val

```
 #### Returns

 * [ISize](builtin-isize) val

 ### u8

 
```
fun box u8()
: U8 val

```
 #### Returns

 * [U8](builtin-u8) val

 ### u16

 
```
fun box u16()
: U16 val

```
 #### Returns

 * [U16](builtin-u16) val

 ### u32

 
```
fun box u32()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### u64

 
```
fun box u64()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### u128

 
```
fun box u128()
: U128 val

```
 #### Returns

 * [U128](builtin-u128) val

 ### ulong

 
```
fun box ulong()
: ULong val

```
 #### Returns

 * [ULong](builtin-ulong) val

 ### usize

 
```
fun box usize()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### f32

 
```
fun box f32()
: F32 val

```
 #### Returns

 * [F32](builtin-f32) val

 ### f64

 
```
fun box f64()
: F64 val

```
 #### Returns

 * [F64](builtin-f64) val

 ### i8\_unsafe

 
```
fun box i8_unsafe()
: I8 val

```
 #### Returns

 * [I8](index) val

 ### i16\_unsafe

 
```
fun box i16_unsafe()
: I16 val

```
 #### Returns

 * [I16](builtin-i16) val

 ### i32\_unsafe

 
```
fun box i32_unsafe()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### i64\_unsafe

 
```
fun box i64_unsafe()
: I64 val

```
 #### Returns

 * [I64](builtin-i64) val

 ### i128\_unsafe

 
```
fun box i128_unsafe()
: I128 val

```
 #### Returns

 * [I128](builtin-i128) val

 ### ilong\_unsafe

 
```
fun box ilong_unsafe()
: ILong val

```
 #### Returns

 * [ILong](builtin-ilong) val

 ### isize\_unsafe

 
```
fun box isize_unsafe()
: ISize val

```
 #### Returns

 * [ISize](builtin-isize) val

 ### u8\_unsafe

 
```
fun box u8_unsafe()
: U8 val

```
 #### Returns

 * [U8](builtin-u8) val

 ### u16\_unsafe

 
```
fun box u16_unsafe()
: U16 val

```
 #### Returns

 * [U16](builtin-u16) val

 ### u32\_unsafe

 
```
fun box u32_unsafe()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### u64\_unsafe

 
```
fun box u64_unsafe()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### u128\_unsafe

 
```
fun box u128_unsafe()
: U128 val

```
 #### Returns

 * [U128](builtin-u128) val

 ### ulong\_unsafe

 
```
fun box ulong_unsafe()
: ULong val

```
 #### Returns

 * [ULong](builtin-ulong) val

 ### usize\_unsafe

 
```
fun box usize_unsafe()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### f32\_unsafe

 
```
fun box f32_unsafe()
: F32 val

```
 #### Returns

 * [F32](builtin-f32) val

 ### f64\_unsafe

 
```
fun box f64_unsafe()
: F64 val

```
 #### Returns

 * [F64](builtin-f64) val

 ### compare

 
```
fun box compare(
  that: I8 val)
: (Less val | Equal val | Greater val)

```
 #### Parameters

 * that: [I8](index) val

 #### Returns

 * ([Less](builtin-less) val | [Equal](builtin-equal) val | [Greater](builtin-greater) val)



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/builtin-I8>

I16
===

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L93)

 
```
primitive val I16 is
  SignedInteger[I16 val, U16 val] val

```
 #### Implements

 * [SignedInteger](builtin-signedinteger)[[I16](index) val, [U16](builtin-u16) val] val

 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L94)

 
```
new val create(
  value: I16 val)
: I16 val^

```
 #### Parameters

 * value: [I16](index) val

 #### Returns

 * [I16](index) val^

 ### from[A: (([I8](builtin-i8) val | [I16](index) val | [I32](builtin-i32) val | [I64](builtin-i64) val | [I128](builtin-i128) val | [ILong](builtin-ilong) val | [ISize](builtin-isize) val | [U8](builtin-u8) val | [U16](builtin-u16) val | [U32](builtin-u32) val | [U64](builtin-u64) val | [U128](builtin-u128) val | [ULong](builtin-ulong) val | [USize](builtin-usize) val | [F32](builtin-f32) val | [F64](builtin-f64) val) & [Real](builtin-real)[A] val)]

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L95)

 
```
new val from[A: ((I8 val | I16 val | I32 val | 
    I64 val | I128 val | ILong val | 
    ISize val | U8 val | U16 val | 
    U32 val | U64 val | U128 val | 
    ULong val | USize val | F32 val | 
    F64 val) & Real[A] val)](
  a: A)
: I16 val^

```
 #### Parameters

 * a: A

 #### Returns

 * [I16](index) val^

 ### min\_value

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L97)

 
```
new val min_value()
: I16 val^

```
 #### Returns

 * [I16](index) val^

 ### max\_value

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L98)

 
```
new val max_value()
: I16 val^

```
 #### Returns

 * [I16](index) val^

 Public Functions
----------------

 ### abs

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L100)

 
```
fun box abs()
: U16 val

```
 #### Returns

 * [U16](builtin-u16) val

 ### bit\_reverse

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L101)

 
```
fun box bit_reverse()
: I16 val

```
 #### Returns

 * [I16](index) val

 ### bswap

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L102)

 
```
fun box bswap()
: I16 val

```
 #### Returns

 * [I16](index) val

 ### popcount

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L103)

 
```
fun box popcount()
: U16 val

```
 #### Returns

 * [U16](builtin-u16) val

 ### clz

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L104)

 
```
fun box clz()
: U16 val

```
 #### Returns

 * [U16](builtin-u16) val

 ### ctz

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L105)

 
```
fun box ctz()
: U16 val

```
 #### Returns

 * [U16](builtin-u16) val

 ### clz\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L107)

 Unsafe operation. If this is 0, the result is undefined.

 
```
fun box clz_unsafe()
: U16 val

```
 #### Returns

 * [U16](builtin-u16) val

 ### ctz\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L114)

 Unsafe operation. If this is 0, the result is undefined.

 
```
fun box ctz_unsafe()
: U16 val

```
 #### Returns

 * [U16](builtin-u16) val

 ### bitwidth

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L121)

 
```
fun box bitwidth()
: U16 val

```
 #### Returns

 * [U16](builtin-u16) val

 ### bytewidth

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L123)

 
```
fun box bytewidth()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### min

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L125)

 
```
fun box min(
  y: I16 val)
: I16 val

```
 #### Parameters

 * y: [I16](index) val

 #### Returns

 * [I16](index) val

 ### max

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L126)

 
```
fun box max(
  y: I16 val)
: I16 val

```
 #### Parameters

 * y: [I16](index) val

 #### Returns

 * [I16](index) val

 ### fld

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L128)

 
```
fun box fld(
  y: I16 val)
: I16 val

```
 #### Parameters

 * y: [I16](index) val

 #### Returns

 * [I16](index) val

 ### fld\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L131)

 
```
fun box fld_unsafe(
  y: I16 val)
: I16 val

```
 #### Parameters

 * y: [I16](index) val

 #### Returns

 * [I16](index) val

 ### mod

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L134)

 
```
fun box mod(
  y: I16 val)
: I16 val

```
 #### Parameters

 * y: [I16](index) val

 #### Returns

 * [I16](index) val

 ### mod\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L137)

 
```
fun box mod_unsafe(
  y: I16 val)
: I16 val

```
 #### Parameters

 * y: [I16](index) val

 #### Returns

 * [I16](index) val

 ### addc

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L140)

 
```
fun box addc(
  y: I16 val)
: (I16 val , Bool val)

```
 #### Parameters

 * y: [I16](index) val

 #### Returns

 * ([I16](index) val , [Bool](builtin-bool) val)

 ### subc

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L143)

 
```
fun box subc(
  y: I16 val)
: (I16 val , Bool val)

```
 #### Parameters

 * y: [I16](index) val

 #### Returns

 * ([I16](index) val , [Bool](builtin-bool) val)

 ### mulc

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L146)

 
```
fun box mulc(
  y: I16 val)
: (I16 val , Bool val)

```
 #### Parameters

 * y: [I16](index) val

 #### Returns

 * ([I16](index) val , [Bool](builtin-bool) val)

 ### divc

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L149)

 
```
fun box divc(
  y: I16 val)
: (I16 val , Bool val)

```
 #### Parameters

 * y: [I16](index) val

 #### Returns

 * ([I16](index) val , [Bool](builtin-bool) val)

 ### remc

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L152)

 
```
fun box remc(
  y: I16 val)
: (I16 val , Bool val)

```
 #### Parameters

 * y: [I16](index) val

 #### Returns

 * ([I16](index) val , [Bool](builtin-bool) val)

 ### fldc

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L155)

 
```
fun box fldc(
  y: I16 val)
: (I16 val , Bool val)

```
 #### Parameters

 * y: [I16](index) val

 #### Returns

 * ([I16](index) val , [Bool](builtin-bool) val)

 ### modc

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L158)

 
```
fun box modc(
  y: I16 val)
: (I16 val , Bool val)

```
 #### Parameters

 * y: [I16](index) val

 #### Returns

 * ([I16](index) val , [Bool](builtin-bool) val)

 ### add\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L161)

 
```
fun box add_partial(
  y: I16 val)
: I16 val ?

```
 #### Parameters

 * y: [I16](index) val

 #### Returns

 * [I16](index) val ?

 ### sub\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L164)

 
```
fun box sub_partial(
  y: I16 val)
: I16 val ?

```
 #### Parameters

 * y: [I16](index) val

 #### Returns

 * [I16](index) val ?

 ### mul\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L167)

 
```
fun box mul_partial(
  y: I16 val)
: I16 val ?

```
 #### Parameters

 * y: [I16](index) val

 #### Returns

 * [I16](index) val ?

 ### div\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L170)

 
```
fun box div_partial(
  y: I16 val)
: I16 val ?

```
 #### Parameters

 * y: [I16](index) val

 #### Returns

 * [I16](index) val ?

 ### rem\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L173)

 
```
fun box rem_partial(
  y: I16 val)
: I16 val ?

```
 #### Parameters

 * y: [I16](index) val

 #### Returns

 * [I16](index) val ?

 ### divrem\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L176)

 
```
fun box divrem_partial(
  y: I16 val)
: (I16 val , I16 val) ?

```
 #### Parameters

 * y: [I16](index) val

 #### Returns

 * ([I16](index) val , [I16](index) val) ?

 ### fld\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L179)

 
```
fun box fld_partial(
  y: I16 val)
: I16 val ?

```
 #### Parameters

 * y: [I16](index) val

 #### Returns

 * [I16](index) val ?

 ### mod\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L182)

 
```
fun box mod_partial(
  y: I16 val)
: I16 val ?

```
 #### Parameters

 * y: [I16](index) val

 #### Returns

 * [I16](index) val ?

 ### shl

 
```
fun box shl(
  y: U16 val)
: I16 val

```
 #### Parameters

 * y: [U16](builtin-u16) val

 #### Returns

 * [I16](index) val

 ### shr

 
```
fun box shr(
  y: U16 val)
: I16 val

```
 #### Parameters

 * y: [U16](builtin-u16) val

 #### Returns

 * [I16](index) val

 ### shl\_unsafe

 
```
fun box shl_unsafe(
  y: U16 val)
: I16 val

```
 #### Parameters

 * y: [U16](builtin-u16) val

 #### Returns

 * [I16](index) val

 ### shr\_unsafe

 
```
fun box shr_unsafe(
  y: U16 val)
: I16 val

```
 #### Parameters

 * y: [U16](builtin-u16) val

 #### Returns

 * [I16](index) val

 ### string

 
```
fun box string()
: String iso^

```
 #### Returns

 * [String](builtin-string) iso^

 ### add\_unsafe

 
```
fun box add_unsafe(
  y: I16 val)
: I16 val

```
 #### Parameters

 * y: [I16](index) val

 #### Returns

 * [I16](index) val

 ### sub\_unsafe

 
```
fun box sub_unsafe(
  y: I16 val)
: I16 val

```
 #### Parameters

 * y: [I16](index) val

 #### Returns

 * [I16](index) val

 ### mul\_unsafe

 
```
fun box mul_unsafe(
  y: I16 val)
: I16 val

```
 #### Parameters

 * y: [I16](index) val

 #### Returns

 * [I16](index) val

 ### div\_unsafe

 
```
fun box div_unsafe(
  y: I16 val)
: I16 val

```
 #### Parameters

 * y: [I16](index) val

 #### Returns

 * [I16](index) val

 ### divrem\_unsafe

 
```
fun box divrem_unsafe(
  y: I16 val)
: (I16 val , I16 val)

```
 #### Parameters

 * y: [I16](index) val

 #### Returns

 * ([I16](index) val , [I16](index) val)

 ### rem\_unsafe

 
```
fun box rem_unsafe(
  y: I16 val)
: I16 val

```
 #### Parameters

 * y: [I16](index) val

 #### Returns

 * [I16](index) val

 ### neg\_unsafe

 
```
fun box neg_unsafe()
: I16 val

```
 #### Returns

 * [I16](index) val

 ### op\_and

 
```
fun box op_and(
  y: I16 val)
: I16 val

```
 #### Parameters

 * y: [I16](index) val

 #### Returns

 * [I16](index) val

 ### op\_or

 
```
fun box op_or(
  y: I16 val)
: I16 val

```
 #### Parameters

 * y: [I16](index) val

 #### Returns

 * [I16](index) val

 ### op\_xor

 
```
fun box op_xor(
  y: I16 val)
: I16 val

```
 #### Parameters

 * y: [I16](index) val

 #### Returns

 * [I16](index) val

 ### op\_not

 
```
fun box op_not()
: I16 val

```
 #### Returns

 * [I16](index) val

 ### add

 
```
fun box add(
  y: I16 val)
: I16 val

```
 #### Parameters

 * y: [I16](index) val

 #### Returns

 * [I16](index) val

 ### sub

 
```
fun box sub(
  y: I16 val)
: I16 val

```
 #### Parameters

 * y: [I16](index) val

 #### Returns

 * [I16](index) val

 ### mul

 
```
fun box mul(
  y: I16 val)
: I16 val

```
 #### Parameters

 * y: [I16](index) val

 #### Returns

 * [I16](index) val

 ### div

 
```
fun box div(
  y: I16 val)
: I16 val

```
 #### Parameters

 * y: [I16](index) val

 #### Returns

 * [I16](index) val

 ### divrem

 
```
fun box divrem(
  y: I16 val)
: (I16 val , I16 val)

```
 #### Parameters

 * y: [I16](index) val

 #### Returns

 * ([I16](index) val , [I16](index) val)

 ### rem

 
```
fun box rem(
  y: I16 val)
: I16 val

```
 #### Parameters

 * y: [I16](index) val

 #### Returns

 * [I16](index) val

 ### neg

 
```
fun box neg()
: I16 val

```
 #### Returns

 * [I16](index) val

 ### eq

 
```
fun box eq(
  y: I16 val)
: Bool val

```
 #### Parameters

 * y: [I16](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 
```
fun box ne(
  y: I16 val)
: Bool val

```
 #### Parameters

 * y: [I16](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### lt

 
```
fun box lt(
  y: I16 val)
: Bool val

```
 #### Parameters

 * y: [I16](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### le

 
```
fun box le(
  y: I16 val)
: Bool val

```
 #### Parameters

 * y: [I16](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ge

 
```
fun box ge(
  y: I16 val)
: Bool val

```
 #### Parameters

 * y: [I16](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### gt

 
```
fun box gt(
  y: I16 val)
: Bool val

```
 #### Parameters

 * y: [I16](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### hash

 
```
fun box hash()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### hash64

 
```
fun box hash64()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### i8

 
```
fun box i8()
: I8 val

```
 #### Returns

 * [I8](builtin-i8) val

 ### i16

 
```
fun box i16()
: I16 val

```
 #### Returns

 * [I16](index) val

 ### i32

 
```
fun box i32()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### i64

 
```
fun box i64()
: I64 val

```
 #### Returns

 * [I64](builtin-i64) val

 ### i128

 
```
fun box i128()
: I128 val

```
 #### Returns

 * [I128](builtin-i128) val

 ### ilong

 
```
fun box ilong()
: ILong val

```
 #### Returns

 * [ILong](builtin-ilong) val

 ### isize

 
```
fun box isize()
: ISize val

```
 #### Returns

 * [ISize](builtin-isize) val

 ### u8

 
```
fun box u8()
: U8 val

```
 #### Returns

 * [U8](builtin-u8) val

 ### u16

 
```
fun box u16()
: U16 val

```
 #### Returns

 * [U16](builtin-u16) val

 ### u32

 
```
fun box u32()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### u64

 
```
fun box u64()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### u128

 
```
fun box u128()
: U128 val

```
 #### Returns

 * [U128](builtin-u128) val

 ### ulong

 
```
fun box ulong()
: ULong val

```
 #### Returns

 * [ULong](builtin-ulong) val

 ### usize

 
```
fun box usize()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### f32

 
```
fun box f32()
: F32 val

```
 #### Returns

 * [F32](builtin-f32) val

 ### f64

 
```
fun box f64()
: F64 val

```
 #### Returns

 * [F64](builtin-f64) val

 ### i8\_unsafe

 
```
fun box i8_unsafe()
: I8 val

```
 #### Returns

 * [I8](builtin-i8) val

 ### i16\_unsafe

 
```
fun box i16_unsafe()
: I16 val

```
 #### Returns

 * [I16](index) val

 ### i32\_unsafe

 
```
fun box i32_unsafe()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### i64\_unsafe

 
```
fun box i64_unsafe()
: I64 val

```
 #### Returns

 * [I64](builtin-i64) val

 ### i128\_unsafe

 
```
fun box i128_unsafe()
: I128 val

```
 #### Returns

 * [I128](builtin-i128) val

 ### ilong\_unsafe

 
```
fun box ilong_unsafe()
: ILong val

```
 #### Returns

 * [ILong](builtin-ilong) val

 ### isize\_unsafe

 
```
fun box isize_unsafe()
: ISize val

```
 #### Returns

 * [ISize](builtin-isize) val

 ### u8\_unsafe

 
```
fun box u8_unsafe()
: U8 val

```
 #### Returns

 * [U8](builtin-u8) val

 ### u16\_unsafe

 
```
fun box u16_unsafe()
: U16 val

```
 #### Returns

 * [U16](builtin-u16) val

 ### u32\_unsafe

 
```
fun box u32_unsafe()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### u64\_unsafe

 
```
fun box u64_unsafe()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### u128\_unsafe

 
```
fun box u128_unsafe()
: U128 val

```
 #### Returns

 * [U128](builtin-u128) val

 ### ulong\_unsafe

 
```
fun box ulong_unsafe()
: ULong val

```
 #### Returns

 * [ULong](builtin-ulong) val

 ### usize\_unsafe

 
```
fun box usize_unsafe()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### f32\_unsafe

 
```
fun box f32_unsafe()
: F32 val

```
 #### Returns

 * [F32](builtin-f32) val

 ### f64\_unsafe

 
```
fun box f64_unsafe()
: F64 val

```
 #### Returns

 * [F64](builtin-f64) val

 ### compare

 
```
fun box compare(
  that: I16 val)
: (Less val | Equal val | Greater val)

```
 #### Parameters

 * that: [I16](index) val

 #### Returns

 * ([Less](builtin-less) val | [Equal](builtin-equal) val | [Greater](builtin-greater) val)



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/builtin-I16>

I32
===

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L186)

 
```
primitive val I32 is
  SignedInteger[I32 val, U32 val] val

```
 #### Implements

 * [SignedInteger](builtin-signedinteger)[[I32](index) val, [U32](builtin-u32) val] val

 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L187)

 
```
new val create(
  value: I32 val)
: I32 val^

```
 #### Parameters

 * value: [I32](index) val

 #### Returns

 * [I32](index) val^

 ### from[A: (([I8](builtin-i8) val | [I16](builtin-i16) val | [I32](index) val | [I64](builtin-i64) val | [I128](builtin-i128) val | [ILong](builtin-ilong) val | [ISize](builtin-isize) val | [U8](builtin-u8) val | [U16](builtin-u16) val | [U32](builtin-u32) val | [U64](builtin-u64) val | [U128](builtin-u128) val | [ULong](builtin-ulong) val | [USize](builtin-usize) val | [F32](builtin-f32) val | [F64](builtin-f64) val) & [Real](builtin-real)[A] val)]

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L188)

 
```
new val from[A: ((I8 val | I16 val | I32 val | 
    I64 val | I128 val | ILong val | 
    ISize val | U8 val | U16 val | 
    U32 val | U64 val | U128 val | 
    ULong val | USize val | F32 val | 
    F64 val) & Real[A] val)](
  a: A)
: I32 val^

```
 #### Parameters

 * a: A

 #### Returns

 * [I32](index) val^

 ### min\_value

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L190)

 
```
new val min_value()
: I32 val^

```
 #### Returns

 * [I32](index) val^

 ### max\_value

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L191)

 
```
new val max_value()
: I32 val^

```
 #### Returns

 * [I32](index) val^

 Public Functions
----------------

 ### abs

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L193)

 
```
fun box abs()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### bit\_reverse

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L194)

 
```
fun box bit_reverse()
: I32 val

```
 #### Returns

 * [I32](index) val

 ### bswap

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L195)

 
```
fun box bswap()
: I32 val

```
 #### Returns

 * [I32](index) val

 ### popcount

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L196)

 
```
fun box popcount()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### clz

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L197)

 
```
fun box clz()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### ctz

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L198)

 
```
fun box ctz()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### clz\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L200)

 Unsafe operation. If this is 0, the result is undefined.

 
```
fun box clz_unsafe()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### ctz\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L207)

 Unsafe operation. If this is 0, the result is undefined.

 
```
fun box ctz_unsafe()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### bitwidth

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L214)

 
```
fun box bitwidth()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### bytewidth

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L216)

 
```
fun box bytewidth()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### min

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L218)

 
```
fun box min(
  y: I32 val)
: I32 val

```
 #### Parameters

 * y: [I32](index) val

 #### Returns

 * [I32](index) val

 ### max

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L219)

 
```
fun box max(
  y: I32 val)
: I32 val

```
 #### Parameters

 * y: [I32](index) val

 #### Returns

 * [I32](index) val

 ### fld

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L221)

 
```
fun box fld(
  y: I32 val)
: I32 val

```
 #### Parameters

 * y: [I32](index) val

 #### Returns

 * [I32](index) val

 ### fld\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L224)

 
```
fun box fld_unsafe(
  y: I32 val)
: I32 val

```
 #### Parameters

 * y: [I32](index) val

 #### Returns

 * [I32](index) val

 ### mod

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L227)

 
```
fun box mod(
  y: I32 val)
: I32 val

```
 #### Parameters

 * y: [I32](index) val

 #### Returns

 * [I32](index) val

 ### mod\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L230)

 
```
fun box mod_unsafe(
  y: I32 val)
: I32 val

```
 #### Parameters

 * y: [I32](index) val

 #### Returns

 * [I32](index) val

 ### addc

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L233)

 
```
fun box addc(
  y: I32 val)
: (I32 val , Bool val)

```
 #### Parameters

 * y: [I32](index) val

 #### Returns

 * ([I32](index) val , [Bool](builtin-bool) val)

 ### subc

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L236)

 
```
fun box subc(
  y: I32 val)
: (I32 val , Bool val)

```
 #### Parameters

 * y: [I32](index) val

 #### Returns

 * ([I32](index) val , [Bool](builtin-bool) val)

 ### mulc

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L239)

 
```
fun box mulc(
  y: I32 val)
: (I32 val , Bool val)

```
 #### Parameters

 * y: [I32](index) val

 #### Returns

 * ([I32](index) val , [Bool](builtin-bool) val)

 ### divc

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L242)

 
```
fun box divc(
  y: I32 val)
: (I32 val , Bool val)

```
 #### Parameters

 * y: [I32](index) val

 #### Returns

 * ([I32](index) val , [Bool](builtin-bool) val)

 ### remc

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L245)

 
```
fun box remc(
  y: I32 val)
: (I32 val , Bool val)

```
 #### Parameters

 * y: [I32](index) val

 #### Returns

 * ([I32](index) val , [Bool](builtin-bool) val)

 ### fldc

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L248)

 
```
fun box fldc(
  y: I32 val)
: (I32 val , Bool val)

```
 #### Parameters

 * y: [I32](index) val

 #### Returns

 * ([I32](index) val , [Bool](builtin-bool) val)

 ### modc

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L251)

 
```
fun box modc(
  y: I32 val)
: (I32 val , Bool val)

```
 #### Parameters

 * y: [I32](index) val

 #### Returns

 * ([I32](index) val , [Bool](builtin-bool) val)

 ### add\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L254)

 
```
fun box add_partial(
  y: I32 val)
: I32 val ?

```
 #### Parameters

 * y: [I32](index) val

 #### Returns

 * [I32](index) val ?

 ### sub\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L257)

 
```
fun box sub_partial(
  y: I32 val)
: I32 val ?

```
 #### Parameters

 * y: [I32](index) val

 #### Returns

 * [I32](index) val ?

 ### mul\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L260)

 
```
fun box mul_partial(
  y: I32 val)
: I32 val ?

```
 #### Parameters

 * y: [I32](index) val

 #### Returns

 * [I32](index) val ?

 ### div\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L263)

 
```
fun box div_partial(
  y: I32 val)
: I32 val ?

```
 #### Parameters

 * y: [I32](index) val

 #### Returns

 * [I32](index) val ?

 ### rem\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L266)

 
```
fun box rem_partial(
  y: I32 val)
: I32 val ?

```
 #### Parameters

 * y: [I32](index) val

 #### Returns

 * [I32](index) val ?

 ### divrem\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L269)

 
```
fun box divrem_partial(
  y: I32 val)
: (I32 val , I32 val) ?

```
 #### Parameters

 * y: [I32](index) val

 #### Returns

 * ([I32](index) val , [I32](index) val) ?

 ### fld\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L272)

 
```
fun box fld_partial(
  y: I32 val)
: I32 val ?

```
 #### Parameters

 * y: [I32](index) val

 #### Returns

 * [I32](index) val ?

 ### mod\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L275)

 
```
fun box mod_partial(
  y: I32 val)
: I32 val ?

```
 #### Parameters

 * y: [I32](index) val

 #### Returns

 * [I32](index) val ?

 ### shl

 
```
fun box shl(
  y: U32 val)
: I32 val

```
 #### Parameters

 * y: [U32](builtin-u32) val

 #### Returns

 * [I32](index) val

 ### shr

 
```
fun box shr(
  y: U32 val)
: I32 val

```
 #### Parameters

 * y: [U32](builtin-u32) val

 #### Returns

 * [I32](index) val

 ### shl\_unsafe

 
```
fun box shl_unsafe(
  y: U32 val)
: I32 val

```
 #### Parameters

 * y: [U32](builtin-u32) val

 #### Returns

 * [I32](index) val

 ### shr\_unsafe

 
```
fun box shr_unsafe(
  y: U32 val)
: I32 val

```
 #### Parameters

 * y: [U32](builtin-u32) val

 #### Returns

 * [I32](index) val

 ### string

 
```
fun box string()
: String iso^

```
 #### Returns

 * [String](builtin-string) iso^

 ### add\_unsafe

 
```
fun box add_unsafe(
  y: I32 val)
: I32 val

```
 #### Parameters

 * y: [I32](index) val

 #### Returns

 * [I32](index) val

 ### sub\_unsafe

 
```
fun box sub_unsafe(
  y: I32 val)
: I32 val

```
 #### Parameters

 * y: [I32](index) val

 #### Returns

 * [I32](index) val

 ### mul\_unsafe

 
```
fun box mul_unsafe(
  y: I32 val)
: I32 val

```
 #### Parameters

 * y: [I32](index) val

 #### Returns

 * [I32](index) val

 ### div\_unsafe

 
```
fun box div_unsafe(
  y: I32 val)
: I32 val

```
 #### Parameters

 * y: [I32](index) val

 #### Returns

 * [I32](index) val

 ### divrem\_unsafe

 
```
fun box divrem_unsafe(
  y: I32 val)
: (I32 val , I32 val)

```
 #### Parameters

 * y: [I32](index) val

 #### Returns

 * ([I32](index) val , [I32](index) val)

 ### rem\_unsafe

 
```
fun box rem_unsafe(
  y: I32 val)
: I32 val

```
 #### Parameters

 * y: [I32](index) val

 #### Returns

 * [I32](index) val

 ### neg\_unsafe

 
```
fun box neg_unsafe()
: I32 val

```
 #### Returns

 * [I32](index) val

 ### op\_and

 
```
fun box op_and(
  y: I32 val)
: I32 val

```
 #### Parameters

 * y: [I32](index) val

 #### Returns

 * [I32](index) val

 ### op\_or

 
```
fun box op_or(
  y: I32 val)
: I32 val

```
 #### Parameters

 * y: [I32](index) val

 #### Returns

 * [I32](index) val

 ### op\_xor

 
```
fun box op_xor(
  y: I32 val)
: I32 val

```
 #### Parameters

 * y: [I32](index) val

 #### Returns

 * [I32](index) val

 ### op\_not

 
```
fun box op_not()
: I32 val

```
 #### Returns

 * [I32](index) val

 ### add

 
```
fun box add(
  y: I32 val)
: I32 val

```
 #### Parameters

 * y: [I32](index) val

 #### Returns

 * [I32](index) val

 ### sub

 
```
fun box sub(
  y: I32 val)
: I32 val

```
 #### Parameters

 * y: [I32](index) val

 #### Returns

 * [I32](index) val

 ### mul

 
```
fun box mul(
  y: I32 val)
: I32 val

```
 #### Parameters

 * y: [I32](index) val

 #### Returns

 * [I32](index) val

 ### div

 
```
fun box div(
  y: I32 val)
: I32 val

```
 #### Parameters

 * y: [I32](index) val

 #### Returns

 * [I32](index) val

 ### divrem

 
```
fun box divrem(
  y: I32 val)
: (I32 val , I32 val)

```
 #### Parameters

 * y: [I32](index) val

 #### Returns

 * ([I32](index) val , [I32](index) val)

 ### rem

 
```
fun box rem(
  y: I32 val)
: I32 val

```
 #### Parameters

 * y: [I32](index) val

 #### Returns

 * [I32](index) val

 ### neg

 
```
fun box neg()
: I32 val

```
 #### Returns

 * [I32](index) val

 ### eq

 
```
fun box eq(
  y: I32 val)
: Bool val

```
 #### Parameters

 * y: [I32](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 
```
fun box ne(
  y: I32 val)
: Bool val

```
 #### Parameters

 * y: [I32](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### lt

 
```
fun box lt(
  y: I32 val)
: Bool val

```
 #### Parameters

 * y: [I32](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### le

 
```
fun box le(
  y: I32 val)
: Bool val

```
 #### Parameters

 * y: [I32](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ge

 
```
fun box ge(
  y: I32 val)
: Bool val

```
 #### Parameters

 * y: [I32](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### gt

 
```
fun box gt(
  y: I32 val)
: Bool val

```
 #### Parameters

 * y: [I32](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### hash

 
```
fun box hash()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### hash64

 
```
fun box hash64()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### i8

 
```
fun box i8()
: I8 val

```
 #### Returns

 * [I8](builtin-i8) val

 ### i16

 
```
fun box i16()
: I16 val

```
 #### Returns

 * [I16](builtin-i16) val

 ### i32

 
```
fun box i32()
: I32 val

```
 #### Returns

 * [I32](index) val

 ### i64

 
```
fun box i64()
: I64 val

```
 #### Returns

 * [I64](builtin-i64) val

 ### i128

 
```
fun box i128()
: I128 val

```
 #### Returns

 * [I128](builtin-i128) val

 ### ilong

 
```
fun box ilong()
: ILong val

```
 #### Returns

 * [ILong](builtin-ilong) val

 ### isize

 
```
fun box isize()
: ISize val

```
 #### Returns

 * [ISize](builtin-isize) val

 ### u8

 
```
fun box u8()
: U8 val

```
 #### Returns

 * [U8](builtin-u8) val

 ### u16

 
```
fun box u16()
: U16 val

```
 #### Returns

 * [U16](builtin-u16) val

 ### u32

 
```
fun box u32()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### u64

 
```
fun box u64()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### u128

 
```
fun box u128()
: U128 val

```
 #### Returns

 * [U128](builtin-u128) val

 ### ulong

 
```
fun box ulong()
: ULong val

```
 #### Returns

 * [ULong](builtin-ulong) val

 ### usize

 
```
fun box usize()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### f32

 
```
fun box f32()
: F32 val

```
 #### Returns

 * [F32](builtin-f32) val

 ### f64

 
```
fun box f64()
: F64 val

```
 #### Returns

 * [F64](builtin-f64) val

 ### i8\_unsafe

 
```
fun box i8_unsafe()
: I8 val

```
 #### Returns

 * [I8](builtin-i8) val

 ### i16\_unsafe

 
```
fun box i16_unsafe()
: I16 val

```
 #### Returns

 * [I16](builtin-i16) val

 ### i32\_unsafe

 
```
fun box i32_unsafe()
: I32 val

```
 #### Returns

 * [I32](index) val

 ### i64\_unsafe

 
```
fun box i64_unsafe()
: I64 val

```
 #### Returns

 * [I64](builtin-i64) val

 ### i128\_unsafe

 
```
fun box i128_unsafe()
: I128 val

```
 #### Returns

 * [I128](builtin-i128) val

 ### ilong\_unsafe

 
```
fun box ilong_unsafe()
: ILong val

```
 #### Returns

 * [ILong](builtin-ilong) val

 ### isize\_unsafe

 
```
fun box isize_unsafe()
: ISize val

```
 #### Returns

 * [ISize](builtin-isize) val

 ### u8\_unsafe

 
```
fun box u8_unsafe()
: U8 val

```
 #### Returns

 * [U8](builtin-u8) val

 ### u16\_unsafe

 
```
fun box u16_unsafe()
: U16 val

```
 #### Returns

 * [U16](builtin-u16) val

 ### u32\_unsafe

 
```
fun box u32_unsafe()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### u64\_unsafe

 
```
fun box u64_unsafe()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### u128\_unsafe

 
```
fun box u128_unsafe()
: U128 val

```
 #### Returns

 * [U128](builtin-u128) val

 ### ulong\_unsafe

 
```
fun box ulong_unsafe()
: ULong val

```
 #### Returns

 * [ULong](builtin-ulong) val

 ### usize\_unsafe

 
```
fun box usize_unsafe()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### f32\_unsafe

 
```
fun box f32_unsafe()
: F32 val

```
 #### Returns

 * [F32](builtin-f32) val

 ### f64\_unsafe

 
```
fun box f64_unsafe()
: F64 val

```
 #### Returns

 * [F64](builtin-f64) val

 ### compare

 
```
fun box compare(
  that: I32 val)
: (Less val | Equal val | Greater val)

```
 #### Parameters

 * that: [I32](index) val

 #### Returns

 * ([Less](builtin-less) val | [Equal](builtin-equal) val | [Greater](builtin-greater) val)



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/builtin-I32>

ISize
=====

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L519)

 
```
primitive val ISize is
  SignedInteger[ISize val, USize val] val

```
 #### Implements

 * [SignedInteger](builtin-signedinteger)[[ISize](index) val, [USize](builtin-usize) val] val

 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L520)

 
```
new val create(
  value: ISize val)
: ISize val^

```
 #### Parameters

 * value: [ISize](index) val

 #### Returns

 * [ISize](index) val^

 ### from[A: (([I8](builtin-i8) val | [I16](builtin-i16) val | [I32](builtin-i32) val | [I64](builtin-i64) val | [I128](builtin-i128) val | [ILong](builtin-ilong) val | [ISize](index) val | [U8](builtin-u8) val | [U16](builtin-u16) val | [U32](builtin-u32) val | [U64](builtin-u64) val | [U128](builtin-u128) val | [ULong](builtin-ulong) val | [USize](builtin-usize) val | [F32](builtin-f32) val | [F64](builtin-f64) val) & [Real](builtin-real)[A] val)]

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L521)

 
```
new val from[A: ((I8 val | I16 val | I32 val | 
    I64 val | I128 val | ILong val | 
    ISize val | U8 val | U16 val | 
    U32 val | U64 val | U128 val | 
    ULong val | USize val | F32 val | 
    F64 val) & Real[A] val)](
  a: A)
: ISize val^

```
 #### Parameters

 * a: A

 #### Returns

 * [ISize](index) val^

 ### min\_value

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L523)

 
```
new val min_value()
: ISize val^

```
 #### Returns

 * [ISize](index) val^

 ### max\_value

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L530)

 
```
new val max_value()
: ISize val^

```
 #### Returns

 * [ISize](index) val^

 Public Functions
----------------

 ### abs

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L537)

 
```
fun box abs()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### bit\_reverse

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L539)

 
```
fun box bit_reverse()
: ISize val

```
 #### Returns

 * [ISize](index) val

 ### bswap

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L546)

 
```
fun box bswap()
: ISize val

```
 #### Returns

 * [ISize](index) val

 ### popcount

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L553)

 
```
fun box popcount()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### clz

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L560)

 
```
fun box clz()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### ctz

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L567)

 
```
fun box ctz()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### clz\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L574)

 
```
fun box clz_unsafe()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### ctz\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L581)

 
```
fun box ctz_unsafe()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### bitwidth

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L588)

 
```
fun box bitwidth()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### bytewidth

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L590)

 
```
fun box bytewidth()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### min

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L592)

 
```
fun box min(
  y: ISize val)
: ISize val

```
 #### Parameters

 * y: [ISize](index) val

 #### Returns

 * [ISize](index) val

 ### max

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L593)

 
```
fun box max(
  y: ISize val)
: ISize val

```
 #### Parameters

 * y: [ISize](index) val

 #### Returns

 * [ISize](index) val

 ### fld

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L595)

 
```
fun box fld(
  y: ISize val)
: ISize val

```
 #### Parameters

 * y: [ISize](index) val

 #### Returns

 * [ISize](index) val

 ### fld\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L598)

 
```
fun box fld_unsafe(
  y: ISize val)
: ISize val

```
 #### Parameters

 * y: [ISize](index) val

 #### Returns

 * [ISize](index) val

 ### mod

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L601)

 
```
fun box mod(
  y: ISize val)
: ISize val

```
 #### Parameters

 * y: [ISize](index) val

 #### Returns

 * [ISize](index) val

 ### mod\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L604)

 
```
fun box mod_unsafe(
  y: ISize val)
: ISize val

```
 #### Parameters

 * y: [ISize](index) val

 #### Returns

 * [ISize](index) val

 ### addc

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L607)

 
```
fun box addc(
  y: ISize val)
: (ISize val , Bool val)

```
 #### Parameters

 * y: [ISize](index) val

 #### Returns

 * ([ISize](index) val , [Bool](builtin-bool) val)

 ### subc

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L614)

 
```
fun box subc(
  y: ISize val)
: (ISize val , Bool val)

```
 #### Parameters

 * y: [ISize](index) val

 #### Returns

 * ([ISize](index) val , [Bool](builtin-bool) val)

 ### mulc

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L621)

 
```
fun box mulc(
  y: ISize val)
: (ISize val , Bool val)

```
 #### Parameters

 * y: [ISize](index) val

 #### Returns

 * ([ISize](index) val , [Bool](builtin-bool) val)

 ### divc

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L628)

 
```
fun box divc(
  y: ISize val)
: (ISize val , Bool val)

```
 #### Parameters

 * y: [ISize](index) val

 #### Returns

 * ([ISize](index) val , [Bool](builtin-bool) val)

 ### remc

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L631)

 
```
fun box remc(
  y: ISize val)
: (ISize val , Bool val)

```
 #### Parameters

 * y: [ISize](index) val

 #### Returns

 * ([ISize](index) val , [Bool](builtin-bool) val)

 ### fldc

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L634)

 
```
fun box fldc(
  y: ISize val)
: (ISize val , Bool val)

```
 #### Parameters

 * y: [ISize](index) val

 #### Returns

 * ([ISize](index) val , [Bool](builtin-bool) val)

 ### modc

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L637)

 
```
fun box modc(
  y: ISize val)
: (ISize val , Bool val)

```
 #### Parameters

 * y: [ISize](index) val

 #### Returns

 * ([ISize](index) val , [Bool](builtin-bool) val)

 ### add\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L640)

 
```
fun box add_partial(
  y: ISize val)
: ISize val ?

```
 #### Parameters

 * y: [ISize](index) val

 #### Returns

 * [ISize](index) val ?

 ### sub\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L643)

 
```
fun box sub_partial(
  y: ISize val)
: ISize val ?

```
 #### Parameters

 * y: [ISize](index) val

 #### Returns

 * [ISize](index) val ?

 ### mul\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L646)

 
```
fun box mul_partial(
  y: ISize val)
: ISize val ?

```
 #### Parameters

 * y: [ISize](index) val

 #### Returns

 * [ISize](index) val ?

 ### div\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L649)

 
```
fun box div_partial(
  y: ISize val)
: ISize val ?

```
 #### Parameters

 * y: [ISize](index) val

 #### Returns

 * [ISize](index) val ?

 ### rem\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L652)

 
```
fun box rem_partial(
  y: ISize val)
: ISize val ?

```
 #### Parameters

 * y: [ISize](index) val

 #### Returns

 * [ISize](index) val ?

 ### divrem\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L655)

 
```
fun box divrem_partial(
  y: ISize val)
: (ISize val , ISize val) ?

```
 #### Parameters

 * y: [ISize](index) val

 #### Returns

 * ([ISize](index) val , [ISize](index) val) ?

 ### fld\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L658)

 
```
fun box fld_partial(
  y: ISize val)
: ISize val ?

```
 #### Parameters

 * y: [ISize](index) val

 #### Returns

 * [ISize](index) val ?

 ### mod\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L661)

 
```
fun box mod_partial(
  y: ISize val)
: ISize val ?

```
 #### Parameters

 * y: [ISize](index) val

 #### Returns

 * [ISize](index) val ?

 ### shl

 
```
fun box shl(
  y: USize val)
: ISize val

```
 #### Parameters

 * y: [USize](builtin-usize) val

 #### Returns

 * [ISize](index) val

 ### shr

 
```
fun box shr(
  y: USize val)
: ISize val

```
 #### Parameters

 * y: [USize](builtin-usize) val

 #### Returns

 * [ISize](index) val

 ### shl\_unsafe

 
```
fun box shl_unsafe(
  y: USize val)
: ISize val

```
 #### Parameters

 * y: [USize](builtin-usize) val

 #### Returns

 * [ISize](index) val

 ### shr\_unsafe

 
```
fun box shr_unsafe(
  y: USize val)
: ISize val

```
 #### Parameters

 * y: [USize](builtin-usize) val

 #### Returns

 * [ISize](index) val

 ### string

 
```
fun box string()
: String iso^

```
 #### Returns

 * [String](builtin-string) iso^

 ### add\_unsafe

 
```
fun box add_unsafe(
  y: ISize val)
: ISize val

```
 #### Parameters

 * y: [ISize](index) val

 #### Returns

 * [ISize](index) val

 ### sub\_unsafe

 
```
fun box sub_unsafe(
  y: ISize val)
: ISize val

```
 #### Parameters

 * y: [ISize](index) val

 #### Returns

 * [ISize](index) val

 ### mul\_unsafe

 
```
fun box mul_unsafe(
  y: ISize val)
: ISize val

```
 #### Parameters

 * y: [ISize](index) val

 #### Returns

 * [ISize](index) val

 ### div\_unsafe

 
```
fun box div_unsafe(
  y: ISize val)
: ISize val

```
 #### Parameters

 * y: [ISize](index) val

 #### Returns

 * [ISize](index) val

 ### divrem\_unsafe

 
```
fun box divrem_unsafe(
  y: ISize val)
: (ISize val , ISize val)

```
 #### Parameters

 * y: [ISize](index) val

 #### Returns

 * ([ISize](index) val , [ISize](index) val)

 ### rem\_unsafe

 
```
fun box rem_unsafe(
  y: ISize val)
: ISize val

```
 #### Parameters

 * y: [ISize](index) val

 #### Returns

 * [ISize](index) val

 ### neg\_unsafe

 
```
fun box neg_unsafe()
: ISize val

```
 #### Returns

 * [ISize](index) val

 ### op\_and

 
```
fun box op_and(
  y: ISize val)
: ISize val

```
 #### Parameters

 * y: [ISize](index) val

 #### Returns

 * [ISize](index) val

 ### op\_or

 
```
fun box op_or(
  y: ISize val)
: ISize val

```
 #### Parameters

 * y: [ISize](index) val

 #### Returns

 * [ISize](index) val

 ### op\_xor

 
```
fun box op_xor(
  y: ISize val)
: ISize val

```
 #### Parameters

 * y: [ISize](index) val

 #### Returns

 * [ISize](index) val

 ### op\_not

 
```
fun box op_not()
: ISize val

```
 #### Returns

 * [ISize](index) val

 ### add

 
```
fun box add(
  y: ISize val)
: ISize val

```
 #### Parameters

 * y: [ISize](index) val

 #### Returns

 * [ISize](index) val

 ### sub

 
```
fun box sub(
  y: ISize val)
: ISize val

```
 #### Parameters

 * y: [ISize](index) val

 #### Returns

 * [ISize](index) val

 ### mul

 
```
fun box mul(
  y: ISize val)
: ISize val

```
 #### Parameters

 * y: [ISize](index) val

 #### Returns

 * [ISize](index) val

 ### div

 
```
fun box div(
  y: ISize val)
: ISize val

```
 #### Parameters

 * y: [ISize](index) val

 #### Returns

 * [ISize](index) val

 ### divrem

 
```
fun box divrem(
  y: ISize val)
: (ISize val , ISize val)

```
 #### Parameters

 * y: [ISize](index) val

 #### Returns

 * ([ISize](index) val , [ISize](index) val)

 ### rem

 
```
fun box rem(
  y: ISize val)
: ISize val

```
 #### Parameters

 * y: [ISize](index) val

 #### Returns

 * [ISize](index) val

 ### neg

 
```
fun box neg()
: ISize val

```
 #### Returns

 * [ISize](index) val

 ### eq

 
```
fun box eq(
  y: ISize val)
: Bool val

```
 #### Parameters

 * y: [ISize](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 
```
fun box ne(
  y: ISize val)
: Bool val

```
 #### Parameters

 * y: [ISize](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### lt

 
```
fun box lt(
  y: ISize val)
: Bool val

```
 #### Parameters

 * y: [ISize](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### le

 
```
fun box le(
  y: ISize val)
: Bool val

```
 #### Parameters

 * y: [ISize](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ge

 
```
fun box ge(
  y: ISize val)
: Bool val

```
 #### Parameters

 * y: [ISize](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### gt

 
```
fun box gt(
  y: ISize val)
: Bool val

```
 #### Parameters

 * y: [ISize](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### hash

 
```
fun box hash()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### hash64

 
```
fun box hash64()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### i8

 
```
fun box i8()
: I8 val

```
 #### Returns

 * [I8](builtin-i8) val

 ### i16

 
```
fun box i16()
: I16 val

```
 #### Returns

 * [I16](builtin-i16) val

 ### i32

 
```
fun box i32()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### i64

 
```
fun box i64()
: I64 val

```
 #### Returns

 * [I64](builtin-i64) val

 ### i128

 
```
fun box i128()
: I128 val

```
 #### Returns

 * [I128](builtin-i128) val

 ### ilong

 
```
fun box ilong()
: ILong val

```
 #### Returns

 * [ILong](builtin-ilong) val

 ### isize

 
```
fun box isize()
: ISize val

```
 #### Returns

 * [ISize](index) val

 ### u8

 
```
fun box u8()
: U8 val

```
 #### Returns

 * [U8](builtin-u8) val

 ### u16

 
```
fun box u16()
: U16 val

```
 #### Returns

 * [U16](builtin-u16) val

 ### u32

 
```
fun box u32()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### u64

 
```
fun box u64()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### u128

 
```
fun box u128()
: U128 val

```
 #### Returns

 * [U128](builtin-u128) val

 ### ulong

 
```
fun box ulong()
: ULong val

```
 #### Returns

 * [ULong](builtin-ulong) val

 ### usize

 
```
fun box usize()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### f32

 
```
fun box f32()
: F32 val

```
 #### Returns

 * [F32](builtin-f32) val

 ### f64

 
```
fun box f64()
: F64 val

```
 #### Returns

 * [F64](builtin-f64) val

 ### i8\_unsafe

 
```
fun box i8_unsafe()
: I8 val

```
 #### Returns

 * [I8](builtin-i8) val

 ### i16\_unsafe

 
```
fun box i16_unsafe()
: I16 val

```
 #### Returns

 * [I16](builtin-i16) val

 ### i32\_unsafe

 
```
fun box i32_unsafe()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### i64\_unsafe

 
```
fun box i64_unsafe()
: I64 val

```
 #### Returns

 * [I64](builtin-i64) val

 ### i128\_unsafe

 
```
fun box i128_unsafe()
: I128 val

```
 #### Returns

 * [I128](builtin-i128) val

 ### ilong\_unsafe

 
```
fun box ilong_unsafe()
: ILong val

```
 #### Returns

 * [ILong](builtin-ilong) val

 ### isize\_unsafe

 
```
fun box isize_unsafe()
: ISize val

```
 #### Returns

 * [ISize](index) val

 ### u8\_unsafe

 
```
fun box u8_unsafe()
: U8 val

```
 #### Returns

 * [U8](builtin-u8) val

 ### u16\_unsafe

 
```
fun box u16_unsafe()
: U16 val

```
 #### Returns

 * [U16](builtin-u16) val

 ### u32\_unsafe

 
```
fun box u32_unsafe()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### u64\_unsafe

 
```
fun box u64_unsafe()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### u128\_unsafe

 
```
fun box u128_unsafe()
: U128 val

```
 #### Returns

 * [U128](builtin-u128) val

 ### ulong\_unsafe

 
```
fun box ulong_unsafe()
: ULong val

```
 #### Returns

 * [ULong](builtin-ulong) val

 ### usize\_unsafe

 
```
fun box usize_unsafe()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### f32\_unsafe

 
```
fun box f32_unsafe()
: F32 val

```
 #### Returns

 * [F32](builtin-f32) val

 ### f64\_unsafe

 
```
fun box f64_unsafe()
: F64 val

```
 #### Returns

 * [F64](builtin-f64) val

 ### compare

 
```
fun box compare(
  that: ISize val)
: (Less val | Equal val | Greater val)

```
 #### Parameters

 * that: [ISize](index) val

 #### Returns

 * ([Less](builtin-less) val | [Equal](builtin-equal) val | [Greater](builtin-greater) val)



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/builtin-ISize>

Number
======

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L714)

 
```
type Number is
  (I8 val | I16 val | I32 val | I64 val | I128 val | ILong val | ISize val | U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val | F32 val | F64 val)

```
 #### Type Alias For

 * ([I8](builtin-i8) val | [I16](builtin-i16) val | [I32](builtin-i32) val | [I64](builtin-i64) val | [I128](builtin-i128) val | [ILong](builtin-ilong) val | [ISize](builtin-isize) val | [U8](builtin-u8) val | [U16](builtin-u16) val | [U32](builtin-u32) val | [U64](builtin-u64) val | [U128](builtin-u128) val | [ULong](builtin-ulong) val | [USize](builtin-usize) val | [F32](builtin-f32) val | [F64](builtin-f64) val)



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/builtin-Number>

RuntimeOptions
==============

 [[Source]](https://stdlib.ponylang.io/src/builtin/runtime_options/#L1)

 Pony struct for the Pony runtime options C struct that can be used to override the Pony runtime defaults via code compiled into the program.

 The way this is done is by adding the following function to your `Main` actor:

 
```
  fun @runtime_override_defaults(rto: RuntimeOptions) =>

```
 and then overriding the fields of `rto` (the `RuntimeOptions` instance) as needed.

 NOTE: Command line arguments still any values set via `@runtime_override_defaults`.

 The following example overrides the `--ponyhelp` argument to default it to `true` instead of `false` causing the compiled program to always display the Pony runtime help:

 
```
actor Main
  new create(env: Env) =>
    env.out.print("Hello, world.")

  fun @runtime_override_defaults(rto: RuntimeOptions) =>
    rto.ponyhelp = true

```
 
```
struct ref RuntimeOptions

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/builtin/runtime_options/#L1)

 
```
new iso create()
: RuntimeOptions iso^

```
 #### Returns

 * [RuntimeOptions](index) iso^

 Public fields
-------------

 ### var ponymaxthreads: [U32](builtin-u32) val

 [[Source]](https://stdlib.ponylang.io/src/builtin/runtime_options/#L37)

 Use N scheduler threads. Defaults to the number of cores (not hyperthreads) available. This can't be larger than the number of cores available.

 ### var ponyminthreads: [U32](builtin-u32) val

 [[Source]](https://stdlib.ponylang.io/src/builtin/runtime_options/#L44)

 Minimum number of active scheduler threads allowed. Defaults to 0, meaning that all scheduler threads are allowed to be suspended when no work is available. This can't be larger than --ponymaxthreads if provided, or the physical cores available.

 ### var ponynoscale: [Bool](builtin-bool) val

 [[Source]](https://stdlib.ponylang.io/src/builtin/runtime_options/#L53)

 Don't scale down the scheduler threads. See --ponymaxthreads on how to specify the number of threads explicitly. Can't be used with --ponyminthreads.

 ### var ponysuspendthreshold: [U32](builtin-u32) val

 [[Source]](https://stdlib.ponylang.io/src/builtin/runtime_options/#L60)

 Amount of idle time before a scheduler thread suspends itself to minimize resource consumption (max 1000 ms, min 1 ms). Defaults to 1 ms.

 ### var ponycdinterval: [U32](builtin-u32) val

 [[Source]](https://stdlib.ponylang.io/src/builtin/runtime_options/#L67)

 Run cycle detection every N ms (max 1000 ms, min 10 ms). Defaults to 100 ms.

 ### var ponygcinitial: [USize](builtin-usize) val

 [[Source]](https://stdlib.ponylang.io/src/builtin/runtime_options/#L73)

 Defer garbage collection until an actor is using at least 2^N bytes. Defaults to 2^14.

 ### var ponygcfactor: [F64](builtin-f64) val

 [[Source]](https://stdlib.ponylang.io/src/builtin/runtime_options/#L79)

 After GC, an actor will next be GC'd at a heap memory usage N times its current value. This is a floating point value. Defaults to 2.0.

 ### var ponynoyield: [Bool](builtin-bool) val

 [[Source]](https://stdlib.ponylang.io/src/builtin/runtime_options/#L85)

 Do not yield the CPU when no work is available.

 ### var ponynoblock: [Bool](builtin-bool) val

 [[Source]](https://stdlib.ponylang.io/src/builtin/runtime_options/#L90)

 Do not send block messages to the cycle detector.

 ### var ponypin: [Bool](builtin-bool) val

 [[Source]](https://stdlib.ponylang.io/src/builtin/runtime_options/#L95)

 Pin scheduler threads to CPU cores. The ASIO thread can also be pinned if `--ponypinasio` is set.

 ### var ponypinasio: [Bool](builtin-bool) val

 [[Source]](https://stdlib.ponylang.io/src/builtin/runtime_options/#L101)

 Pin the ASIO thread to a CPU the way scheduler threads are pinned to CPUs. Requires `--ponypin` to be set to have any effect.

 ### var ponyversion: [Bool](builtin-bool) val

 [[Source]](https://stdlib.ponylang.io/src/builtin/runtime_options/#L107)

 Print the version of the compiler and exit.

 ### var ponyhelp: [Bool](builtin-bool) val

 [[Source]](https://stdlib.ponylang.io/src/builtin/runtime_options/#L112)

 Print the runtime usage options and exit.



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/builtin-RuntimeOptions>

Int
===

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L716)

 
```
type Int is
  (I8 val | I16 val | I32 val | I64 val | I128 val | ILong val | ISize val | U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val)

```
 #### Type Alias For

 * ([I8](builtin-i8) val | [I16](builtin-i16) val | [I32](builtin-i32) val | [I64](builtin-i64) val | [I128](builtin-i128) val | [ILong](builtin-ilong) val | [ISize](builtin-isize) val | [U8](builtin-u8) val | [U16](builtin-u16) val | [U32](builtin-u32) val | [U64](builtin-u64) val | [U128](builtin-u128) val | [ULong](builtin-ulong) val | [USize](builtin-usize) val)



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/builtin-Int>

SignedInteger[A: [SignedInteger](index)[A, B] val, B: [UnsignedInteger](builtin-unsignedinteger)[B] val]
========================================================================================================

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L397)

 
```
trait val SignedInteger[A: SignedInteger[A, B] val, B: UnsignedInteger[B] val] is
  Integer[A] val

```
 #### Implements

 * [Integer](builtin-integer)[A] val

 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L135)

 
```
new val create(
  value: A)
: Real[A] val^

```
 #### Parameters

 * value: A

 #### Returns

 * [Real](builtin-real)[A] val^

 ### from[B: (([I8](builtin-i8) val | [I16](builtin-i16) val | [I32](builtin-i32) val | [I64](builtin-i64) val | [I128](builtin-i128) val | [ILong](builtin-ilong) val | [ISize](builtin-isize) val | [U8](builtin-u8) val | [U16](builtin-u16) val | [U32](builtin-u32) val | [U64](builtin-u64) val | [U128](builtin-u128) val | [ULong](builtin-ulong) val | [USize](builtin-usize) val | [F32](builtin-f32) val | [F64](builtin-f64) val) & [Real](builtin-real)[B] val)]

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L137)

 
```
new val from[B: ((I8 val | I16 val | I32 val | 
    I64 val | I128 val | ILong val | 
    ISize val | U8 val | U16 val | 
    U32 val | U64 val | U128 val | 
    ULong val | USize val | F32 val | 
    F64 val) & Real[B] val)](
  a: B)
: Real[A] val^

```
 #### Parameters

 * a: B

 #### Returns

 * [Real](builtin-real)[A] val^

 ### min\_value

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L138)

 
```
new val min_value()
: Real[A] val^

```
 #### Returns

 * [Real](builtin-real)[A] val^

 ### max\_value

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L139)

 
```
new val max_value()
: Real[A] val^

```
 #### Returns

 * [Real](builtin-real)[A] val^

 Public Functions
----------------

 ### abs

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L399)

 
```
fun box abs()
: B

```
 #### Returns

 * B

 ### shl

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L401)

 
```
fun box shl(
  y: B)
: A

```
 #### Parameters

 * y: B

 #### Returns

 * A

 ### shr

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L402)

 
```
fun box shr(
  y: B)
: A

```
 #### Parameters

 * y: B

 #### Returns

 * A

 ### shl\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L404)

 Unsafe operation. If bits differing from the final sign bit are shifted-out, the result is undefined.

 
```
fun box shl_unsafe(
  y: B)
: A

```
 #### Parameters

 * y: B

 #### Returns

 * A

 ### shr\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L412)

 Unsafe operation. If non-zero bits are shifted-out, the result is undefined.

 
```
fun box shr_unsafe(
  y: B)
: A

```
 #### Parameters

 * y: B

 #### Returns

 * A

 ### popcount

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L419)

 
```
fun box popcount()
: B

```
 #### Returns

 * B

 ### clz

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L420)

 
```
fun box clz()
: B

```
 #### Returns

 * B

 ### ctz

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L421)

 
```
fun box ctz()
: B

```
 #### Returns

 * B

 ### clz\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L423)

 Unsafe operation. If this is 0, the result is undefined.

 
```
fun box clz_unsafe()
: B

```
 #### Returns

 * B

 ### ctz\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L429)

 Unsafe operation. If this is 0, the result is undefined.

 
```
fun box ctz_unsafe()
: B

```
 #### Returns

 * B

 ### bitwidth

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L435)

 
```
fun box bitwidth()
: B

```
 #### Returns

 * B

 ### bytewidth

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L437)

 
```
fun box bytewidth()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### string

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L439)

 
```
fun box string()
: String iso^

```
 #### Returns

 * [String](builtin-string) iso^

 ### add\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L214)

 
```
fun box add_unsafe(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### sub\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L221)

 
```
fun box sub_unsafe(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### mul\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L228)

 
```
fun box mul_unsafe(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### div\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L235)

 
```
fun box div_unsafe(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### divrem\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L245)

 
```
fun box divrem_unsafe(
  y: A)
: (A , A)

```
 #### Parameters

 * y: A

 #### Returns

 * (A , A)

 ### rem\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L255)

 
```
fun box rem_unsafe(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### fld\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L265)

 
```
fun box fld_unsafe(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### mod\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L276)

 
```
fun box mod_unsafe(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### add\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L286)

 
```
fun box add_partial(
  y: A)
: A ?

```
 #### Parameters

 * y: A

 #### Returns

 * A ?

 ### sub\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L293)

 
```
fun box sub_partial(
  y: A)
: A ?

```
 #### Parameters

 * y: A

 #### Returns

 * A ?

 ### mul\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L300)

 
```
fun box mul_partial(
  y: A)
: A ?

```
 #### Parameters

 * y: A

 #### Returns

 * A ?

 ### div\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L307)

 
```
fun box div_partial(
  y: A)
: A ?

```
 #### Parameters

 * y: A

 #### Returns

 * A ?

 ### rem\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L314)

 
```
fun box rem_partial(
  y: A)
: A ?

```
 #### Parameters

 * y: A

 #### Returns

 * A ?

 ### divrem\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L322)

 
```
fun box divrem_partial(
  y: A)
: (A , A) ?

```
 #### Parameters

 * y: A

 #### Returns

 * (A , A) ?

 ### fld\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L329)

 
```
fun box fld_partial(
  y: A)
: A ?

```
 #### Parameters

 * y: A

 #### Returns

 * A ?

 ### mod\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L336)

 
```
fun box mod_partial(
  y: A)
: A ?

```
 #### Parameters

 * y: A

 #### Returns

 * A ?

 ### neg\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L344)

 
```
fun box neg_unsafe()
: A

```
 #### Returns

 * A

 ### addc

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L351)

 
```
fun box addc(
  y: A)
: (A , Bool val)

```
 #### Parameters

 * y: A

 #### Returns

 * (A , [Bool](builtin-bool) val)

 ### subc

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L355)

 
```
fun box subc(
  y: A)
: (A , Bool val)

```
 #### Parameters

 * y: A

 #### Returns

 * (A , [Bool](builtin-bool) val)

 ### mulc

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L359)

 
```
fun box mulc(
  y: A)
: (A , Bool val)

```
 #### Parameters

 * y: A

 #### Returns

 * (A , [Bool](builtin-bool) val)

 ### divc

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L363)

 
```
fun box divc(
  y: A)
: (A , Bool val)

```
 #### Parameters

 * y: A

 #### Returns

 * (A , [Bool](builtin-bool) val)

 ### remc

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L367)

 
```
fun box remc(
  y: A)
: (A , Bool val)

```
 #### Parameters

 * y: A

 #### Returns

 * (A , [Bool](builtin-bool) val)

 ### fldc

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L373)

 
```
fun box fldc(
  y: A)
: (A , Bool val)

```
 #### Parameters

 * y: A

 #### Returns

 * (A , [Bool](builtin-bool) val)

 ### modc

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L377)

 
```
fun box modc(
  y: A)
: (A , Bool val)

```
 #### Parameters

 * y: A

 #### Returns

 * (A , [Bool](builtin-bool) val)

 ### op\_and

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L384)

 
```
fun box op_and(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### op\_or

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L385)

 
```
fun box op_or(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### op\_xor

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L386)

 
```
fun box op_xor(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### op\_not

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L387)

 
```
fun box op_not()
: A

```
 #### Returns

 * A

 ### bit\_reverse

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L389)

 
```
fun box bit_reverse()
: A

```
 #### Returns

 * A

 ### bswap

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L395)

 
```
fun box bswap()
: A

```
 #### Returns

 * A

 ### add

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L141)

 
```
fun box add(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### sub

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L142)

 
```
fun box sub(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### mul

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L143)

 
```
fun box mul(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### div

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L144)

 
```
fun box div(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### divrem

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L150)

 
```
fun box divrem(
  y: A)
: (A , A)

```
 #### Parameters

 * y: A

 #### Returns

 * (A , A)

 ### rem

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L151)

 
```
fun box rem(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### neg

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L159)

 
```
fun box neg()
: A

```
 #### Returns

 * A

 ### fld

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L161)

 
```
fun box fld(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### mod

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L165)

 
```
fun box mod(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L172)

 
```
fun box eq(
  y: box->A)
: Bool val

```
 #### Parameters

 * y: box->A

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L173)

 
```
fun box ne(
  y: box->A)
: Bool val

```
 #### Parameters

 * y: box->A

 #### Returns

 * [Bool](builtin-bool) val

 ### lt

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L174)

 
```
fun box lt(
  y: box->A)
: Bool val

```
 #### Parameters

 * y: box->A

 #### Returns

 * [Bool](builtin-bool) val

 ### le

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L175)

 
```
fun box le(
  y: box->A)
: Bool val

```
 #### Parameters

 * y: box->A

 #### Returns

 * [Bool](builtin-bool) val

 ### ge

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L176)

 
```
fun box ge(
  y: box->A)
: Bool val

```
 #### Parameters

 * y: box->A

 #### Returns

 * [Bool](builtin-bool) val

 ### gt

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L177)

 
```
fun box gt(
  y: box->A)
: Bool val

```
 #### Parameters

 * y: box->A

 #### Returns

 * [Bool](builtin-bool) val

 ### min

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L179)

 
```
fun box min(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### max

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L180)

 
```
fun box max(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### hash

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L182)

 
```
fun box hash()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### hash64

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L198)

 
```
fun box hash64()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### i8

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L2)

 
```
fun box i8()
: I8 val

```
 #### Returns

 * [I8](builtin-i8) val

 ### i16

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L3)

 
```
fun box i16()
: I16 val

```
 #### Returns

 * [I16](builtin-i16) val

 ### i32

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L4)

 
```
fun box i32()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### i64

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L5)

 
```
fun box i64()
: I64 val

```
 #### Returns

 * [I64](builtin-i64) val

 ### i128

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L6)

 
```
fun box i128()
: I128 val

```
 #### Returns

 * [I128](builtin-i128) val

 ### ilong

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L7)

 
```
fun box ilong()
: ILong val

```
 #### Returns

 * [ILong](builtin-ilong) val

 ### isize

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L8)

 
```
fun box isize()
: ISize val

```
 #### Returns

 * [ISize](builtin-isize) val

 ### u8

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L10)

 
```
fun box u8()
: U8 val

```
 #### Returns

 * [U8](builtin-u8) val

 ### u16

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L11)

 
```
fun box u16()
: U16 val

```
 #### Returns

 * [U16](builtin-u16) val

 ### u32

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L12)

 
```
fun box u32()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### u64

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L13)

 
```
fun box u64()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### u128

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L14)

 
```
fun box u128()
: U128 val

```
 #### Returns

 * [U128](builtin-u128) val

 ### ulong

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L15)

 
```
fun box ulong()
: ULong val

```
 #### Returns

 * [ULong](builtin-ulong) val

 ### usize

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L16)

 
```
fun box usize()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### f32

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L18)

 
```
fun box f32()
: F32 val

```
 #### Returns

 * [F32](builtin-f32) val

 ### f64

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L19)

 
```
fun box f64()
: F64 val

```
 #### Returns

 * [F64](builtin-f64) val

 ### i8\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L21)

 
```
fun box i8_unsafe()
: I8 val

```
 #### Returns

 * [I8](builtin-i8) val

 ### i16\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L28)

 
```
fun box i16_unsafe()
: I16 val

```
 #### Returns

 * [I16](builtin-i16) val

 ### i32\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L35)

 
```
fun box i32_unsafe()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### i64\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L42)

 
```
fun box i64_unsafe()
: I64 val

```
 #### Returns

 * [I64](builtin-i64) val

 ### i128\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L49)

 
```
fun box i128_unsafe()
: I128 val

```
 #### Returns

 * [I128](builtin-i128) val

 ### ilong\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L56)

 
```
fun box ilong_unsafe()
: ILong val

```
 #### Returns

 * [ILong](builtin-ilong) val

 ### isize\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L63)

 
```
fun box isize_unsafe()
: ISize val

```
 #### Returns

 * [ISize](builtin-isize) val

 ### u8\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L70)

 
```
fun box u8_unsafe()
: U8 val

```
 #### Returns

 * [U8](builtin-u8) val

 ### u16\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L77)

 
```
fun box u16_unsafe()
: U16 val

```
 #### Returns

 * [U16](builtin-u16) val

 ### u32\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L84)

 
```
fun box u32_unsafe()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### u64\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L91)

 
```
fun box u64_unsafe()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### u128\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L98)

 
```
fun box u128_unsafe()
: U128 val

```
 #### Returns

 * [U128](builtin-u128) val

 ### ulong\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L105)

 
```
fun box ulong_unsafe()
: ULong val

```
 #### Returns

 * [ULong](builtin-ulong) val

 ### usize\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L112)

 
```
fun box usize_unsafe()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### f32\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L119)

 
```
fun box f32_unsafe()
: F32 val

```
 #### Returns

 * [F32](builtin-f32) val

 ### f64\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L126)

 
```
fun box f64_unsafe()
: F64 val

```
 #### Returns

 * [F64](builtin-f64) val

 ### compare

 
```
fun box compare(
  that: box->A)
: (Less val | Equal val | Greater val)

```
 #### Parameters

 * that: box->A

 #### Returns

 * ([Less](builtin-less) val | [Equal](builtin-equal) val | [Greater](builtin-greater) val)



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/builtin-SignedInteger>

Signed
======

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L905)

 
```
type Signed is
  (I8 val | I16 val | I32 val | I64 val | I128 val | ILong val | ISize val)

```
 #### Type Alias For

 * ([I8](builtin-i8) val | [I16](builtin-i16) val | [I32](builtin-i32) val | [I64](builtin-i64) val | [I128](builtin-i128) val | [ILong](builtin-ilong) val | [ISize](builtin-isize) val)



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/builtin-Signed>

Seq[A: A]
=========

 [[Source]](https://stdlib.ponylang.io/src/builtin/seq/#L1)

 A sequence of elements.

 
```
interface ref Seq[A: A]

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/builtin/seq/#L5)

 Create a sequence, reserving space for len elements.

 
```
new ref create(
  len: USize val = 0)
: Seq[A] ref^

```
 #### Parameters

 * len: [USize](builtin-usize) val = 0

 #### Returns

 * [Seq](index)[A] ref^

 Public Functions
----------------

 ### reserve

 [[Source]](https://stdlib.ponylang.io/src/builtin/seq/#L10)

 Reserve space for len elements.

 
```
fun ref reserve(
  len: USize val)
: None val

```
 #### Parameters

 * len: [USize](builtin-usize) val

 #### Returns

 * [None](builtin-none) val

 ### size

 [[Source]](https://stdlib.ponylang.io/src/builtin/seq/#L15)

 Returns the number of elements in the sequence.

 
```
fun box size()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### apply

 [[Source]](https://stdlib.ponylang.io/src/builtin/seq/#L20)

 Returns the i-th element of the sequence. Raises an error if the index is out of bounds.

 
```
fun box apply(
  i: USize val)
: this->A ?

```
 #### Parameters

 * i: [USize](builtin-usize) val

 #### Returns

 * this->A ?

 ### update

 [[Source]](https://stdlib.ponylang.io/src/builtin/seq/#L26)

 Replaces the i-th element of the sequence. Returns the previous value. Raises an error if the index is out of bounds.

 
```
fun ref update(
  i: USize val,
  value: A)
: A^ ?

```
 #### Parameters

 * i: [USize](builtin-usize) val
* value: A

 #### Returns

 * A^ ?

 ### clear

 [[Source]](https://stdlib.ponylang.io/src/builtin/seq/#L32)

 Removes all elements from the sequence.

 
```
fun ref clear()
: None val

```
 #### Returns

 * [None](builtin-none) val

 ### push

 [[Source]](https://stdlib.ponylang.io/src/builtin/seq/#L37)

 Adds an element to the end of the sequence.

 
```
fun ref push(
  value: A)
: None val

```
 #### Parameters

 * value: A

 #### Returns

 * [None](builtin-none) val

 ### pop

 [[Source]](https://stdlib.ponylang.io/src/builtin/seq/#L42)

 Removes an element from the end of the sequence.

 
```
fun ref pop()
: A^ ?

```
 #### Returns

 * A^ ?

 ### unshift

 [[Source]](https://stdlib.ponylang.io/src/builtin/seq/#L47)

 Adds an element to the beginning of the sequence.

 
```
fun ref unshift(
  value: A)
: None val

```
 #### Parameters

 * value: A

 #### Returns

 * [None](builtin-none) val

 ### shift

 [[Source]](https://stdlib.ponylang.io/src/builtin/seq/#L52)

 Removes an element from the beginning of the sequence.

 
```
fun ref shift()
: A^ ?

```
 #### Returns

 * A^ ?

 ### append

 [[Source]](https://stdlib.ponylang.io/src/builtin/seq/#L57)

 Add len elements to the end of the list, starting from the given offset.

 
```
fun ref append(
  seq: (ReadSeq[A] box & ReadElement[A^] box),
  offset: USize val = 0,
  len: USize val = call)
: None val

```
 #### Parameters

 * seq: ([ReadSeq](builtin-readseq)[A] box & [ReadElement](builtin-readelement)[A^] box)
* offset: [USize](builtin-usize) val = 0
* len: [USize](builtin-usize) val = call

 #### Returns

 * [None](builtin-none) val

 ### concat

 [[Source]](https://stdlib.ponylang.io/src/builtin/seq/#L66)

 Add len iterated elements to the end of the list, starting from the given offset.

 
```
fun ref concat(
  iter: Iterator[A^] ref,
  offset: USize val = 0,
  len: USize val = call)
: None val

```
 #### Parameters

 * iter: [Iterator](builtin-iterator)[A^] ref
* offset: [USize](builtin-usize) val = 0
* len: [USize](builtin-usize) val = call

 #### Returns

 * [None](builtin-none) val

 ### truncate

 [[Source]](https://stdlib.ponylang.io/src/builtin/seq/#L72)

 Truncate the sequence to the given length, discarding excess elements. If the sequence is already smaller than len, do nothing.

 
```
fun ref truncate(
  len: USize val)
: None val

```
 #### Parameters

 * len: [USize](builtin-usize) val

 #### Returns

 * [None](builtin-none) val

 ### values

 [[Source]](https://stdlib.ponylang.io/src/builtin/seq/#L78)

 Returns an iterator over the elements of the sequence.

 
```
fun box values()
: Iterator[this->A] ref^

```
 #### Returns

 * [Iterator](builtin-iterator)[this->A] ref^



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/builtin-Seq>

Integer[A: [Integer](index)[A] val]
===================================

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L213)

 
```
trait val Integer[A: Integer[A] val] is
  Real[A] val

```
 #### Implements

 * [Real](builtin-real)[A] val

 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L135)

 
```
new val create(
  value: A)
: Real[A] val^

```
 #### Parameters

 * value: A

 #### Returns

 * [Real](builtin-real)[A] val^

 ### from[B: (([I8](builtin-i8) val | [I16](builtin-i16) val | [I32](builtin-i32) val | [I64](builtin-i64) val | [I128](builtin-i128) val | [ILong](builtin-ilong) val | [ISize](builtin-isize) val | [U8](builtin-u8) val | [U16](builtin-u16) val | [U32](builtin-u32) val | [U64](builtin-u64) val | [U128](builtin-u128) val | [ULong](builtin-ulong) val | [USize](builtin-usize) val | [F32](builtin-f32) val | [F64](builtin-f64) val) & [Real](builtin-real)[B] val)]

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L137)

 
```
new val from[B: ((I8 val | I16 val | I32 val | 
    I64 val | I128 val | ILong val | 
    ISize val | U8 val | U16 val | 
    U32 val | U64 val | U128 val | 
    ULong val | USize val | F32 val | 
    F64 val) & Real[B] val)](
  a: B)
: Real[A] val^

```
 #### Parameters

 * a: B

 #### Returns

 * [Real](builtin-real)[A] val^

 ### min\_value

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L138)

 
```
new val min_value()
: Real[A] val^

```
 #### Returns

 * [Real](builtin-real)[A] val^

 ### max\_value

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L139)

 
```
new val max_value()
: Real[A] val^

```
 #### Returns

 * [Real](builtin-real)[A] val^

 Public Functions
----------------

 ### add\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L214)

 Unsafe operation. If the operation overflows, the result is undefined.

 
```
fun box add_unsafe(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### sub\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L221)

 Unsafe operation. If the operation overflows, the result is undefined.

 
```
fun box sub_unsafe(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### mul\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L228)

 Unsafe operation. If the operation overflows, the result is undefined.

 
```
fun box mul_unsafe(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### div\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L235)

 Integer division, rounded towards zero.

 Unsafe operation. If y is 0, the result is undefined. If the operation overflows, the result is undefined.

 
```
fun box div_unsafe(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### divrem\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L245)

 Calculates the quotient of this number and `y` and the remainder.

 Unsafe operation. If y is 0, the result is undefined. If the operation overflows, the result is undefined.

 
```
fun box divrem_unsafe(
  y: A)
: (A , A)

```
 #### Parameters

 * y: A

 #### Returns

 * (A , A)

 ### rem\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L255)

 Calculates the remainder of this number divided by `y`.

 Unsafe operation. If y is 0, the result is undefined. If the operation overflows, the result is undefined.

 
```
fun box rem_unsafe(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### fld\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L265)

 Floored division, rounded towards negative infinity, as opposed to `div` which rounds towards zero.

 *Unsafe Operation*

 If y is 0, the result is undefined. If the operation overflows, the result is undefined.

 
```
fun box fld_unsafe(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### mod\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L276)

 Calculates the modulo of this number after floored division by `y`.

 *Unsafe Operation.*

 If y is 0, the result is undefined. If the operation overflows, the result is undefined.

 
```
fun box mod_unsafe(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### add\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L286)

 Add y to this number.

 If the operation overflows this function errors.

 
```
fun box add_partial(
  y: A)
: A ?

```
 #### Parameters

 * y: A

 #### Returns

 * A ?

 ### sub\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L293)

 Subtract y from this number.

 If the operation overflows/underflows this function errors.

 
```
fun box sub_partial(
  y: A)
: A ?

```
 #### Parameters

 * y: A

 #### Returns

 * A ?

 ### mul\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L300)

 Multiply y with this number.

 If the operation overflows this function errors.

 
```
fun box mul_partial(
  y: A)
: A ?

```
 #### Parameters

 * y: A

 #### Returns

 * A ?

 ### div\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L307)

 Divides this number by `y`, rounds the result towards zero.

 If y is `0` or the operation overflows, this function errors.

 
```
fun box div_partial(
  y: A)
: A ?

```
 #### Parameters

 * y: A

 #### Returns

 * A ?

 ### rem\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L314)

 Calculates the remainder of this number divided by y. The result has the sign of the dividend.

 If y is `0` or the operation overflows, this function errors.

 
```
fun box rem_partial(
  y: A)
: A ?

```
 #### Parameters

 * y: A

 #### Returns

 * A ?

 ### divrem\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L322)

 Divides this number by y and calculates the remainder of the operation.

 If y is `0` or the operation overflows, this function errors.

 
```
fun box divrem_partial(
  y: A)
: (A , A) ?

```
 #### Parameters

 * y: A

 #### Returns

 * (A , A) ?

 ### fld\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L329)

 Floored integer division, rounded towards negative infinity.

 If y is `0` or the operation overflows, this function errors

 
```
fun box fld_partial(
  y: A)
: A ?

```
 #### Parameters

 * y: A

 #### Returns

 * A ?

 ### mod\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L336)

 Calculates the modulo of this number and `y` after floored division (`fld`). The result has the sign of the divisor.

 If y is `0` or the operation overflows, this function errors.

 
```
fun box mod_partial(
  y: A)
: A ?

```
 #### Parameters

 * y: A

 #### Returns

 * A ?

 ### neg\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L344)

 Unsafe operation. If the operation overflows, the result is undefined.

 
```
fun box neg_unsafe()
: A

```
 #### Returns

 * A

 ### addc

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L351)

 Add `y` to this integer and return the result and a flag indicating overflow.

 
```
fun box addc(
  y: A)
: (A , Bool val)

```
 #### Parameters

 * y: A

 #### Returns

 * (A , [Bool](builtin-bool) val)

 ### subc

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L355)

 Subtract `y` from this integer and return the result and a flag indicating overflow.

 
```
fun box subc(
  y: A)
: (A , Bool val)

```
 #### Parameters

 * y: A

 #### Returns

 * (A , [Bool](builtin-bool) val)

 ### mulc

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L359)

 Multiply `y` with this integer and return the result and a flag indicating overflow.

 
```
fun box mulc(
  y: A)
: (A , Bool val)

```
 #### Parameters

 * y: A

 #### Returns

 * (A , [Bool](builtin-bool) val)

 ### divc

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L363)

 Divide this integer by `y` and return the result and a flag indicating overflow or division by zero.

 
```
fun box divc(
  y: A)
: (A , Bool val)

```
 #### Parameters

 * y: A

 #### Returns

 * (A , [Bool](builtin-bool) val)

 ### remc

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L367)

 Calculate the remainder of this number divided by `y` and return the result and a flag indicating division by zero or overflow.

 The result will have the sign of the dividend.

 
```
fun box remc(
  y: A)
: (A , Bool val)

```
 #### Parameters

 * y: A

 #### Returns

 * (A , [Bool](builtin-bool) val)

 ### fldc

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L373)

 Divide this integer by `y` and return the result, rounded towards negative infinity and a flag indicating overflow or division by zero.

 
```
fun box fldc(
  y: A)
: (A , Bool val)

```
 #### Parameters

 * y: A

 #### Returns

 * (A , [Bool](builtin-bool) val)

 ### modc

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L377)

 Calculate the modulo of this number after floored division by `y` and return the result and a flag indicating division by zero or overflow.

 The result will have the sign of the divisor.

 
```
fun box modc(
  y: A)
: (A , Bool val)

```
 #### Parameters

 * y: A

 #### Returns

 * (A , [Bool](builtin-bool) val)

 ### op\_and

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L384)

 
```
fun box op_and(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### op\_or

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L385)

 
```
fun box op_or(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### op\_xor

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L386)

 
```
fun box op_xor(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### op\_not

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L387)

 
```
fun box op_not()
: A

```
 #### Returns

 * A

 ### bit\_reverse

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L389)

 Reverse the order of the bits within the integer. For example, 0b11101101 (237) would return 0b10110111 (183).

 
```
fun box bit_reverse()
: A

```
 #### Returns

 * A

 ### bswap

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L395)

 
```
fun box bswap()
: A

```
 #### Returns

 * A

 ### add

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L141)

 
```
fun box add(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### sub

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L142)

 
```
fun box sub(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### mul

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L143)

 
```
fun box mul(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### div

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L144)

 
```
fun box div(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### divrem

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L150)

 
```
fun box divrem(
  y: A)
: (A , A)

```
 #### Parameters

 * y: A

 #### Returns

 * (A , A)

 ### rem

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L151)

 
```
fun box rem(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### neg

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L159)

 
```
fun box neg()
: A

```
 #### Returns

 * A

 ### fld

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L161)

 
```
fun box fld(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### mod

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L165)

 
```
fun box mod(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L172)

 
```
fun box eq(
  y: box->A)
: Bool val

```
 #### Parameters

 * y: box->A

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L173)

 
```
fun box ne(
  y: box->A)
: Bool val

```
 #### Parameters

 * y: box->A

 #### Returns

 * [Bool](builtin-bool) val

 ### lt

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L174)

 
```
fun box lt(
  y: box->A)
: Bool val

```
 #### Parameters

 * y: box->A

 #### Returns

 * [Bool](builtin-bool) val

 ### le

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L175)

 
```
fun box le(
  y: box->A)
: Bool val

```
 #### Parameters

 * y: box->A

 #### Returns

 * [Bool](builtin-bool) val

 ### ge

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L176)

 
```
fun box ge(
  y: box->A)
: Bool val

```
 #### Parameters

 * y: box->A

 #### Returns

 * [Bool](builtin-bool) val

 ### gt

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L177)

 
```
fun box gt(
  y: box->A)
: Bool val

```
 #### Parameters

 * y: box->A

 #### Returns

 * [Bool](builtin-bool) val

 ### min

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L179)

 
```
fun box min(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### max

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L180)

 
```
fun box max(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### hash

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L182)

 
```
fun box hash()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### hash64

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L198)

 
```
fun box hash64()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### string

 [[Source]](https://stdlib.ponylang.io/src/builtin/stringable/#L5)

 
```
fun box string()
: String iso^

```
 #### Returns

 * [String](builtin-string) iso^

 ### i8

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L2)

 
```
fun box i8()
: I8 val

```
 #### Returns

 * [I8](builtin-i8) val

 ### i16

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L3)

 
```
fun box i16()
: I16 val

```
 #### Returns

 * [I16](builtin-i16) val

 ### i32

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L4)

 
```
fun box i32()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### i64

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L5)

 
```
fun box i64()
: I64 val

```
 #### Returns

 * [I64](builtin-i64) val

 ### i128

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L6)

 
```
fun box i128()
: I128 val

```
 #### Returns

 * [I128](builtin-i128) val

 ### ilong

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L7)

 
```
fun box ilong()
: ILong val

```
 #### Returns

 * [ILong](builtin-ilong) val

 ### isize

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L8)

 
```
fun box isize()
: ISize val

```
 #### Returns

 * [ISize](builtin-isize) val

 ### u8

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L10)

 
```
fun box u8()
: U8 val

```
 #### Returns

 * [U8](builtin-u8) val

 ### u16

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L11)

 
```
fun box u16()
: U16 val

```
 #### Returns

 * [U16](builtin-u16) val

 ### u32

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L12)

 
```
fun box u32()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### u64

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L13)

 
```
fun box u64()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### u128

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L14)

 
```
fun box u128()
: U128 val

```
 #### Returns

 * [U128](builtin-u128) val

 ### ulong

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L15)

 
```
fun box ulong()
: ULong val

```
 #### Returns

 * [ULong](builtin-ulong) val

 ### usize

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L16)

 
```
fun box usize()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### f32

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L18)

 
```
fun box f32()
: F32 val

```
 #### Returns

 * [F32](builtin-f32) val

 ### f64

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L19)

 
```
fun box f64()
: F64 val

```
 #### Returns

 * [F64](builtin-f64) val

 ### i8\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L21)

 
```
fun box i8_unsafe()
: I8 val

```
 #### Returns

 * [I8](builtin-i8) val

 ### i16\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L28)

 
```
fun box i16_unsafe()
: I16 val

```
 #### Returns

 * [I16](builtin-i16) val

 ### i32\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L35)

 
```
fun box i32_unsafe()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### i64\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L42)

 
```
fun box i64_unsafe()
: I64 val

```
 #### Returns

 * [I64](builtin-i64) val

 ### i128\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L49)

 
```
fun box i128_unsafe()
: I128 val

```
 #### Returns

 * [I128](builtin-i128) val

 ### ilong\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L56)

 
```
fun box ilong_unsafe()
: ILong val

```
 #### Returns

 * [ILong](builtin-ilong) val

 ### isize\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L63)

 
```
fun box isize_unsafe()
: ISize val

```
 #### Returns

 * [ISize](builtin-isize) val

 ### u8\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L70)

 
```
fun box u8_unsafe()
: U8 val

```
 #### Returns

 * [U8](builtin-u8) val

 ### u16\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L77)

 
```
fun box u16_unsafe()
: U16 val

```
 #### Returns

 * [U16](builtin-u16) val

 ### u32\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L84)

 
```
fun box u32_unsafe()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### u64\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L91)

 
```
fun box u64_unsafe()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### u128\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L98)

 
```
fun box u128_unsafe()
: U128 val

```
 #### Returns

 * [U128](builtin-u128) val

 ### ulong\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L105)

 
```
fun box ulong_unsafe()
: ULong val

```
 #### Returns

 * [ULong](builtin-ulong) val

 ### usize\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L112)

 
```
fun box usize_unsafe()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### f32\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L119)

 
```
fun box f32_unsafe()
: F32 val

```
 #### Returns

 * [F32](builtin-f32) val

 ### f64\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L126)

 
```
fun box f64_unsafe()
: F64 val

```
 #### Returns

 * [F64](builtin-f64) val

 ### compare

 
```
fun box compare(
  that: box->A)
: (Less val | Equal val | Greater val)

```
 #### Parameters

 * that: box->A

 #### Returns

 * ([Less](builtin-less) val | [Equal](builtin-equal) val | [Greater](builtin-greater) val)



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/builtin-Integer>

Real[A: [Real](index)[A] val]
=============================

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L133)

 
```
trait val Real[A: Real[A] val] is
  Stringable box,
  _ArithmeticConvertible val,
  Comparable[A] ref

```
 #### Implements

 * [Stringable](builtin-stringable) box
* \_ArithmeticConvertible val
* [Comparable](builtin-comparable)[A] ref

 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L135)

 
```
new val create(
  value: A)
: Real[A] val^

```
 #### Parameters

 * value: A

 #### Returns

 * [Real](index)[A] val^

 ### from[B: (([I8](builtin-i8) val | [I16](builtin-i16) val | [I32](builtin-i32) val | [I64](builtin-i64) val | [I128](builtin-i128) val | [ILong](builtin-ilong) val | [ISize](builtin-isize) val | [U8](builtin-u8) val | [U16](builtin-u16) val | [U32](builtin-u32) val | [U64](builtin-u64) val | [U128](builtin-u128) val | [ULong](builtin-ulong) val | [USize](builtin-usize) val | [F32](builtin-f32) val | [F64](builtin-f64) val) & [Real](index)[B] val)]

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L137)

 
```
new val from[B: ((I8 val | I16 val | I32 val | 
    I64 val | I128 val | ILong val | 
    ISize val | U8 val | U16 val | 
    U32 val | U64 val | U128 val | 
    ULong val | USize val | F32 val | 
    F64 val) & Real[B] val)](
  a: B)
: Real[A] val^

```
 #### Parameters

 * a: B

 #### Returns

 * [Real](index)[A] val^

 ### min\_value

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L138)

 
```
new val min_value()
: Real[A] val^

```
 #### Returns

 * [Real](index)[A] val^

 ### max\_value

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L139)

 
```
new val max_value()
: Real[A] val^

```
 #### Returns

 * [Real](index)[A] val^

 Public Functions
----------------

 ### add

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L141)

 
```
fun box add(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### sub

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L142)

 
```
fun box sub(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### mul

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L143)

 
```
fun box mul(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### div

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L144)

 Integer division, rounded towards zero.

 
```
fun box div(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### divrem

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L150)

 
```
fun box divrem(
  y: A)
: (A , A)

```
 #### Parameters

 * y: A

 #### Returns

 * (A , A)

 ### rem

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L151)

 Calculate the remainder after integer division, rounded towards zero (`div`).

 The result has the sign of the dividend.

 
```
fun box rem(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### neg

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L159)

 
```
fun box neg()
: A

```
 #### Returns

 * A

 ### fld

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L161)

 Floored integer division, rounded towards negative infinity.

 
```
fun box fld(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### mod

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L165)

 Calculate the modulo after floored integer division, rounded towards negative infinity (`fld`).

 The result has the sign of the divisor.

 
```
fun box mod(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L172)

 
```
fun box eq(
  y: box->A)
: Bool val

```
 #### Parameters

 * y: box->A

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L173)

 
```
fun box ne(
  y: box->A)
: Bool val

```
 #### Parameters

 * y: box->A

 #### Returns

 * [Bool](builtin-bool) val

 ### lt

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L174)

 
```
fun box lt(
  y: box->A)
: Bool val

```
 #### Parameters

 * y: box->A

 #### Returns

 * [Bool](builtin-bool) val

 ### le

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L175)

 
```
fun box le(
  y: box->A)
: Bool val

```
 #### Parameters

 * y: box->A

 #### Returns

 * [Bool](builtin-bool) val

 ### ge

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L176)

 
```
fun box ge(
  y: box->A)
: Bool val

```
 #### Parameters

 * y: box->A

 #### Returns

 * [Bool](builtin-bool) val

 ### gt

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L177)

 
```
fun box gt(
  y: box->A)
: Bool val

```
 #### Parameters

 * y: box->A

 #### Returns

 * [Bool](builtin-bool) val

 ### min

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L179)

 
```
fun box min(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### max

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L180)

 
```
fun box max(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### hash

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L182)

 
```
fun box hash()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### hash64

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L198)

 
```
fun box hash64()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### string

 [[Source]](https://stdlib.ponylang.io/src/builtin/stringable/#L5)

 
```
fun box string()
: String iso^

```
 #### Returns

 * [String](builtin-string) iso^

 ### i8

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L2)

 
```
fun box i8()
: I8 val

```
 #### Returns

 * [I8](builtin-i8) val

 ### i16

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L3)

 
```
fun box i16()
: I16 val

```
 #### Returns

 * [I16](builtin-i16) val

 ### i32

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L4)

 
```
fun box i32()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### i64

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L5)

 
```
fun box i64()
: I64 val

```
 #### Returns

 * [I64](builtin-i64) val

 ### i128

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L6)

 
```
fun box i128()
: I128 val

```
 #### Returns

 * [I128](builtin-i128) val

 ### ilong

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L7)

 
```
fun box ilong()
: ILong val

```
 #### Returns

 * [ILong](builtin-ilong) val

 ### isize

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L8)

 
```
fun box isize()
: ISize val

```
 #### Returns

 * [ISize](builtin-isize) val

 ### u8

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L10)

 
```
fun box u8()
: U8 val

```
 #### Returns

 * [U8](builtin-u8) val

 ### u16

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L11)

 
```
fun box u16()
: U16 val

```
 #### Returns

 * [U16](builtin-u16) val

 ### u32

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L12)

 
```
fun box u32()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### u64

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L13)

 
```
fun box u64()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### u128

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L14)

 
```
fun box u128()
: U128 val

```
 #### Returns

 * [U128](builtin-u128) val

 ### ulong

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L15)

 
```
fun box ulong()
: ULong val

```
 #### Returns

 * [ULong](builtin-ulong) val

 ### usize

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L16)

 
```
fun box usize()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### f32

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L18)

 
```
fun box f32()
: F32 val

```
 #### Returns

 * [F32](builtin-f32) val

 ### f64

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L19)

 
```
fun box f64()
: F64 val

```
 #### Returns

 * [F64](builtin-f64) val

 ### i8\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L21)

 
```
fun box i8_unsafe()
: I8 val

```
 #### Returns

 * [I8](builtin-i8) val

 ### i16\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L28)

 
```
fun box i16_unsafe()
: I16 val

```
 #### Returns

 * [I16](builtin-i16) val

 ### i32\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L35)

 
```
fun box i32_unsafe()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### i64\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L42)

 
```
fun box i64_unsafe()
: I64 val

```
 #### Returns

 * [I64](builtin-i64) val

 ### i128\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L49)

 
```
fun box i128_unsafe()
: I128 val

```
 #### Returns

 * [I128](builtin-i128) val

 ### ilong\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L56)

 
```
fun box ilong_unsafe()
: ILong val

```
 #### Returns

 * [ILong](builtin-ilong) val

 ### isize\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L63)

 
```
fun box isize_unsafe()
: ISize val

```
 #### Returns

 * [ISize](builtin-isize) val

 ### u8\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L70)

 
```
fun box u8_unsafe()
: U8 val

```
 #### Returns

 * [U8](builtin-u8) val

 ### u16\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L77)

 
```
fun box u16_unsafe()
: U16 val

```
 #### Returns

 * [U16](builtin-u16) val

 ### u32\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L84)

 
```
fun box u32_unsafe()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### u64\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L91)

 
```
fun box u64_unsafe()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### u128\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L98)

 
```
fun box u128_unsafe()
: U128 val

```
 #### Returns

 * [U128](builtin-u128) val

 ### ulong\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L105)

 
```
fun box ulong_unsafe()
: ULong val

```
 #### Returns

 * [ULong](builtin-ulong) val

 ### usize\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L112)

 
```
fun box usize_unsafe()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### f32\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L119)

 
```
fun box f32_unsafe()
: F32 val

```
 #### Returns

 * [F32](builtin-f32) val

 ### f64\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L126)

 
```
fun box f64_unsafe()
: F64 val

```
 #### Returns

 * [F64](builtin-f64) val

 ### compare

 
```
fun box compare(
  that: box->A)
: (Less val | Equal val | Greater val)

```
 #### Parameters

 * that: box->A

 #### Returns

 * ([Less](builtin-less) val | [Equal](builtin-equal) val | [Greater](builtin-greater) val)



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/builtin-Real>

ReadSeq[A: A]
=============

 [[Source]](https://stdlib.ponylang.io/src/builtin/read_seq/#L1)

 The readable interface of a sequence.

 
```
interface box ReadSeq[A: A]

```
 Public Functions
----------------

 ### size

 [[Source]](https://stdlib.ponylang.io/src/builtin/read_seq/#L5)

 Returns the number of elements in the sequence.

 
```
fun box size()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### apply

 [[Source]](https://stdlib.ponylang.io/src/builtin/read_seq/#L10)

 Returns the i-th element of the sequence. Raises an error if the index is out of bounds. Note that this returns this->A, not A.

 
```
fun box apply(
  i: USize val)
: this->A ?

```
 #### Parameters

 * i: [USize](builtin-usize) val

 #### Returns

 * this->A ?

 ### values

 [[Source]](https://stdlib.ponylang.io/src/builtin/read_seq/#L16)

 Returns an iterator over the elements of the sequence. Note that this iterates over this->A, not A.

 
```
fun box values()
: Iterator[this->A] ref^

```
 #### Returns

 * [Iterator](builtin-iterator)[this->A] ref^



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/builtin-ReadSeq>

ReadElement[A: A]
=================

 [[Source]](https://stdlib.ponylang.io/src/builtin/read_seq/#L22)

 Used to show that a ReadSeq can return an element of a specific unmodified type.

 
```
interface box ReadElement[A: A]

```
 Public Functions
----------------

 ### apply

 [[Source]](https://stdlib.ponylang.io/src/builtin/read_seq/#L27)

 
```
fun box apply(
  i: USize val)
: A ?

```
 #### Parameters

 * i: [USize](builtin-usize) val

 #### Returns

 * A ?



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/builtin-ReadElement>

I128
====

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L664)

 
```
primitive val I128 is
  SignedInteger[I128 val, U128 val] val

```
 #### Implements

 * [SignedInteger](builtin-signedinteger)[[I128](index) val, [U128](builtin-u128) val] val

 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L665)

 
```
new val create(
  value: I128 val)
: I128 val^

```
 #### Parameters

 * value: [I128](index) val

 #### Returns

 * [I128](index) val^

 ### from[A: (([I8](builtin-i8) val | [I16](builtin-i16) val | [I32](builtin-i32) val | [I64](builtin-i64) val | [I128](index) val | [ILong](builtin-ilong) val | [ISize](builtin-isize) val | [U8](builtin-u8) val | [U16](builtin-u16) val | [U32](builtin-u32) val | [U64](builtin-u64) val | [U128](builtin-u128) val | [ULong](builtin-ulong) val | [USize](builtin-usize) val | [F32](builtin-f32) val | [F64](builtin-f64) val) & [Real](builtin-real)[A] val)]

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L666)

 
```
new val from[A: ((I8 val | I16 val | I32 val | 
    I64 val | I128 val | ILong val | 
    ISize val | U8 val | U16 val | 
    U32 val | U64 val | U128 val | 
    ULong val | USize val | F32 val | 
    F64 val) & Real[A] val)](
  a: A)
: I128 val^

```
 #### Parameters

 * a: A

 #### Returns

 * [I128](index) val^

 ### min\_value

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L668)

 
```
new val min_value()
: I128 val^

```
 #### Returns

 * [I128](index) val^

 ### max\_value

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L669)

 
```
new val max_value()
: I128 val^

```
 #### Returns

 * [I128](index) val^

 Public Functions
----------------

 ### abs

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L671)

 
```
fun box abs()
: U128 val

```
 #### Returns

 * [U128](builtin-u128) val

 ### bit\_reverse

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L672)

 
```
fun box bit_reverse()
: I128 val

```
 #### Returns

 * [I128](index) val

 ### bswap

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L673)

 
```
fun box bswap()
: I128 val

```
 #### Returns

 * [I128](index) val

 ### popcount

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L674)

 
```
fun box popcount()
: U128 val

```
 #### Returns

 * [U128](builtin-u128) val

 ### clz

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L675)

 
```
fun box clz()
: U128 val

```
 #### Returns

 * [U128](builtin-u128) val

 ### ctz

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L676)

 
```
fun box ctz()
: U128 val

```
 #### Returns

 * [U128](builtin-u128) val

 ### clz\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L678)

 Unsafe operation. If this is 0, the result is undefined.

 
```
fun box clz_unsafe()
: U128 val

```
 #### Returns

 * [U128](builtin-u128) val

 ### ctz\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L685)

 Unsafe operation. If this is 0, the result is undefined.

 
```
fun box ctz_unsafe()
: U128 val

```
 #### Returns

 * [U128](builtin-u128) val

 ### bitwidth

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L692)

 
```
fun box bitwidth()
: U128 val

```
 #### Returns

 * [U128](builtin-u128) val

 ### bytewidth

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L694)

 
```
fun box bytewidth()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### min

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L696)

 
```
fun box min(
  y: I128 val)
: I128 val

```
 #### Parameters

 * y: [I128](index) val

 #### Returns

 * [I128](index) val

 ### max

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L697)

 
```
fun box max(
  y: I128 val)
: I128 val

```
 #### Parameters

 * y: [I128](index) val

 #### Returns

 * [I128](index) val

 ### fld

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L699)

 
```
fun box fld(
  y: I128 val)
: I128 val

```
 #### Parameters

 * y: [I128](index) val

 #### Returns

 * [I128](index) val

 ### fld\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L701)

 
```
fun box fld_unsafe(
  y: I128 val)
: I128 val

```
 #### Parameters

 * y: [I128](index) val

 #### Returns

 * [I128](index) val

 ### mod

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L704)

 
```
fun box mod(
  y: I128 val)
: I128 val

```
 #### Parameters

 * y: [I128](index) val

 #### Returns

 * [I128](index) val

 ### mod\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L707)

 
```
fun box mod_unsafe(
  y: I128 val)
: I128 val

```
 #### Parameters

 * y: [I128](index) val

 #### Returns

 * [I128](index) val

 ### hash

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L710)

 
```
fun box hash()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### hash64

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L711)

 
```
fun box hash64()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### string

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L713)

 
```
fun box string()
: String iso^

```
 #### Returns

 * [String](builtin-string) iso^

 ### mul

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L716)

 
```
fun box mul(
  y: I128 val)
: I128 val

```
 #### Parameters

 * y: [I128](index) val

 #### Returns

 * [I128](index) val

 ### divrem

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L719)

 
```
fun box divrem(
  y: I128 val)
: (I128 val , I128 val)

```
 #### Parameters

 * y: [I128](index) val

 #### Returns

 * ([I128](index) val , [I128](index) val)

 ### div

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L746)

 
```
fun box div(
  y: I128 val)
: I128 val

```
 #### Parameters

 * y: [I128](index) val

 #### Returns

 * [I128](index) val

 ### rem

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L754)

 
```
fun box rem(
  y: I128 val)
: I128 val

```
 #### Parameters

 * y: [I128](index) val

 #### Returns

 * [I128](index) val

 ### mul\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L762)

 Unsafe operation. If the operation overflows, the result is undefined.

 
```
fun box mul_unsafe(
  y: I128 val)
: I128 val

```
 #### Parameters

 * y: [I128](index) val

 #### Returns

 * [I128](index) val

 ### divrem\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L773)

 Unsafe operation. If y is 0, the result is undefined. If the operation overflows, the result is undefined.

 
```
fun box divrem_unsafe(
  y: I128 val)
: (I128 val , I128 val)

```
 #### Parameters

 * y: [I128](index) val

 #### Returns

 * ([I128](index) val , [I128](index) val)

 ### div\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L785)

 Unsafe operation. If y is 0, the result is undefined. If the operation overflows, the result is undefined.

 
```
fun box div_unsafe(
  y: I128 val)
: I128 val

```
 #### Parameters

 * y: [I128](index) val

 #### Returns

 * [I128](index) val

 ### rem\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L797)

 Unsafe operation. If y is 0, the result is undefined. If the operation overflows, the result is undefined.

 
```
fun box rem_unsafe(
  y: I128 val)
: I128 val

```
 #### Parameters

 * y: [I128](index) val

 #### Returns

 * [I128](index) val

 ### f32

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L809)

 
```
fun box f32()
: F32 val

```
 #### Returns

 * [F32](builtin-f32) val

 ### f64

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L812)

 
```
fun box f64()
: F64 val

```
 #### Returns

 * [F64](builtin-f64) val

 ### f32\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L819)

 Unsafe operation. If the value doesn't fit in the destination type, the result is undefined.

 
```
fun box f32_unsafe()
: F32 val

```
 #### Returns

 * [F32](builtin-f32) val

 ### f64\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L826)

 Unsafe operation. If the value doesn't fit in the destination type, the result is undefined.

 
```
fun box f64_unsafe()
: F64 val

```
 #### Returns

 * [F64](builtin-f64) val

 ### addc

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L833)

 
```
fun box addc(
  y: I128 val)
: (I128 val , Bool val)

```
 #### Parameters

 * y: [I128](index) val

 #### Returns

 * ([I128](index) val , [Bool](builtin-bool) val)

 ### subc

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L847)

 
```
fun box subc(
  y: I128 val)
: (I128 val , Bool val)

```
 #### Parameters

 * y: [I128](index) val

 #### Returns

 * ([I128](index) val , [Bool](builtin-bool) val)

 ### mulc

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L861)

 
```
fun box mulc(
  y: I128 val)
: (I128 val , Bool val)

```
 #### Parameters

 * y: [I128](index) val

 #### Returns

 * ([I128](index) val , [Bool](builtin-bool) val)

 ### divc

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L869)

 
```
fun box divc(
  y: I128 val)
: (I128 val , Bool val)

```
 #### Parameters

 * y: [I128](index) val

 #### Returns

 * ([I128](index) val , [Bool](builtin-bool) val)

 ### remc

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L872)

 
```
fun box remc(
  y: I128 val)
: (I128 val , Bool val)

```
 #### Parameters

 * y: [I128](index) val

 #### Returns

 * ([I128](index) val , [Bool](builtin-bool) val)

 ### fldc

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L875)

 
```
fun box fldc(
  y: I128 val)
: (I128 val , Bool val)

```
 #### Parameters

 * y: [I128](index) val

 #### Returns

 * ([I128](index) val , [Bool](builtin-bool) val)

 ### modc

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L878)

 
```
fun box modc(
  y: I128 val)
: (I128 val , Bool val)

```
 #### Parameters

 * y: [I128](index) val

 #### Returns

 * ([I128](index) val , [Bool](builtin-bool) val)

 ### add\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L881)

 
```
fun box add_partial(
  y: I128 val)
: I128 val ?

```
 #### Parameters

 * y: [I128](index) val

 #### Returns

 * [I128](index) val ?

 ### sub\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L884)

 
```
fun box sub_partial(
  y: I128 val)
: I128 val ?

```
 #### Parameters

 * y: [I128](index) val

 #### Returns

 * [I128](index) val ?

 ### mul\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L887)

 
```
fun box mul_partial(
  y: I128 val)
: I128 val ?

```
 #### Parameters

 * y: [I128](index) val

 #### Returns

 * [I128](index) val ?

 ### div\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L890)

 
```
fun box div_partial(
  y: I128 val)
: I128 val ?

```
 #### Parameters

 * y: [I128](index) val

 #### Returns

 * [I128](index) val ?

 ### rem\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L893)

 
```
fun box rem_partial(
  y: I128 val)
: I128 val ?

```
 #### Parameters

 * y: [I128](index) val

 #### Returns

 * [I128](index) val ?

 ### divrem\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L896)

 
```
fun box divrem_partial(
  y: I128 val)
: (I128 val , I128 val) ?

```
 #### Parameters

 * y: [I128](index) val

 #### Returns

 * ([I128](index) val , [I128](index) val) ?

 ### fld\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L899)

 
```
fun box fld_partial(
  y: I128 val)
: I128 val ?

```
 #### Parameters

 * y: [I128](index) val

 #### Returns

 * [I128](index) val ?

 ### mod\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/signed/#L902)

 
```
fun box mod_partial(
  y: I128 val)
: I128 val ?

```
 #### Parameters

 * y: [I128](index) val

 #### Returns

 * [I128](index) val ?

 ### shl

 
```
fun box shl(
  y: U128 val)
: I128 val

```
 #### Parameters

 * y: [U128](builtin-u128) val

 #### Returns

 * [I128](index) val

 ### shr

 
```
fun box shr(
  y: U128 val)
: I128 val

```
 #### Parameters

 * y: [U128](builtin-u128) val

 #### Returns

 * [I128](index) val

 ### shl\_unsafe

 
```
fun box shl_unsafe(
  y: U128 val)
: I128 val

```
 #### Parameters

 * y: [U128](builtin-u128) val

 #### Returns

 * [I128](index) val

 ### shr\_unsafe

 
```
fun box shr_unsafe(
  y: U128 val)
: I128 val

```
 #### Parameters

 * y: [U128](builtin-u128) val

 #### Returns

 * [I128](index) val

 ### add\_unsafe

 
```
fun box add_unsafe(
  y: I128 val)
: I128 val

```
 #### Parameters

 * y: [I128](index) val

 #### Returns

 * [I128](index) val

 ### sub\_unsafe

 
```
fun box sub_unsafe(
  y: I128 val)
: I128 val

```
 #### Parameters

 * y: [I128](index) val

 #### Returns

 * [I128](index) val

 ### neg\_unsafe

 
```
fun box neg_unsafe()
: I128 val

```
 #### Returns

 * [I128](index) val

 ### op\_and

 
```
fun box op_and(
  y: I128 val)
: I128 val

```
 #### Parameters

 * y: [I128](index) val

 #### Returns

 * [I128](index) val

 ### op\_or

 
```
fun box op_or(
  y: I128 val)
: I128 val

```
 #### Parameters

 * y: [I128](index) val

 #### Returns

 * [I128](index) val

 ### op\_xor

 
```
fun box op_xor(
  y: I128 val)
: I128 val

```
 #### Parameters

 * y: [I128](index) val

 #### Returns

 * [I128](index) val

 ### op\_not

 
```
fun box op_not()
: I128 val

```
 #### Returns

 * [I128](index) val

 ### add

 
```
fun box add(
  y: I128 val)
: I128 val

```
 #### Parameters

 * y: [I128](index) val

 #### Returns

 * [I128](index) val

 ### sub

 
```
fun box sub(
  y: I128 val)
: I128 val

```
 #### Parameters

 * y: [I128](index) val

 #### Returns

 * [I128](index) val

 ### neg

 
```
fun box neg()
: I128 val

```
 #### Returns

 * [I128](index) val

 ### eq

 
```
fun box eq(
  y: I128 val)
: Bool val

```
 #### Parameters

 * y: [I128](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 
```
fun box ne(
  y: I128 val)
: Bool val

```
 #### Parameters

 * y: [I128](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### lt

 
```
fun box lt(
  y: I128 val)
: Bool val

```
 #### Parameters

 * y: [I128](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### le

 
```
fun box le(
  y: I128 val)
: Bool val

```
 #### Parameters

 * y: [I128](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ge

 
```
fun box ge(
  y: I128 val)
: Bool val

```
 #### Parameters

 * y: [I128](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### gt

 
```
fun box gt(
  y: I128 val)
: Bool val

```
 #### Parameters

 * y: [I128](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### i8

 
```
fun box i8()
: I8 val

```
 #### Returns

 * [I8](builtin-i8) val

 ### i16

 
```
fun box i16()
: I16 val

```
 #### Returns

 * [I16](builtin-i16) val

 ### i32

 
```
fun box i32()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### i64

 
```
fun box i64()
: I64 val

```
 #### Returns

 * [I64](builtin-i64) val

 ### i128

 
```
fun box i128()
: I128 val

```
 #### Returns

 * [I128](index) val

 ### ilong

 
```
fun box ilong()
: ILong val

```
 #### Returns

 * [ILong](builtin-ilong) val

 ### isize

 
```
fun box isize()
: ISize val

```
 #### Returns

 * [ISize](builtin-isize) val

 ### u8

 
```
fun box u8()
: U8 val

```
 #### Returns

 * [U8](builtin-u8) val

 ### u16

 
```
fun box u16()
: U16 val

```
 #### Returns

 * [U16](builtin-u16) val

 ### u32

 
```
fun box u32()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### u64

 
```
fun box u64()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### u128

 
```
fun box u128()
: U128 val

```
 #### Returns

 * [U128](builtin-u128) val

 ### ulong

 
```
fun box ulong()
: ULong val

```
 #### Returns

 * [ULong](builtin-ulong) val

 ### usize

 
```
fun box usize()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### i8\_unsafe

 
```
fun box i8_unsafe()
: I8 val

```
 #### Returns

 * [I8](builtin-i8) val

 ### i16\_unsafe

 
```
fun box i16_unsafe()
: I16 val

```
 #### Returns

 * [I16](builtin-i16) val

 ### i32\_unsafe

 
```
fun box i32_unsafe()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### i64\_unsafe

 
```
fun box i64_unsafe()
: I64 val

```
 #### Returns

 * [I64](builtin-i64) val

 ### i128\_unsafe

 
```
fun box i128_unsafe()
: I128 val

```
 #### Returns

 * [I128](index) val

 ### ilong\_unsafe

 
```
fun box ilong_unsafe()
: ILong val

```
 #### Returns

 * [ILong](builtin-ilong) val

 ### isize\_unsafe

 
```
fun box isize_unsafe()
: ISize val

```
 #### Returns

 * [ISize](builtin-isize) val

 ### u8\_unsafe

 
```
fun box u8_unsafe()
: U8 val

```
 #### Returns

 * [U8](builtin-u8) val

 ### u16\_unsafe

 
```
fun box u16_unsafe()
: U16 val

```
 #### Returns

 * [U16](builtin-u16) val

 ### u32\_unsafe

 
```
fun box u32_unsafe()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### u64\_unsafe

 
```
fun box u64_unsafe()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### u128\_unsafe

 
```
fun box u128_unsafe()
: U128 val

```
 #### Returns

 * [U128](builtin-u128) val

 ### ulong\_unsafe

 
```
fun box ulong_unsafe()
: ULong val

```
 #### Returns

 * [ULong](builtin-ulong) val

 ### usize\_unsafe

 
```
fun box usize_unsafe()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### compare

 
```
fun box compare(
  that: I128 val)
: (Less val | Equal val | Greater val)

```
 #### Parameters

 * that: [I128](index) val

 #### Returns

 * ([Less](builtin-less) val | [Equal](builtin-equal) val | [Greater](builtin-greater) val)



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/builtin-I128>

Pointer[A: A]
=============

 [[Source]](https://stdlib.ponylang.io/src/builtin/pointer/#L1)

 A Pointer[A] is a raw memory pointer. It has no descriptor and thus can't be included in a union or intersection, or be a subtype of any interface. Most functions on a Pointer[A] are private to maintain memory safety.

 
```
struct ref Pointer[A: A]

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/builtin/pointer/#L7)

 A null pointer.

 
```
new ref create()
: Pointer[A] ref^

```
 #### Returns

 * [Pointer](index)[A] ref^

 Public Functions
----------------

 ### offset

 [[Source]](https://stdlib.ponylang.io/src/builtin/pointer/#L55)

 Return a tag pointer to the n-th element.

 
```
fun tag offset(
  n: USize val)
: Pointer[A] tag

```
 #### Parameters

 * n: [USize](builtin-usize) val

 #### Returns

 * [Pointer](index)[A] tag

 ### usize

 [[Source]](https://stdlib.ponylang.io/src/builtin/pointer/#L89)

 Convert the pointer into an integer.

 
```
fun tag usize()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### is\_null

 [[Source]](https://stdlib.ponylang.io/src/builtin/pointer/#L95)

 Return true for a null pointer, false for anything else.

 
```
fun tag is_null()
: Bool val

```
 #### Returns

 * [Bool](builtin-bool) val

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/builtin/pointer/#L101)

 Return true if this address is that address.

 
```
fun tag eq(
  that: Pointer[A] tag)
: Bool val

```
 #### Parameters

 * that: [Pointer](index)[A] tag

 #### Returns

 * [Bool](builtin-bool) val

 ### lt

 [[Source]](https://stdlib.ponylang.io/src/builtin/pointer/#L107)

 Return true if this address is less than that address.

 
```
fun tag lt(
  that: Pointer[A] tag)
: Bool val

```
 #### Parameters

 * that: [Pointer](index)[A] tag

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/builtin/pointer/#L113)

 
```
fun tag ne(
  that: Pointer[A] tag)
: Bool val

```
 #### Parameters

 * that: [Pointer](index)[A] tag

 #### Returns

 * [Bool](builtin-bool) val

 ### le

 [[Source]](https://stdlib.ponylang.io/src/builtin/pointer/#L114)

 
```
fun tag le(
  that: Pointer[A] tag)
: Bool val

```
 #### Parameters

 * that: [Pointer](index)[A] tag

 #### Returns

 * [Bool](builtin-bool) val

 ### ge

 [[Source]](https://stdlib.ponylang.io/src/builtin/pointer/#L115)

 
```
fun tag ge(
  that: Pointer[A] tag)
: Bool val

```
 #### Parameters

 * that: [Pointer](index)[A] tag

 #### Returns

 * [Bool](builtin-bool) val

 ### gt

 [[Source]](https://stdlib.ponylang.io/src/builtin/pointer/#L116)

 
```
fun tag gt(
  that: Pointer[A] tag)
: Bool val

```
 #### Parameters

 * that: [Pointer](index)[A] tag

 #### Returns

 * [Bool](builtin-bool) val

 ### hash

 [[Source]](https://stdlib.ponylang.io/src/builtin/pointer/#L118)

 Returns a hash of the address.

 
```
fun tag hash()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### hash64

 [[Source]](https://stdlib.ponylang.io/src/builtin/pointer/#L124)

 Returns a 64-bit hash of the address.

 
```
fun tag hash64()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/builtin-Pointer>

Platform
========

 [[Source]](https://stdlib.ponylang.io/src/builtin/platform/#L1)

 
```
primitive val Platform

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/builtin/platform/#L1)

 
```
new val create()
: Platform val^

```
 #### Returns

 * [Platform](index) val^

 Public Functions
----------------

 ### bsd

 [[Source]](https://stdlib.ponylang.io/src/builtin/platform/#L2)

 
```
fun box bsd()
: Bool val

```
 #### Returns

 * [Bool](builtin-bool) val

 ### freebsd

 [[Source]](https://stdlib.ponylang.io/src/builtin/platform/#L3)

 
```
fun box freebsd()
: Bool val

```
 #### Returns

 * [Bool](builtin-bool) val

 ### dragonfly

 [[Source]](https://stdlib.ponylang.io/src/builtin/platform/#L4)

 
```
fun box dragonfly()
: Bool val

```
 #### Returns

 * [Bool](builtin-bool) val

 ### openbsd

 [[Source]](https://stdlib.ponylang.io/src/builtin/platform/#L5)

 
```
fun box openbsd()
: Bool val

```
 #### Returns

 * [Bool](builtin-bool) val

 ### linux

 [[Source]](https://stdlib.ponylang.io/src/builtin/platform/#L6)

 
```
fun box linux()
: Bool val

```
 #### Returns

 * [Bool](builtin-bool) val

 ### osx

 [[Source]](https://stdlib.ponylang.io/src/builtin/platform/#L7)

 
```
fun box osx()
: Bool val

```
 #### Returns

 * [Bool](builtin-bool) val

 ### posix

 [[Source]](https://stdlib.ponylang.io/src/builtin/platform/#L8)

 
```
fun box posix()
: Bool val

```
 #### Returns

 * [Bool](builtin-bool) val

 ### windows

 [[Source]](https://stdlib.ponylang.io/src/builtin/platform/#L9)

 
```
fun box windows()
: Bool val

```
 #### Returns

 * [Bool](builtin-bool) val

 ### x86

 [[Source]](https://stdlib.ponylang.io/src/builtin/platform/#L11)

 
```
fun box x86()
: Bool val

```
 #### Returns

 * [Bool](builtin-bool) val

 ### arm

 [[Source]](https://stdlib.ponylang.io/src/builtin/platform/#L12)

 
```
fun box arm()
: Bool val

```
 #### Returns

 * [Bool](builtin-bool) val

 ### lp64

 [[Source]](https://stdlib.ponylang.io/src/builtin/platform/#L14)

 
```
fun box lp64()
: Bool val

```
 #### Returns

 * [Bool](builtin-bool) val

 ### llp64

 [[Source]](https://stdlib.ponylang.io/src/builtin/platform/#L15)

 
```
fun box llp64()
: Bool val

```
 #### Returns

 * [Bool](builtin-bool) val

 ### ilp32

 [[Source]](https://stdlib.ponylang.io/src/builtin/platform/#L16)

 
```
fun box ilp32()
: Bool val

```
 #### Returns

 * [Bool](builtin-bool) val

 ### bigendian

 [[Source]](https://stdlib.ponylang.io/src/builtin/platform/#L18)

 
```
fun box bigendian()
: Bool val

```
 #### Returns

 * [Bool](builtin-bool) val

 ### littleendian

 [[Source]](https://stdlib.ponylang.io/src/builtin/platform/#L19)

 
```
fun box littleendian()
: Bool val

```
 #### Returns

 * [Bool](builtin-bool) val

 ### native128

 [[Source]](https://stdlib.ponylang.io/src/builtin/platform/#L21)

 
```
fun box native128()
: Bool val

```
 #### Returns

 * [Bool](builtin-bool) val

 ### debug

 [[Source]](https://stdlib.ponylang.io/src/builtin/platform/#L22)

 
```
fun box debug()
: Bool val

```
 #### Returns

 * [Bool](builtin-bool) val

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/builtin/platform/#L2)

 
```
fun box eq(
  that: Platform val)
: Bool val

```
 #### Parameters

 * that: [Platform](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/builtin/platform/#L2)

 
```
fun box ne(
  that: Platform val)
: Bool val

```
 #### Parameters

 * that: [Platform](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/builtin-Platform>

UnsignedInteger[A: [UnsignedInteger](index)[A] val]
===================================================

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L442)

 
```
trait val UnsignedInteger[A: UnsignedInteger[A] val] is
  Integer[A] val

```
 #### Implements

 * [Integer](builtin-integer)[A] val

 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L135)

 
```
new val create(
  value: A)
: Real[A] val^

```
 #### Parameters

 * value: A

 #### Returns

 * [Real](builtin-real)[A] val^

 ### from[B: (([I8](builtin-i8) val | [I16](builtin-i16) val | [I32](builtin-i32) val | [I64](builtin-i64) val | [I128](builtin-i128) val | [ILong](builtin-ilong) val | [ISize](builtin-isize) val | [U8](builtin-u8) val | [U16](builtin-u16) val | [U32](builtin-u32) val | [U64](builtin-u64) val | [U128](builtin-u128) val | [ULong](builtin-ulong) val | [USize](builtin-usize) val | [F32](builtin-f32) val | [F64](builtin-f64) val) & [Real](builtin-real)[B] val)]

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L137)

 
```
new val from[B: ((I8 val | I16 val | I32 val | 
    I64 val | I128 val | ILong val | 
    ISize val | U8 val | U16 val | 
    U32 val | U64 val | U128 val | 
    ULong val | USize val | F32 val | 
    F64 val) & Real[B] val)](
  a: B)
: Real[A] val^

```
 #### Parameters

 * a: B

 #### Returns

 * [Real](builtin-real)[A] val^

 ### min\_value

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L138)

 
```
new val min_value()
: Real[A] val^

```
 #### Returns

 * [Real](builtin-real)[A] val^

 ### max\_value

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L139)

 
```
new val max_value()
: Real[A] val^

```
 #### Returns

 * [Real](builtin-real)[A] val^

 Public Functions
----------------

 ### abs

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L443)

 
```
fun box abs()
: A

```
 #### Returns

 * A

 ### shl

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L445)

 
```
fun box shl(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### shr

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L446)

 
```
fun box shr(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### fld

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L449)

 
```
fun box fld(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### fldc

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L450)

 
```
fun box fldc(
  y: A)
: (A , Bool val)

```
 #### Parameters

 * y: A

 #### Returns

 * (A , [Bool](builtin-bool) val)

 ### fld\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L451)

 
```
fun box fld_partial(
  y: A)
: A ?

```
 #### Parameters

 * y: A

 #### Returns

 * A ?

 ### fld\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L452)

 
```
fun box fld_unsafe(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### mod

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L454)

 
```
fun box mod(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### modc

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L455)

 
```
fun box modc(
  y: A)
: (A , Bool val)

```
 #### Parameters

 * y: A

 #### Returns

 * (A , [Bool](builtin-bool) val)

 ### mod\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L456)

 
```
fun box mod_partial(
  y: A)
: A ?

```
 #### Parameters

 * y: A

 #### Returns

 * A ?

 ### mod\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L457)

 
```
fun box mod_unsafe(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### shl\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L459)

 Unsafe operation. If non-zero bits are shifted-out, the result is undefined.

 
```
fun box shl_unsafe(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### shr\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L466)

 Unsafe operation. If non-zero bits are shifted-out, the result is undefined.

 
```
fun box shr_unsafe(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### rotl

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L473)

 
```
fun box rotl(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### rotr

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L481)

 
```
fun box rotr(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### popcount

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L489)

 
```
fun box popcount()
: A

```
 #### Returns

 * A

 ### clz

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L490)

 
```
fun box clz()
: A

```
 #### Returns

 * A

 ### ctz

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L491)

 
```
fun box ctz()
: A

```
 #### Returns

 * A

 ### clz\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L493)

 Count leading zeroes.

 Unsafe operation. If this is 0, the result is undefined.

 
```
fun box clz_unsafe()
: A

```
 #### Returns

 * A

 ### ctz\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L501)

 Count trailing zeroes.

 Unsafe operation. If this is 0, the result is undefined.

 
```
fun box ctz_unsafe()
: A

```
 #### Returns

 * A

 ### bitwidth

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L509)

 
```
fun box bitwidth()
: A

```
 #### Returns

 * A

 ### bytewidth

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L511)

 
```
fun box bytewidth()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### string

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L513)

 
```
fun box string()
: String iso^

```
 #### Returns

 * [String](builtin-string) iso^

 ### add\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L214)

 
```
fun box add_unsafe(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### sub\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L221)

 
```
fun box sub_unsafe(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### mul\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L228)

 
```
fun box mul_unsafe(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### div\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L235)

 
```
fun box div_unsafe(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### divrem\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L245)

 
```
fun box divrem_unsafe(
  y: A)
: (A , A)

```
 #### Parameters

 * y: A

 #### Returns

 * (A , A)

 ### rem\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L255)

 
```
fun box rem_unsafe(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### add\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L286)

 
```
fun box add_partial(
  y: A)
: A ?

```
 #### Parameters

 * y: A

 #### Returns

 * A ?

 ### sub\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L293)

 
```
fun box sub_partial(
  y: A)
: A ?

```
 #### Parameters

 * y: A

 #### Returns

 * A ?

 ### mul\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L300)

 
```
fun box mul_partial(
  y: A)
: A ?

```
 #### Parameters

 * y: A

 #### Returns

 * A ?

 ### div\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L307)

 
```
fun box div_partial(
  y: A)
: A ?

```
 #### Parameters

 * y: A

 #### Returns

 * A ?

 ### rem\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L314)

 
```
fun box rem_partial(
  y: A)
: A ?

```
 #### Parameters

 * y: A

 #### Returns

 * A ?

 ### divrem\_partial

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L322)

 
```
fun box divrem_partial(
  y: A)
: (A , A) ?

```
 #### Parameters

 * y: A

 #### Returns

 * (A , A) ?

 ### neg\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L344)

 
```
fun box neg_unsafe()
: A

```
 #### Returns

 * A

 ### addc

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L351)

 
```
fun box addc(
  y: A)
: (A , Bool val)

```
 #### Parameters

 * y: A

 #### Returns

 * (A , [Bool](builtin-bool) val)

 ### subc

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L355)

 
```
fun box subc(
  y: A)
: (A , Bool val)

```
 #### Parameters

 * y: A

 #### Returns

 * (A , [Bool](builtin-bool) val)

 ### mulc

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L359)

 
```
fun box mulc(
  y: A)
: (A , Bool val)

```
 #### Parameters

 * y: A

 #### Returns

 * (A , [Bool](builtin-bool) val)

 ### divc

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L363)

 
```
fun box divc(
  y: A)
: (A , Bool val)

```
 #### Parameters

 * y: A

 #### Returns

 * (A , [Bool](builtin-bool) val)

 ### remc

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L367)

 
```
fun box remc(
  y: A)
: (A , Bool val)

```
 #### Parameters

 * y: A

 #### Returns

 * (A , [Bool](builtin-bool) val)

 ### op\_and

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L384)

 
```
fun box op_and(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### op\_or

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L385)

 
```
fun box op_or(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### op\_xor

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L386)

 
```
fun box op_xor(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### op\_not

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L387)

 
```
fun box op_not()
: A

```
 #### Returns

 * A

 ### bit\_reverse

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L389)

 
```
fun box bit_reverse()
: A

```
 #### Returns

 * A

 ### bswap

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L395)

 
```
fun box bswap()
: A

```
 #### Returns

 * A

 ### add

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L141)

 
```
fun box add(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### sub

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L142)

 
```
fun box sub(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### mul

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L143)

 
```
fun box mul(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### div

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L144)

 
```
fun box div(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### divrem

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L150)

 
```
fun box divrem(
  y: A)
: (A , A)

```
 #### Parameters

 * y: A

 #### Returns

 * (A , A)

 ### rem

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L151)

 
```
fun box rem(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### neg

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L159)

 
```
fun box neg()
: A

```
 #### Returns

 * A

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L172)

 
```
fun box eq(
  y: box->A)
: Bool val

```
 #### Parameters

 * y: box->A

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L173)

 
```
fun box ne(
  y: box->A)
: Bool val

```
 #### Parameters

 * y: box->A

 #### Returns

 * [Bool](builtin-bool) val

 ### lt

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L174)

 
```
fun box lt(
  y: box->A)
: Bool val

```
 #### Parameters

 * y: box->A

 #### Returns

 * [Bool](builtin-bool) val

 ### le

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L175)

 
```
fun box le(
  y: box->A)
: Bool val

```
 #### Parameters

 * y: box->A

 #### Returns

 * [Bool](builtin-bool) val

 ### ge

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L176)

 
```
fun box ge(
  y: box->A)
: Bool val

```
 #### Parameters

 * y: box->A

 #### Returns

 * [Bool](builtin-bool) val

 ### gt

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L177)

 
```
fun box gt(
  y: box->A)
: Bool val

```
 #### Parameters

 * y: box->A

 #### Returns

 * [Bool](builtin-bool) val

 ### min

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L179)

 
```
fun box min(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### max

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L180)

 
```
fun box max(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### hash

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L182)

 
```
fun box hash()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### hash64

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L198)

 
```
fun box hash64()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### i8

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L2)

 
```
fun box i8()
: I8 val

```
 #### Returns

 * [I8](builtin-i8) val

 ### i16

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L3)

 
```
fun box i16()
: I16 val

```
 #### Returns

 * [I16](builtin-i16) val

 ### i32

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L4)

 
```
fun box i32()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### i64

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L5)

 
```
fun box i64()
: I64 val

```
 #### Returns

 * [I64](builtin-i64) val

 ### i128

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L6)

 
```
fun box i128()
: I128 val

```
 #### Returns

 * [I128](builtin-i128) val

 ### ilong

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L7)

 
```
fun box ilong()
: ILong val

```
 #### Returns

 * [ILong](builtin-ilong) val

 ### isize

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L8)

 
```
fun box isize()
: ISize val

```
 #### Returns

 * [ISize](builtin-isize) val

 ### u8

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L10)

 
```
fun box u8()
: U8 val

```
 #### Returns

 * [U8](builtin-u8) val

 ### u16

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L11)

 
```
fun box u16()
: U16 val

```
 #### Returns

 * [U16](builtin-u16) val

 ### u32

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L12)

 
```
fun box u32()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### u64

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L13)

 
```
fun box u64()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### u128

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L14)

 
```
fun box u128()
: U128 val

```
 #### Returns

 * [U128](builtin-u128) val

 ### ulong

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L15)

 
```
fun box ulong()
: ULong val

```
 #### Returns

 * [ULong](builtin-ulong) val

 ### usize

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L16)

 
```
fun box usize()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### f32

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L18)

 
```
fun box f32()
: F32 val

```
 #### Returns

 * [F32](builtin-f32) val

 ### f64

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L19)

 
```
fun box f64()
: F64 val

```
 #### Returns

 * [F64](builtin-f64) val

 ### i8\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L21)

 
```
fun box i8_unsafe()
: I8 val

```
 #### Returns

 * [I8](builtin-i8) val

 ### i16\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L28)

 
```
fun box i16_unsafe()
: I16 val

```
 #### Returns

 * [I16](builtin-i16) val

 ### i32\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L35)

 
```
fun box i32_unsafe()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### i64\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L42)

 
```
fun box i64_unsafe()
: I64 val

```
 #### Returns

 * [I64](builtin-i64) val

 ### i128\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L49)

 
```
fun box i128_unsafe()
: I128 val

```
 #### Returns

 * [I128](builtin-i128) val

 ### ilong\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L56)

 
```
fun box ilong_unsafe()
: ILong val

```
 #### Returns

 * [ILong](builtin-ilong) val

 ### isize\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L63)

 
```
fun box isize_unsafe()
: ISize val

```
 #### Returns

 * [ISize](builtin-isize) val

 ### u8\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L70)

 
```
fun box u8_unsafe()
: U8 val

```
 #### Returns

 * [U8](builtin-u8) val

 ### u16\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L77)

 
```
fun box u16_unsafe()
: U16 val

```
 #### Returns

 * [U16](builtin-u16) val

 ### u32\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L84)

 
```
fun box u32_unsafe()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### u64\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L91)

 
```
fun box u64_unsafe()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### u128\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L98)

 
```
fun box u128_unsafe()
: U128 val

```
 #### Returns

 * [U128](builtin-u128) val

 ### ulong\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L105)

 
```
fun box ulong_unsafe()
: ULong val

```
 #### Returns

 * [ULong](builtin-ulong) val

 ### usize\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L112)

 
```
fun box usize_unsafe()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### f32\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L119)

 
```
fun box f32_unsafe()
: F32 val

```
 #### Returns

 * [F32](builtin-f32) val

 ### f64\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L126)

 
```
fun box f64_unsafe()
: F64 val

```
 #### Returns

 * [F64](builtin-f64) val

 ### compare

 
```
fun box compare(
  that: box->A)
: (Less val | Equal val | Greater val)

```
 #### Parameters

 * that: box->A

 #### Returns

 * ([Less](builtin-less) val | [Equal](builtin-equal) val | [Greater](builtin-greater) val)



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/builtin-UnsignedInteger>

FloatingPoint[A: [FloatingPoint](index)[A] val]
===============================================

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L516)

 
```
trait val FloatingPoint[A: FloatingPoint[A] val] is
  Real[A] val

```
 #### Implements

 * [Real](builtin-real)[A] val

 Constructors
------------

 ### min\_normalised

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L517)

 
```
new val min_normalised()
: FloatingPoint[A] val^

```
 #### Returns

 * [FloatingPoint](index)[A] val^

 ### epsilon

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L518)

 
```
new val epsilon()
: FloatingPoint[A] val^

```
 #### Returns

 * [FloatingPoint](index)[A] val^

 ### create

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L135)

 
```
new val create(
  value: A)
: Real[A] val^

```
 #### Parameters

 * value: A

 #### Returns

 * [Real](builtin-real)[A] val^

 ### from[B: (([I8](builtin-i8) val | [I16](builtin-i16) val | [I32](builtin-i32) val | [I64](builtin-i64) val | [I128](builtin-i128) val | [ILong](builtin-ilong) val | [ISize](builtin-isize) val | [U8](builtin-u8) val | [U16](builtin-u16) val | [U32](builtin-u32) val | [U64](builtin-u64) val | [U128](builtin-u128) val | [ULong](builtin-ulong) val | [USize](builtin-usize) val | [F32](builtin-f32) val | [F64](builtin-f64) val) & [Real](builtin-real)[B] val)]

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L137)

 
```
new val from[B: ((I8 val | I16 val | I32 val | 
    I64 val | I128 val | ILong val | 
    ISize val | U8 val | U16 val | 
    U32 val | U64 val | U128 val | 
    ULong val | USize val | F32 val | 
    F64 val) & Real[B] val)](
  a: B)
: Real[A] val^

```
 #### Parameters

 * a: B

 #### Returns

 * [Real](builtin-real)[A] val^

 ### min\_value

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L138)

 
```
new val min_value()
: Real[A] val^

```
 #### Returns

 * [Real](builtin-real)[A] val^

 ### max\_value

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L139)

 
```
new val max_value()
: Real[A] val^

```
 #### Returns

 * [Real](builtin-real)[A] val^

 Public Functions
----------------

 ### radix

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L519)

 
```
fun tag radix()
: U8 val

```
 #### Returns

 * [U8](builtin-u8) val

 ### precision2

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L520)

 
```
fun tag precision2()
: U8 val

```
 #### Returns

 * [U8](builtin-u8) val

 ### precision10

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L521)

 
```
fun tag precision10()
: U8 val

```
 #### Returns

 * [U8](builtin-u8) val

 ### min\_exp2

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L522)

 
```
fun tag min_exp2()
: I16 val

```
 #### Returns

 * [I16](builtin-i16) val

 ### min\_exp10

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L523)

 
```
fun tag min_exp10()
: I16 val

```
 #### Returns

 * [I16](builtin-i16) val

 ### max\_exp2

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L524)

 
```
fun tag max_exp2()
: I16 val

```
 #### Returns

 * [I16](builtin-i16) val

 ### max\_exp10

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L525)

 
```
fun tag max_exp10()
: I16 val

```
 #### Returns

 * [I16](builtin-i16) val

 ### add\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L527)

 Unsafe operation. If any input or output of the operation is +/- infinity or NaN, the result is undefined. The operation isn't required to fully comply to IEEE 754 semantics.

 
```
fun box add_unsafe(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### sub\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L536)

 Unsafe operation. If any input or output of the operation is +/- infinity or NaN, the result is undefined. The operation isn't required to fully comply to IEEE 754 semantics.

 
```
fun box sub_unsafe(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### mul\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L545)

 Unsafe operation. If any input or output of the operation is +/- infinity or NaN, the result is undefined. The operation isn't required to fully comply to IEEE 754 semantics.

 
```
fun box mul_unsafe(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### div\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L554)

 Unsafe operation. If any input or output of the operation is +/- infinity or NaN, the result is undefined. The operation isn't required to fully comply to IEEE 754 semantics.

 
```
fun box div_unsafe(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### fld\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L563)

 Unsafe operation. If any input or output of the operation is +/- infinity or NaN, the result is undefined. The operation isn't required to fully comply to IEEE 754 semantics.

 
```
fun box fld_unsafe(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### divrem\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L571)

 Unsafe operation. If any input or output of the operation is +/- infinity or NaN, the result is undefined. The operation isn't required to fully comply to IEEE 754 semantics.

 
```
fun box divrem_unsafe(
  y: A)
: (A , A)

```
 #### Parameters

 * y: A

 #### Returns

 * (A , A)

 ### rem\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L580)

 Unsafe operation. If any input or output of the operation is +/- infinity or NaN, the result is undefined. The operation isn't required to fully comply to IEEE 754 semantics.

 
```
fun box rem_unsafe(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### mod\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L589)

 Unsafe operation. If any input or output of the operation is +/- infinity or NaN, the result is undefined. The operation isn't required to fully comply to IEEE 754 semantics.

 
```
fun box mod_unsafe(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### neg\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L597)

 Unsafe operation. If any input or output of the operation is +/- infinity or NaN, the result is undefined. The operation isn't required to fully comply to IEEE 754 semantics.

 
```
fun box neg_unsafe()
: A

```
 #### Returns

 * A

 ### eq\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L606)

 Unsafe operation. If any input of the operation is +/- infinity or NaN, the result is undefined. The operation isn't required to fully comply to IEEE 754 semantics.

 
```
fun box eq_unsafe(
  y: box->A)
: Bool val

```
 #### Parameters

 * y: box->A

 #### Returns

 * [Bool](builtin-bool) val

 ### ne\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L615)

 Unsafe operation. If any input of the operation is +/- infinity or NaN, the result is undefined. The operation isn't required to fully comply to IEEE 754 semantics.

 
```
fun box ne_unsafe(
  y: box->A)
: Bool val

```
 #### Parameters

 * y: box->A

 #### Returns

 * [Bool](builtin-bool) val

 ### lt\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L624)

 Unsafe operation. If any input of the operation is +/- infinity or NaN, the result is undefined. The operation isn't required to fully comply to IEEE 754 semantics.

 
```
fun box lt_unsafe(
  y: box->A)
: Bool val

```
 #### Parameters

 * y: box->A

 #### Returns

 * [Bool](builtin-bool) val

 ### le\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L633)

 Unsafe operation. If any input of the operation is +/- infinity or NaN, the result is undefined. The operation isn't required to fully comply to IEEE 754 semantics.

 
```
fun box le_unsafe(
  y: box->A)
: Bool val

```
 #### Parameters

 * y: box->A

 #### Returns

 * [Bool](builtin-bool) val

 ### ge\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L642)

 Unsafe operation. If any input of the operation is +/- infinity or NaN, the result is undefined. The operation isn't required to fully comply to IEEE 754 semantics.

 
```
fun box ge_unsafe(
  y: box->A)
: Bool val

```
 #### Parameters

 * y: box->A

 #### Returns

 * [Bool](builtin-bool) val

 ### gt\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L651)

 Unsafe operation. If any input of the operation is +/- infinity or NaN, the result is undefined. The operation isn't required to fully comply to IEEE 754 semantics.

 
```
fun box gt_unsafe(
  y: box->A)
: Bool val

```
 #### Parameters

 * y: box->A

 #### Returns

 * [Bool](builtin-bool) val

 ### abs

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L660)

 
```
fun box abs()
: A

```
 #### Returns

 * A

 ### ceil

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L661)

 
```
fun box ceil()
: A

```
 #### Returns

 * A

 ### floor

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L662)

 
```
fun box floor()
: A

```
 #### Returns

 * A

 ### round

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L663)

 
```
fun box round()
: A

```
 #### Returns

 * A

 ### trunc

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L664)

 
```
fun box trunc()
: A

```
 #### Returns

 * A

 ### finite

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L666)

 
```
fun box finite()
: Bool val

```
 #### Returns

 * [Bool](builtin-bool) val

 ### infinite

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L667)

 
```
fun box infinite()
: Bool val

```
 #### Returns

 * [Bool](builtin-bool) val

 ### nan

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L668)

 
```
fun box nan()
: Bool val

```
 #### Returns

 * [Bool](builtin-bool) val

 ### ldexp

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L670)

 
```
fun box ldexp(
  x: A,
  exponent: I32 val)
: A

```
 #### Parameters

 * x: A
* exponent: [I32](builtin-i32) val

 #### Returns

 * A

 ### frexp

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L671)

 
```
fun box frexp()
: (A , U32 val)

```
 #### Returns

 * (A , [U32](builtin-u32) val)

 ### log

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L672)

 
```
fun box log()
: A

```
 #### Returns

 * A

 ### log2

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L673)

 
```
fun box log2()
: A

```
 #### Returns

 * A

 ### log10

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L674)

 
```
fun box log10()
: A

```
 #### Returns

 * A

 ### logb

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L675)

 
```
fun box logb()
: A

```
 #### Returns

 * A

 ### pow

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L677)

 
```
fun box pow(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### powi

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L678)

 
```
fun box powi(
  y: I32 val)
: A

```
 #### Parameters

 * y: [I32](builtin-i32) val

 #### Returns

 * A

 ### sqrt

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L680)

 
```
fun box sqrt()
: A

```
 #### Returns

 * A

 ### sqrt\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L682)

 Unsafe operation. If this is negative, the result is undefined.

 
```
fun box sqrt_unsafe()
: A

```
 #### Returns

 * A

 ### cbrt

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L688)

 
```
fun box cbrt()
: A

```
 #### Returns

 * A

 ### exp

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L689)

 
```
fun box exp()
: A

```
 #### Returns

 * A

 ### exp2

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L690)

 
```
fun box exp2()
: A

```
 #### Returns

 * A

 ### cos

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L692)

 
```
fun box cos()
: A

```
 #### Returns

 * A

 ### sin

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L693)

 
```
fun box sin()
: A

```
 #### Returns

 * A

 ### tan

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L694)

 
```
fun box tan()
: A

```
 #### Returns

 * A

 ### cosh

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L696)

 
```
fun box cosh()
: A

```
 #### Returns

 * A

 ### sinh

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L697)

 
```
fun box sinh()
: A

```
 #### Returns

 * A

 ### tanh

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L698)

 
```
fun box tanh()
: A

```
 #### Returns

 * A

 ### acos

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L700)

 
```
fun box acos()
: A

```
 #### Returns

 * A

 ### asin

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L701)

 
```
fun box asin()
: A

```
 #### Returns

 * A

 ### atan

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L702)

 
```
fun box atan()
: A

```
 #### Returns

 * A

 ### atan2

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L703)

 
```
fun box atan2(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### acosh

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L705)

 
```
fun box acosh()
: A

```
 #### Returns

 * A

 ### asinh

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L706)

 
```
fun box asinh()
: A

```
 #### Returns

 * A

 ### atanh

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L707)

 
```
fun box atanh()
: A

```
 #### Returns

 * A

 ### copysign

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L709)

 
```
fun box copysign(
  sign: A)
: A

```
 #### Parameters

 * sign: A

 #### Returns

 * A

 ### string

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L711)

 
```
fun box string()
: String iso^

```
 #### Returns

 * [String](builtin-string) iso^

 ### add

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L141)

 
```
fun box add(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### sub

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L142)

 
```
fun box sub(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### mul

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L143)

 
```
fun box mul(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### div

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L144)

 
```
fun box div(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### divrem

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L150)

 
```
fun box divrem(
  y: A)
: (A , A)

```
 #### Parameters

 * y: A

 #### Returns

 * (A , A)

 ### rem

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L151)

 
```
fun box rem(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### neg

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L159)

 
```
fun box neg()
: A

```
 #### Returns

 * A

 ### fld

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L161)

 
```
fun box fld(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### mod

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L165)

 
```
fun box mod(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L172)

 
```
fun box eq(
  y: box->A)
: Bool val

```
 #### Parameters

 * y: box->A

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L173)

 
```
fun box ne(
  y: box->A)
: Bool val

```
 #### Parameters

 * y: box->A

 #### Returns

 * [Bool](builtin-bool) val

 ### lt

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L174)

 
```
fun box lt(
  y: box->A)
: Bool val

```
 #### Parameters

 * y: box->A

 #### Returns

 * [Bool](builtin-bool) val

 ### le

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L175)

 
```
fun box le(
  y: box->A)
: Bool val

```
 #### Parameters

 * y: box->A

 #### Returns

 * [Bool](builtin-bool) val

 ### ge

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L176)

 
```
fun box ge(
  y: box->A)
: Bool val

```
 #### Parameters

 * y: box->A

 #### Returns

 * [Bool](builtin-bool) val

 ### gt

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L177)

 
```
fun box gt(
  y: box->A)
: Bool val

```
 #### Parameters

 * y: box->A

 #### Returns

 * [Bool](builtin-bool) val

 ### min

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L179)

 
```
fun box min(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### max

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L180)

 
```
fun box max(
  y: A)
: A

```
 #### Parameters

 * y: A

 #### Returns

 * A

 ### hash

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L182)

 
```
fun box hash()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### hash64

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L198)

 
```
fun box hash64()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### i8

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L2)

 
```
fun box i8()
: I8 val

```
 #### Returns

 * [I8](builtin-i8) val

 ### i16

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L3)

 
```
fun box i16()
: I16 val

```
 #### Returns

 * [I16](builtin-i16) val

 ### i32

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L4)

 
```
fun box i32()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### i64

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L5)

 
```
fun box i64()
: I64 val

```
 #### Returns

 * [I64](builtin-i64) val

 ### i128

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L6)

 
```
fun box i128()
: I128 val

```
 #### Returns

 * [I128](builtin-i128) val

 ### ilong

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L7)

 
```
fun box ilong()
: ILong val

```
 #### Returns

 * [ILong](builtin-ilong) val

 ### isize

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L8)

 
```
fun box isize()
: ISize val

```
 #### Returns

 * [ISize](builtin-isize) val

 ### u8

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L10)

 
```
fun box u8()
: U8 val

```
 #### Returns

 * [U8](builtin-u8) val

 ### u16

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L11)

 
```
fun box u16()
: U16 val

```
 #### Returns

 * [U16](builtin-u16) val

 ### u32

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L12)

 
```
fun box u32()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### u64

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L13)

 
```
fun box u64()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### u128

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L14)

 
```
fun box u128()
: U128 val

```
 #### Returns

 * [U128](builtin-u128) val

 ### ulong

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L15)

 
```
fun box ulong()
: ULong val

```
 #### Returns

 * [ULong](builtin-ulong) val

 ### usize

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L16)

 
```
fun box usize()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### f32

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L18)

 
```
fun box f32()
: F32 val

```
 #### Returns

 * [F32](builtin-f32) val

 ### f64

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L19)

 
```
fun box f64()
: F64 val

```
 #### Returns

 * [F64](builtin-f64) val

 ### i8\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L21)

 
```
fun box i8_unsafe()
: I8 val

```
 #### Returns

 * [I8](builtin-i8) val

 ### i16\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L28)

 
```
fun box i16_unsafe()
: I16 val

```
 #### Returns

 * [I16](builtin-i16) val

 ### i32\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L35)

 
```
fun box i32_unsafe()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### i64\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L42)

 
```
fun box i64_unsafe()
: I64 val

```
 #### Returns

 * [I64](builtin-i64) val

 ### i128\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L49)

 
```
fun box i128_unsafe()
: I128 val

```
 #### Returns

 * [I128](builtin-i128) val

 ### ilong\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L56)

 
```
fun box ilong_unsafe()
: ILong val

```
 #### Returns

 * [ILong](builtin-ilong) val

 ### isize\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L63)

 
```
fun box isize_unsafe()
: ISize val

```
 #### Returns

 * [ISize](builtin-isize) val

 ### u8\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L70)

 
```
fun box u8_unsafe()
: U8 val

```
 #### Returns

 * [U8](builtin-u8) val

 ### u16\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L77)

 
```
fun box u16_unsafe()
: U16 val

```
 #### Returns

 * [U16](builtin-u16) val

 ### u32\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L84)

 
```
fun box u32_unsafe()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### u64\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L91)

 
```
fun box u64_unsafe()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### u128\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L98)

 
```
fun box u128_unsafe()
: U128 val

```
 #### Returns

 * [U128](builtin-u128) val

 ### ulong\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L105)

 
```
fun box ulong_unsafe()
: ULong val

```
 #### Returns

 * [ULong](builtin-ulong) val

 ### usize\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L112)

 
```
fun box usize_unsafe()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### f32\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L119)

 
```
fun box f32_unsafe()
: F32 val

```
 #### Returns

 * [F32](builtin-f32) val

 ### f64\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L126)

 
```
fun box f64_unsafe()
: F64 val

```
 #### Returns

 * [F64](builtin-f64) val

 ### compare

 
```
fun box compare(
  that: box->A)
: (Less val | Equal val | Greater val)

```
 #### Parameters

 * that: box->A

 #### Returns

 * ([Less](builtin-less) val | [Equal](builtin-equal) val | [Greater](builtin-greater) val)



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/builtin-FloatingPoint>

Iterator[A: A]
==============

 [[Source]](https://stdlib.ponylang.io/src/builtin/iterator/#L1)

 Iterators generate a series of values, one value at a time on each call to `next()`.

 An Iterator is considered exhausted, once its `has_next()` method returns `false`. Thus every call to `next()` should be preceeded with a call to `has_next()` to check for exhaustiveness.

 Usage
-----

 Given the rules for using Iterators mentioned above, basic usage of an iterator looks like this:

 
```
while iterator.has_next() do
  let elem = iterator.next()?
  // do something with elem
end

```
 The `For`-loop provides a more concise way of iteration:

 
```
for elem in iterator do
  // do something with elem
end

```
 Iteration using `While` is more flexible as it allows to continue iterating if a call to `next()` errors. The `For`-loop does not allow this.

 Implementing Iterators
----------------------

 Iterator implementations need to adhere to the following rules to be considered well-behaved:

 * If the Iterator is exhausted, `has_next()` needs to return `false`.
* Once `has_next()` returned `false` it is not allowed to switch back to `true` (Unless the Iterator supports rewinding)
* `has_next()` does not change its returned value if `next()` has not been called. That means, that between two calls to `next()` any number of calls to `has_next()` need to return the same value. (Unless the Iterator supports rewinding)
* A call to `next()` erroring does not necessarily denote exhaustiveness.

 ### Example

 
```
// Generates values from `from` to 0
class ref Countdown is Iterator[USize]
  var _cur: USize
  var _has_next: Bool = true

  new ref create(from: USize) =>
    _cur = from

  fun ref has_next(): Bool =>
    _has_next

  fun ref next(): USize =>
    let elem = _cur = _cur - 1
    if elem == 0 then
      _has_next = false
    end
    elem

```
 
```
interface ref Iterator[A: A]

```
 Public Functions
----------------

 ### has\_next

 [[Source]](https://stdlib.ponylang.io/src/builtin/iterator/#L69)

 Returns `true` if this Iterator is not yet exhausted. That means that a value returned from a subsequent call to `next()` is a valid part of this iterator.

 Returns `false` if this Iterator is exhausted.

 The behavior of `next()` after this function returned `false` is undefined, it might throw an error or return values which are not part of this Iterator.

 
```
fun ref has_next()
: Bool val

```
 #### Returns

 * [Bool](builtin-bool) val

 ### next

 [[Source]](https://stdlib.ponylang.io/src/builtin/iterator/#L81)

 Generate the next value.

 This might error, which does not necessarily mean that the Iterator is exhausted.

 
```
fun ref next()
: A ?

```
 #### Returns

 * A ?



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/builtin-Iterator>

Float
=====

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L485)

 
```
type Float is
  (F32 val | F64 val)

```
 #### Type Alias For

 * ([F32](builtin-f32) val | [F64](builtin-f64) val)



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/builtin-Float>

NullablePointer[A: A]
=====================

 [[Source]](https://stdlib.ponylang.io/src/builtin/nullable_pointer/#L1)

 A NullablePointer[A] is used to encode a possibly-null type. It should *only* be used for structs that need to be passed to and from the C FFI.

 An optional type for anything that isn't a struct should be encoded as a union type, for example (A | None).

 
```
struct ref NullablePointer[A: A]

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/builtin/nullable_pointer/#L9)

 This re-encodes the type of `that` from A to NullablePointer[A], allowing `that` to be assigned to a field or variable of type NullablePointer[A]. It doesn't allocate a wrapper object: there is no containing object for `that`.

 
```
new ref create(
  that: A)
: NullablePointer[A] ref^

```
 #### Parameters

 * that: A

 #### Returns

 * [NullablePointer](index)[A] ref^

 ### none

 [[Source]](https://stdlib.ponylang.io/src/builtin/nullable_pointer/#L17)

 This returns a null pointer typed as a NullablePointer[A].

 
```
new ref none()
: NullablePointer[A] ref^

```
 #### Returns

 * [NullablePointer](index)[A] ref^

 Public Functions
----------------

 ### apply

 [[Source]](https://stdlib.ponylang.io/src/builtin/nullable_pointer/#L23)

 This re-encodes the type of `this` from NullablePointer[A] to A, allowing `this` to be assigned to a field of variable of type A. If `this` is a null pointer, an error is raised.

 
```
fun box apply()
: this->A ?

```
 #### Returns

 * this->A ?

 ### is\_none

 [[Source]](https://stdlib.ponylang.io/src/builtin/nullable_pointer/#L31)

 Returns true if `this` is null (ie apply would raise an error).

 
```
fun box is_none()
: Bool val

```
 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/builtin-NullablePointer>

DisposableActor
===============

 [[Source]](https://stdlib.ponylang.io/src/builtin/disposable_actor/#L1)

 An interface used to asynchronously dispose of an actor.

 
```
interface tag DisposableActor

```
 Public Behaviours
-----------------

 ### dispose

 [[Source]](https://stdlib.ponylang.io/src/builtin/disposable_actor/#L5)

 
```
be dispose()

```


 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/builtin-DisposableActor>

F32
===

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L1)

 
```
primitive val F32 is
  FloatingPoint[F32 val] val

```
 #### Implements

 * [FloatingPoint](builtin-floatingpoint)[[F32](index) val] val

 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L2)

 
```
new val create(
  value: F32 val = 0)
: F32 val^

```
 #### Parameters

 * value: [F32](index) val = 0

 #### Returns

 * [F32](index) val^

 ### pi

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L3)

 
```
new val pi()
: F32 val^

```
 #### Returns

 * [F32](index) val^

 ### e

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L4)

 
```
new val e()
: F32 val^

```
 #### Returns

 * [F32](index) val^

 ### from\_bits

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L9)

 
```
new val from_bits(
  i: U32 val)
: F32 val^

```
 #### Parameters

 * i: [U32](builtin-u32) val

 #### Returns

 * [F32](index) val^

 ### from[B: (([I8](builtin-i8) val | [I16](builtin-i16) val | [I32](builtin-i32) val | [I64](builtin-i64) val | [I128](builtin-i128) val | [ILong](builtin-ilong) val | [ISize](builtin-isize) val | [U8](builtin-u8) val | [U16](builtin-u16) val | [U32](builtin-u32) val | [U64](builtin-u64) val | [U128](builtin-u128) val | [ULong](builtin-ulong) val | [USize](builtin-usize) val | [F32](index) val | [F64](builtin-f64) val) & [Real](builtin-real)[B] val)]

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L11)

 
```
new val from[B: ((I8 val | I16 val | I32 val | 
    I64 val | I128 val | ILong val | 
    ISize val | U8 val | U16 val | 
    U32 val | U64 val | U128 val | 
    ULong val | USize val | F32 val | 
    F64 val) & Real[B] val)](
  a: B)
: F32 val^

```
 #### Parameters

 * a: B

 #### Returns

 * [F32](index) val^

 ### min\_value

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L13)

 Minimum negative value representable.

 
```
new val min_value()
: F32 val^

```
 #### Returns

 * [F32](index) val^

 ### max\_value

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L19)

 Maximum positive value representable.

 
```
new val max_value()
: F32 val^

```
 #### Returns

 * [F32](index) val^

 ### min\_normalised

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L25)

 Minimum positive value representable at full precision (ie a normalised number).

 
```
new val min_normalised()
: F32 val^

```
 #### Returns

 * [F32](index) val^

 ### epsilon

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L32)

 Minimum positive value such that (1 + epsilon) != 1.

 
```
new val epsilon()
: F32 val^

```
 #### Returns

 * [F32](index) val^

 Public Functions
----------------

 ### bits

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L10)

 
```
fun box bits()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### radix

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L38)

 Exponent radix.

 
```
fun tag radix()
: U8 val

```
 #### Returns

 * [U8](builtin-u8) val

 ### precision2

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L44)

 Mantissa precision in bits.

 
```
fun tag precision2()
: U8 val

```
 #### Returns

 * [U8](builtin-u8) val

 ### precision10

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L50)

 Mantissa precision in decimal digits.

 
```
fun tag precision10()
: U8 val

```
 #### Returns

 * [U8](builtin-u8) val

 ### min\_exp2

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L56)

 Minimum exponent value such that (2^exponent) - 1 is representable at full precision (ie a normalised number).

 
```
fun tag min_exp2()
: I16 val

```
 #### Returns

 * [I16](builtin-i16) val

 ### min\_exp10

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L63)

 Minimum exponent value such that (10^exponent) - 1 is representable at full precision (ie a normalised number).

 
```
fun tag min_exp10()
: I16 val

```
 #### Returns

 * [I16](builtin-i16) val

 ### max\_exp2

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L70)

 Maximum exponent value such that (2^exponent) - 1 is representable.

 
```
fun tag max_exp2()
: I16 val

```
 #### Returns

 * [I16](builtin-i16) val

 ### max\_exp10

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L76)

 Maximum exponent value such that (10^exponent) - 1 is representable.

 
```
fun tag max_exp10()
: I16 val

```
 #### Returns

 * [I16](builtin-i16) val

 ### abs

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L82)

 
```
fun box abs()
: F32 val

```
 #### Returns

 * [F32](index) val

 ### ceil

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L83)

 
```
fun box ceil()
: F32 val

```
 #### Returns

 * [F32](index) val

 ### floor

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L84)

 
```
fun box floor()
: F32 val

```
 #### Returns

 * [F32](index) val

 ### round

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L85)

 
```
fun box round()
: F32 val

```
 #### Returns

 * [F32](index) val

 ### trunc

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L86)

 
```
fun box trunc()
: F32 val

```
 #### Returns

 * [F32](index) val

 ### min

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L88)

 
```
fun box min(
  y: F32 val)
: F32 val

```
 #### Parameters

 * y: [F32](index) val

 #### Returns

 * [F32](index) val

 ### max

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L89)

 
```
fun box max(
  y: F32 val)
: F32 val

```
 #### Parameters

 * y: [F32](index) val

 #### Returns

 * [F32](index) val

 ### fld

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L91)

 
```
fun box fld(
  y: F32 val)
: F32 val

```
 #### Parameters

 * y: [F32](index) val

 #### Returns

 * [F32](index) val

 ### fld\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L94)

 
```
fun box fld_unsafe(
  y: F32 val)
: F32 val

```
 #### Parameters

 * y: [F32](index) val

 #### Returns

 * [F32](index) val

 ### mod

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L97)

 
```
fun box mod(
  y: F32 val)
: F32 val

```
 #### Parameters

 * y: [F32](index) val

 #### Returns

 * [F32](index) val

 ### mod\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L107)

 
```
fun box mod_unsafe(
  y: F32 val)
: F32 val

```
 #### Parameters

 * y: [F32](index) val

 #### Returns

 * [F32](index) val

 ### finite

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L117)

 Check whether this number is finite, ie not +/-infinity and not NaN.

 
```
fun box finite()
: Bool val

```
 #### Returns

 * [Bool](builtin-bool) val

 ### infinite

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L124)

 Check whether this number is +/-infinity

 
```
fun box infinite()
: Bool val

```
 #### Returns

 * [Bool](builtin-bool) val

 ### nan

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L132)

 Check whether this number is NaN.

 
```
fun box nan()
: Bool val

```
 #### Returns

 * [Bool](builtin-bool) val

 ### ldexp

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L140)

 
```
fun box ldexp(
  x: F32 val,
  exponent: I32 val)
: F32 val

```
 #### Parameters

 * x: [F32](index) val
* exponent: [I32](builtin-i32) val

 #### Returns

 * [F32](index) val

 ### frexp

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L143)

 
```
fun box frexp()
: (F32 val , U32 val)

```
 #### Returns

 * ([F32](index) val , [U32](builtin-u32) val)

 ### log

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L148)

 
```
fun box log()
: F32 val

```
 #### Returns

 * [F32](index) val

 ### log2

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L149)

 
```
fun box log2()
: F32 val

```
 #### Returns

 * [F32](index) val

 ### log10

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L150)

 
```
fun box log10()
: F32 val

```
 #### Returns

 * [F32](index) val

 ### logb

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L151)

 
```
fun box logb()
: F32 val

```
 #### Returns

 * [F32](index) val

 ### pow

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L153)

 
```
fun box pow(
  y: F32 val)
: F32 val

```
 #### Parameters

 * y: [F32](index) val

 #### Returns

 * [F32](index) val

 ### powi

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L154)

 
```
fun box powi(
  y: I32 val)
: F32 val

```
 #### Parameters

 * y: [I32](builtin-i32) val

 #### Returns

 * [F32](index) val

 ### sqrt

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L161)

 
```
fun box sqrt()
: F32 val

```
 #### Returns

 * [F32](index) val

 ### sqrt\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L168)

 Unsafe operation. If this is negative, the result is undefined.

 
```
fun box sqrt_unsafe()
: F32 val

```
 #### Returns

 * [F32](index) val

 ### cbrt

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L175)

 
```
fun box cbrt()
: F32 val

```
 #### Returns

 * [F32](index) val

 ### exp

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L176)

 
```
fun box exp()
: F32 val

```
 #### Returns

 * [F32](index) val

 ### exp2

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L177)

 
```
fun box exp2()
: F32 val

```
 #### Returns

 * [F32](index) val

 ### cos

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L179)

 
```
fun box cos()
: F32 val

```
 #### Returns

 * [F32](index) val

 ### sin

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L180)

 
```
fun box sin()
: F32 val

```
 #### Returns

 * [F32](index) val

 ### tan

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L181)

 
```
fun box tan()
: F32 val

```
 #### Returns

 * [F32](index) val

 ### cosh

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L183)

 
```
fun box cosh()
: F32 val

```
 #### Returns

 * [F32](index) val

 ### sinh

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L184)

 
```
fun box sinh()
: F32 val

```
 #### Returns

 * [F32](index) val

 ### tanh

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L185)

 
```
fun box tanh()
: F32 val

```
 #### Returns

 * [F32](index) val

 ### acos

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L187)

 
```
fun box acos()
: F32 val

```
 #### Returns

 * [F32](index) val

 ### asin

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L188)

 
```
fun box asin()
: F32 val

```
 #### Returns

 * [F32](index) val

 ### atan

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L189)

 
```
fun box atan()
: F32 val

```
 #### Returns

 * [F32](index) val

 ### atan2

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L190)

 
```
fun box atan2(
  y: F32 val)
: F32 val

```
 #### Parameters

 * y: [F32](index) val

 #### Returns

 * [F32](index) val

 ### acosh

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L192)

 
```
fun box acosh()
: F32 val

```
 #### Returns

 * [F32](index) val

 ### asinh

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L193)

 
```
fun box asinh()
: F32 val

```
 #### Returns

 * [F32](index) val

 ### atanh

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L194)

 
```
fun box atanh()
: F32 val

```
 #### Returns

 * [F32](index) val

 ### copysign

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L196)

 
```
fun box copysign(
  sign: F32 val)
: F32 val

```
 #### Parameters

 * sign: [F32](index) val

 #### Returns

 * [F32](index) val

 ### hash

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L198)

 
```
fun box hash()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### hash64

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L199)

 
```
fun box hash64()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### i128

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L201)

 
```
fun box i128()
: I128 val

```
 #### Returns

 * [I128](builtin-i128) val

 ### u128

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L202)

 
```
fun box u128()
: U128 val

```
 #### Returns

 * [U128](builtin-u128) val

 ### i128\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L204)

 Unsafe operation. If the value doesn't fit in the destination type, the result is undefined.

 
```
fun box i128_unsafe()
: I128 val

```
 #### Returns

 * [I128](builtin-i128) val

 ### u128\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/float/#L211)

 Unsafe operation. If the value doesn't fit in the destination type, the result is undefined.

 
```
fun box u128_unsafe()
: U128 val

```
 #### Returns

 * [U128](builtin-u128) val

 ### add\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L527)

 
```
fun box add_unsafe(
  y: F32 val)
: F32 val

```
 #### Parameters

 * y: [F32](index) val

 #### Returns

 * [F32](index) val

 ### sub\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L536)

 
```
fun box sub_unsafe(
  y: F32 val)
: F32 val

```
 #### Parameters

 * y: [F32](index) val

 #### Returns

 * [F32](index) val

 ### mul\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L545)

 
```
fun box mul_unsafe(
  y: F32 val)
: F32 val

```
 #### Parameters

 * y: [F32](index) val

 #### Returns

 * [F32](index) val

 ### div\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L554)

 
```
fun box div_unsafe(
  y: F32 val)
: F32 val

```
 #### Parameters

 * y: [F32](index) val

 #### Returns

 * [F32](index) val

 ### divrem\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L571)

 
```
fun box divrem_unsafe(
  y: F32 val)
: (F32 val , F32 val)

```
 #### Parameters

 * y: [F32](index) val

 #### Returns

 * ([F32](index) val , [F32](index) val)

 ### rem\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L580)

 
```
fun box rem_unsafe(
  y: F32 val)
: F32 val

```
 #### Parameters

 * y: [F32](index) val

 #### Returns

 * [F32](index) val

 ### neg\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L597)

 
```
fun box neg_unsafe()
: F32 val

```
 #### Returns

 * [F32](index) val

 ### eq\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L606)

 
```
fun box eq_unsafe(
  y: F32 val)
: Bool val

```
 #### Parameters

 * y: [F32](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L615)

 
```
fun box ne_unsafe(
  y: F32 val)
: Bool val

```
 #### Parameters

 * y: [F32](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### lt\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L624)

 
```
fun box lt_unsafe(
  y: F32 val)
: Bool val

```
 #### Parameters

 * y: [F32](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### le\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L633)

 
```
fun box le_unsafe(
  y: F32 val)
: Bool val

```
 #### Parameters

 * y: [F32](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ge\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L642)

 
```
fun box ge_unsafe(
  y: F32 val)
: Bool val

```
 #### Parameters

 * y: [F32](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### gt\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L651)

 
```
fun box gt_unsafe(
  y: F32 val)
: Bool val

```
 #### Parameters

 * y: [F32](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### string

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L711)

 
```
fun box string()
: String iso^

```
 #### Returns

 * [String](builtin-string) iso^

 ### add

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L141)

 
```
fun box add(
  y: F32 val)
: F32 val

```
 #### Parameters

 * y: [F32](index) val

 #### Returns

 * [F32](index) val

 ### sub

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L142)

 
```
fun box sub(
  y: F32 val)
: F32 val

```
 #### Parameters

 * y: [F32](index) val

 #### Returns

 * [F32](index) val

 ### mul

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L143)

 
```
fun box mul(
  y: F32 val)
: F32 val

```
 #### Parameters

 * y: [F32](index) val

 #### Returns

 * [F32](index) val

 ### div

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L144)

 
```
fun box div(
  y: F32 val)
: F32 val

```
 #### Parameters

 * y: [F32](index) val

 #### Returns

 * [F32](index) val

 ### divrem

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L150)

 
```
fun box divrem(
  y: F32 val)
: (F32 val , F32 val)

```
 #### Parameters

 * y: [F32](index) val

 #### Returns

 * ([F32](index) val , [F32](index) val)

 ### rem

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L151)

 
```
fun box rem(
  y: F32 val)
: F32 val

```
 #### Parameters

 * y: [F32](index) val

 #### Returns

 * [F32](index) val

 ### neg

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L159)

 
```
fun box neg()
: F32 val

```
 #### Returns

 * [F32](index) val

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L172)

 
```
fun box eq(
  y: F32 val)
: Bool val

```
 #### Parameters

 * y: [F32](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L173)

 
```
fun box ne(
  y: F32 val)
: Bool val

```
 #### Parameters

 * y: [F32](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### lt

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L174)

 
```
fun box lt(
  y: F32 val)
: Bool val

```
 #### Parameters

 * y: [F32](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### le

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L175)

 
```
fun box le(
  y: F32 val)
: Bool val

```
 #### Parameters

 * y: [F32](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ge

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L176)

 
```
fun box ge(
  y: F32 val)
: Bool val

```
 #### Parameters

 * y: [F32](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### gt

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L177)

 
```
fun box gt(
  y: F32 val)
: Bool val

```
 #### Parameters

 * y: [F32](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### i8

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L2)

 
```
fun box i8()
: I8 val

```
 #### Returns

 * [I8](builtin-i8) val

 ### i16

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L3)

 
```
fun box i16()
: I16 val

```
 #### Returns

 * [I16](builtin-i16) val

 ### i32

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L4)

 
```
fun box i32()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### i64

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L5)

 
```
fun box i64()
: I64 val

```
 #### Returns

 * [I64](builtin-i64) val

 ### ilong

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L7)

 
```
fun box ilong()
: ILong val

```
 #### Returns

 * [ILong](builtin-ilong) val

 ### isize

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L8)

 
```
fun box isize()
: ISize val

```
 #### Returns

 * [ISize](builtin-isize) val

 ### u8

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L10)

 
```
fun box u8()
: U8 val

```
 #### Returns

 * [U8](builtin-u8) val

 ### u16

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L11)

 
```
fun box u16()
: U16 val

```
 #### Returns

 * [U16](builtin-u16) val

 ### u32

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L12)

 
```
fun box u32()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### u64

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L13)

 
```
fun box u64()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### ulong

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L15)

 
```
fun box ulong()
: ULong val

```
 #### Returns

 * [ULong](builtin-ulong) val

 ### usize

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L16)

 
```
fun box usize()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### f32

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L18)

 
```
fun box f32()
: F32 val

```
 #### Returns

 * [F32](index) val

 ### f64

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L19)

 
```
fun box f64()
: F64 val

```
 #### Returns

 * [F64](builtin-f64) val

 ### i8\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L21)

 
```
fun box i8_unsafe()
: I8 val

```
 #### Returns

 * [I8](builtin-i8) val

 ### i16\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L28)

 
```
fun box i16_unsafe()
: I16 val

```
 #### Returns

 * [I16](builtin-i16) val

 ### i32\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L35)

 
```
fun box i32_unsafe()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### i64\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L42)

 
```
fun box i64_unsafe()
: I64 val

```
 #### Returns

 * [I64](builtin-i64) val

 ### ilong\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L56)

 
```
fun box ilong_unsafe()
: ILong val

```
 #### Returns

 * [ILong](builtin-ilong) val

 ### isize\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L63)

 
```
fun box isize_unsafe()
: ISize val

```
 #### Returns

 * [ISize](builtin-isize) val

 ### u8\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L70)

 
```
fun box u8_unsafe()
: U8 val

```
 #### Returns

 * [U8](builtin-u8) val

 ### u16\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L77)

 
```
fun box u16_unsafe()
: U16 val

```
 #### Returns

 * [U16](builtin-u16) val

 ### u32\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L84)

 
```
fun box u32_unsafe()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### u64\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L91)

 
```
fun box u64_unsafe()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### ulong\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L105)

 
```
fun box ulong_unsafe()
: ULong val

```
 #### Returns

 * [ULong](builtin-ulong) val

 ### usize\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L112)

 
```
fun box usize_unsafe()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### f32\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L119)

 
```
fun box f32_unsafe()
: F32 val

```
 #### Returns

 * [F32](index) val

 ### f64\_unsafe

 [[Source]](https://stdlib.ponylang.io/src/builtin/real/#L126)

 
```
fun box f64_unsafe()
: F64 val

```
 #### Returns

 * [F64](builtin-f64) val

 ### compare

 
```
fun box compare(
  that: F32 val)
: (Less val | Equal val | Greater val)

```
 #### Parameters

 * that: [F32](index) val

 #### Returns

 * ([Less](builtin-less) val | [Equal](builtin-equal) val | [Greater](builtin-greater) val)



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/builtin-F32>

DoNotOptimise
=============

 [[Source]](https://stdlib.ponylang.io/src/builtin/do_not_optimise/#L1)

 Contains functions preventing some compiler optimisations, namely dead code removal. This is useful for benchmarking purposes.

 
```
primitive val DoNotOptimise

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/builtin/do_not_optimise/#L1)

 
```
new val create()
: DoNotOptimise val^

```
 #### Returns

 * [DoNotOptimise](index) val^

 Public Functions
----------------

 ### apply[A: A]

 [[Source]](https://stdlib.ponylang.io/src/builtin/do_not_optimise/#L7)

 Prevent the compiler from optimising out obj and any computation it is derived from. This doesn't prevent constant propagation.

 
```
fun box apply[A: A](
  obj: A)
: None val

```
 #### Parameters

 * obj: A

 #### Returns

 * [None](builtin-none) val

 ### observe

 [[Source]](https://stdlib.ponylang.io/src/builtin/do_not_optimise/#L14)

 Prevent the compiler from optimising out writes to an object marked by the apply function.

 
```
fun box observe()
: None val

```
 #### Returns

 * [None](builtin-none) val

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/builtin/do_not_optimise/#L7)

 
```
fun box eq(
  that: DoNotOptimise val)
: Bool val

```
 #### Parameters

 * that: [DoNotOptimise](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/builtin/do_not_optimise/#L7)

 
```
fun box ne(
  that: DoNotOptimise val)
: Bool val

```
 #### Parameters

 * that: [DoNotOptimise](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/builtin-DoNotOptimise>

Less
====

 [[Source]](https://stdlib.ponylang.io/src/builtin/compare/#L1)

 
```
primitive val Less is
  Equatable[(Less val | Equal val | Greater val)] ref

```
 #### Implements

 * [Equatable](builtin-equatable)[([Less](index) val | [Equal](builtin-equal) val | [Greater](builtin-greater) val)] ref

 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/builtin/compare/#L1)

 
```
new val create()
: Less val^

```
 #### Returns

 * [Less](index) val^

 Public Functions
----------------

 ### string

 [[Source]](https://stdlib.ponylang.io/src/builtin/compare/#L2)

 
```
fun box string()
: String iso^

```
 #### Returns

 * [String](builtin-string) iso^

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/builtin/compare/#L19)

 
```
fun box eq(
  that: (Less val | Equal val | Greater val))
: Bool val

```
 #### Parameters

 * that: ([Less](index) val | [Equal](builtin-equal) val | [Greater](builtin-greater) val)

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/builtin/compare/#L20)

 
```
fun box ne(
  that: (Less val | Equal val | Greater val))
: Bool val

```
 #### Parameters

 * that: ([Less](index) val | [Equal](builtin-equal) val | [Greater](builtin-greater) val)

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/builtin-Less>

Env
===

 [[Source]](https://stdlib.ponylang.io/src/builtin/env/#L1)

 An environment holds the command line and other values injected into the program by default by the runtime.

 
```
class val Env

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/builtin/env/#L57)

 Build an artificial environment. A root capability may be supplied.

 
```
new val create(
  root': (AmbientAuth val | None val),
  input': InputStream tag,
  out': OutStream tag,
  err': OutStream tag,
  args': Array[String val] val,
  vars': Array[String val] val,
  exitcode': {(I32)} val)
: Env val^

```
 #### Parameters

 * root': ([AmbientAuth](builtin-ambientauth) val | [None](builtin-none) val)
* input': [InputStream](builtin-inputstream) tag
* out': [OutStream](builtin-outstream) tag
* err': [OutStream](builtin-outstream) tag
* args': [Array](builtin-array)[[String](builtin-string) val] val
* vars': [Array](builtin-array)[[String](builtin-string) val] val
* exitcode': {(I32)} val

 #### Returns

 * [Env](index) val^

 Public fields
-------------

 ### let root: ([AmbientAuth](builtin-ambientauth) val | [None](builtin-none) val)

 [[Source]](https://stdlib.ponylang.io/src/builtin/env/#L6)

 The root capability.

 Can be `None` for artificially constructed `Env` instances.

 ### let input: [InputStream](builtin-inputstream) tag

 [[Source]](https://stdlib.ponylang.io/src/builtin/env/#L13)

 Stdin represented as an actor.

 ### let out: [OutStream](builtin-outstream) tag

 [[Source]](https://stdlib.ponylang.io/src/builtin/env/#L18)

 Stdout

 ### let err: [OutStream](builtin-outstream) tag

 [[Source]](https://stdlib.ponylang.io/src/builtin/env/#L21)

 Stderr

 ### let args: [Array](builtin-array)[[String](builtin-string) val] val

 [[Source]](https://stdlib.ponylang.io/src/builtin/env/#L24)

 The command line used to start the program.

 ### let vars: [Array](builtin-array)[[String](builtin-string) val] val

 [[Source]](https://stdlib.ponylang.io/src/builtin/env/#L27)

 The program's environment variables.

 ### let exitcode: {(I32)} val

 [[Source]](https://stdlib.ponylang.io/src/builtin/env/#L30)

 Sets the environment's exit code. The exit code of the root environment will be the exit code of the application, which defaults to 0.



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/builtin-Env>

Equal
=====

 [[Source]](https://stdlib.ponylang.io/src/builtin/compare/#L5)

 
```
primitive val Equal is
  Equatable[(Less val | Equal val | Greater val)] ref

```
 #### Implements

 * [Equatable](builtin-equatable)[([Less](builtin-less) val | [Equal](index) val | [Greater](builtin-greater) val)] ref

 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/builtin/compare/#L5)

 
```
new val create()
: Equal val^

```
 #### Returns

 * [Equal](index) val^

 Public Functions
----------------

 ### string

 [[Source]](https://stdlib.ponylang.io/src/builtin/compare/#L6)

 
```
fun box string()
: String iso^

```
 #### Returns

 * [String](builtin-string) iso^

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/builtin/compare/#L19)

 
```
fun box eq(
  that: (Less val | Equal val | Greater val))
: Bool val

```
 #### Parameters

 * that: ([Less](builtin-less) val | [Equal](index) val | [Greater](builtin-greater) val)

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/builtin/compare/#L20)

 
```
fun box ne(
  that: (Less val | Equal val | Greater val))
: Bool val

```
 #### Parameters

 * that: ([Less](builtin-less) val | [Equal](index) val | [Greater](builtin-greater) val)

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/builtin-Equal>

Equatable[A: [Equatable](index)[A] #read]
=========================================

 [[Source]](https://stdlib.ponylang.io/src/builtin/compare/#L18)

 
```
interface ref Equatable[A: Equatable[A] #read]

```
 Public Functions
----------------

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/builtin/compare/#L19)

 
```
fun box eq(
  that: box->A)
: Bool val

```
 #### Parameters

 * that: box->A

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/builtin/compare/#L20)

 
```
fun box ne(
  that: box->A)
: Bool val

```
 #### Parameters

 * that: box->A

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/builtin-Equatable>

AsioEventID
===========

 [[Source]](https://stdlib.ponylang.io/src/builtin/asio_event/#L1)

 
```
type AsioEventID is
  Pointer[AsioEvent val] tag

```
 #### Type Alias For

 * [Pointer](builtin-pointer)[[AsioEvent](builtin-asioevent) val] tag



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/builtin-AsioEventID>

AsioEventNotify
===============

 [[Source]](https://stdlib.ponylang.io/src/builtin/asio_event/#L3)

 
```
interface tag AsioEventNotify

```


 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/builtin-AsioEventNotify>

HasEq[A: A]
===========

 [[Source]](https://stdlib.ponylang.io/src/builtin/compare/#L15)

 
```
interface ref HasEq[A: A]

```
 Public Functions
----------------

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/builtin/compare/#L16)

 
```
fun box eq(
  that: box->A)
: Bool val

```
 #### Parameters

 * that: box->A

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/builtin-HasEq>

Greater
=======

 [[Source]](https://stdlib.ponylang.io/src/builtin/compare/#L9)

 
```
primitive val Greater is
  Equatable[(Less val | Equal val | Greater val)] ref

```
 #### Implements

 * [Equatable](builtin-equatable)[([Less](builtin-less) val | [Equal](builtin-equal) val | [Greater](index) val)] ref

 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/builtin/compare/#L9)

 
```
new val create()
: Greater val^

```
 #### Returns

 * [Greater](index) val^

 Public Functions
----------------

 ### string

 [[Source]](https://stdlib.ponylang.io/src/builtin/compare/#L10)

 
```
fun box string()
: String iso^

```
 #### Returns

 * [String](builtin-string) iso^

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/builtin/compare/#L19)

 
```
fun box eq(
  that: (Less val | Equal val | Greater val))
: Bool val

```
 #### Parameters

 * that: ([Less](builtin-less) val | [Equal](builtin-equal) val | [Greater](index) val)

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/builtin/compare/#L20)

 
```
fun box ne(
  that: (Less val | Equal val | Greater val))
: Bool val

```
 #### Parameters

 * that: ([Less](builtin-less) val | [Equal](builtin-equal) val | [Greater](index) val)

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/builtin-Greater>

Compare
=======

 [[Source]](https://stdlib.ponylang.io/src/builtin/compare/#L13)

 
```
type Compare is
  (Less val | Equal val | Greater val)

```
 #### Type Alias For

 * ([Less](builtin-less) val | [Equal](builtin-equal) val | [Greater](builtin-greater) val)



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/builtin-Compare>

Comparable[A: [Comparable](index)[A] #read]
===========================================

 [[Source]](https://stdlib.ponylang.io/src/builtin/compare/#L22)

 
```
interface ref Comparable[A: Comparable[A] #read] is
  Equatable[A] ref

```
 #### Implements

 * [Equatable](builtin-equatable)[A] ref

 Public Functions
----------------

 ### lt

 [[Source]](https://stdlib.ponylang.io/src/builtin/compare/#L23)

 
```
fun box lt(
  that: box->A)
: Bool val

```
 #### Parameters

 * that: box->A

 #### Returns

 * [Bool](builtin-bool) val

 ### le

 [[Source]](https://stdlib.ponylang.io/src/builtin/compare/#L24)

 
```
fun box le(
  that: box->A)
: Bool val

```
 #### Parameters

 * that: box->A

 #### Returns

 * [Bool](builtin-bool) val

 ### ge

 [[Source]](https://stdlib.ponylang.io/src/builtin/compare/#L25)

 
```
fun box ge(
  that: box->A)
: Bool val

```
 #### Parameters

 * that: box->A

 #### Returns

 * [Bool](builtin-bool) val

 ### gt

 [[Source]](https://stdlib.ponylang.io/src/builtin/compare/#L26)

 
```
fun box gt(
  that: box->A)
: Bool val

```
 #### Parameters

 * that: box->A

 #### Returns

 * [Bool](builtin-bool) val

 ### compare

 [[Source]](https://stdlib.ponylang.io/src/builtin/compare/#L28)

 
```
fun box compare(
  that: box->A)
: (Less val | Equal val | Greater val)

```
 #### Parameters

 * that: box->A

 #### Returns

 * ([Less](builtin-less) val | [Equal](builtin-equal) val | [Greater](builtin-greater) val)

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/builtin/compare/#L19)

 
```
fun box eq(
  that: box->A)
: Bool val

```
 #### Parameters

 * that: box->A

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/builtin/compare/#L20)

 
```
fun box ne(
  that: box->A)
: Bool val

```
 #### Parameters

 * that: box->A

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/builtin-Comparable>

AsioEvent
=========

 [[Source]](https://stdlib.ponylang.io/src/builtin/asio_event/#L6)

 Functions for asynchronous event notification.

 
```
primitive val AsioEvent

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/builtin/asio_event/#L6)

 
```
new val create()
: AsioEvent val^

```
 #### Returns

 * [AsioEvent](index) val^

 Public Functions
----------------

 ### none

 [[Source]](https://stdlib.ponylang.io/src/builtin/asio_event/#L10)

 An empty event.

 
```
fun box none()
: Pointer[AsioEvent val] tag

```
 #### Returns

 * [Pointer](builtin-pointer)[[AsioEvent](index) val] tag

 ### readable

 [[Source]](https://stdlib.ponylang.io/src/builtin/asio_event/#L16)

 Returns true if the flags contain the readable flag.

 
```
fun box readable(
  flags: U32 val)
: Bool val

```
 #### Parameters

 * flags: [U32](builtin-u32) val

 #### Returns

 * [Bool](builtin-bool) val

 ### writeable

 [[Source]](https://stdlib.ponylang.io/src/builtin/asio_event/#L22)

 Returns true if the flags contain the writeable flag.

 
```
fun box writeable(
  flags: U32 val)
: Bool val

```
 #### Parameters

 * flags: [U32](builtin-u32) val

 #### Returns

 * [Bool](builtin-bool) val

 ### disposable

 [[Source]](https://stdlib.ponylang.io/src/builtin/asio_event/#L28)

 Returns true if the event should be disposed of.

 
```
fun box disposable(
  flags: U32 val)
: Bool val

```
 #### Parameters

 * flags: [U32](builtin-u32) val

 #### Returns

 * [Bool](builtin-bool) val

 ### oneshotable

 [[Source]](https://stdlib.ponylang.io/src/builtin/asio_event/#L34)

 Returns true if the flags contain the oneshot flag.

 
```
fun box oneshotable(
  flags: U32 val)
: Bool val

```
 #### Parameters

 * flags: [U32](builtin-u32) val

 #### Returns

 * [Bool](builtin-bool) val

 ### dispose

 [[Source]](https://stdlib.ponylang.io/src/builtin/asio_event/#L40)

 
```
fun box dispose()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### read

 [[Source]](https://stdlib.ponylang.io/src/builtin/asio_event/#L42)

 
```
fun box read()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### write

 [[Source]](https://stdlib.ponylang.io/src/builtin/asio_event/#L44)

 
```
fun box write()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### timer

 [[Source]](https://stdlib.ponylang.io/src/builtin/asio_event/#L46)

 
```
fun box timer()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### signal

 [[Source]](https://stdlib.ponylang.io/src/builtin/asio_event/#L48)

 
```
fun box signal()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### read\_write

 [[Source]](https://stdlib.ponylang.io/src/builtin/asio_event/#L50)

 
```
fun box read_write()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### oneshot

 [[Source]](https://stdlib.ponylang.io/src/builtin/asio_event/#L52)

 
```
fun box oneshot()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### read\_write\_oneshot

 [[Source]](https://stdlib.ponylang.io/src/builtin/asio_event/#L54)

 
```
fun box read_write_oneshot()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/builtin/asio_event/#L10)

 
```
fun box eq(
  that: AsioEvent val)
: Bool val

```
 #### Parameters

 * that: [AsioEvent](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/builtin/asio_event/#L10)

 
```
fun box ne(
  that: AsioEvent val)
: Bool val

```
 #### Parameters

 * that: [AsioEvent](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/builtin-AsioEvent>

Any
===

 [[Source]](https://stdlib.ponylang.io/src/builtin/any/#L1)

 
```
interface tag Any

```


 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/builtin-Any>

Array[A: A]
===========

 [[Source]](https://stdlib.ponylang.io/src/builtin/array/#L1)

 Contiguous, resizable memory to store elements of type A.

 Usage
-----

 Creating an Array of String:

 
```
  let array: Array[String] = ["dog"; "cat"; "wombat"]
  // array.size() == 3
  // array.space() >= 3

```
 Creating an empty Array of String, which may hold at least 10 elements before requesting more space:

 
```
  let array = Array[String](10)
  // array.size() == 0
  // array.space() >= 10

```
 Accessing elements can be done via the `apply(i: USize): this->A ?` method. The provided index might be out of bounds so `apply` is partial and has to be called within a try-catch block or inside another partial method:

 
```
  let array: Array[String] = ["dog"; "cat"; "wombat"]
  let is_second_element_wobat = try
    // indexes start from 0, so 1 is the second element
    array(1)? == "wombat"
  else
    false
  end

```
 Adding and removing elements to and from the end of the Array can be done via `push` and `pop` methods. You could treat the array as a LIFO stack using those methods:

 
```
  while (array.size() > 0) do
    let elem = array.pop()?
    // do something with element
  end

```
 Modifying the Array can be done via `update`, `insert` and `delete` methods which alter the Array at an arbitrary index, moving elements left (when deleting) or right (when inserting) as necessary.

 Iterating over the elements of an Array can be done using the `values` method:

 
```
  for element in array.values() do
      // do something with element
  end

```
 Memory allocation
-----------------

 Array allocates contiguous memory. It always allocates at least enough memory space to hold all of its elements. Space is the number of elements the Array can hold without allocating more memory. The `space()` method returns the number of elements an Array can hold. The `size()` method returns the number of elements the Array holds.

 Different data types require different amounts of memory. Array[U64] with size of 6 will take more memory than an Array[U8] of the same size.

 When creating an Array or adding more elements will calculate the next power of 2 of the requested number of elements and allocate that much space, with a lower bound of space for 8 elements.

 Here's a few examples of the space allocated when initialising an Array with various number of elements:

 

| size | space |
| --- | --- |
| 0 | 0 |
| 1 | 8 |
| 8 | 8 |
| 9 | 16 |
| 16 | 16 |
| 17 | 32 |

 Call the `compact()` method to ask the GC to reclaim unused space. There are no guarantees that the GC will actually reclaim any space.

 
```
class ref Array[A: A] is
  Seq[A] ref

```
 #### Implements

 * [Seq](builtin-seq)[A] ref

 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/builtin/array/#L89)

 Create an array with zero elements, but space for len elements.

 
```
new ref create(
  len: USize val = 0)
: Array[A] ref^

```
 #### Parameters

 * len: [USize](builtin-usize) val = 0

 #### Returns

 * [Array](index)[A] ref^

 ### init

 [[Source]](https://stdlib.ponylang.io/src/builtin/array/#L103)

 Create an array of len elements, all initialised to the given value.

 
```
new ref init(
  from: A^,
  len: USize val)
: Array[A] ref^

```
 #### Parameters

 * from: A^
* len: [USize](builtin-usize) val

 #### Returns

 * [Array](index)[A] ref^

 ### from\_cpointer

 [[Source]](https://stdlib.ponylang.io/src/builtin/array/#L124)

 Create an array from a C-style pointer and length. The contents are not copied.

 
```
new ref from_cpointer(
  ptr: Pointer[A] ref,
  len: USize val,
  alloc: USize val = 0)
: Array[A] ref^

```
 #### Parameters

 * ptr: [Pointer](builtin-pointer)[A] ref
* len: [USize](builtin-usize) val
* alloc: [USize](builtin-usize) val = 0

 #### Returns

 * [Array](index)[A] ref^

 Public Functions
----------------

 ### cpointer

 [[Source]](https://stdlib.ponylang.io/src/builtin/array/#L150)

 Return the underlying C-style pointer.

 
```
fun box cpointer(
  offset: USize val = 0)
: Pointer[A] tag

```
 #### Parameters

 * offset: [USize](builtin-usize) val = 0

 #### Returns

 * [Pointer](builtin-pointer)[A] tag

 ### size

 [[Source]](https://stdlib.ponylang.io/src/builtin/array/#L156)

 The number of elements in the array.

 
```
fun box size()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### space

 [[Source]](https://stdlib.ponylang.io/src/builtin/array/#L162)

 The available space in the array.

 
```
fun box space()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### reserve

 [[Source]](https://stdlib.ponylang.io/src/builtin/array/#L168)

 Reserve space for len elements, including whatever elements are already in the array. Array space grows geometrically.

 
```
fun ref reserve(
  len: USize val)
: None val

```
 #### Parameters

 * len: [USize](builtin-usize) val

 #### Returns

 * [None](builtin-none) val

 ### compact

 [[Source]](https://stdlib.ponylang.io/src/builtin/array/#L184)

 Try to remove unused space, making it available for garbage collection. The request may be ignored.

 
```
fun ref compact()
: None val

```
 #### Returns

 * [None](builtin-none) val

 ### undefined[optional B: (A & [Real](builtin-real)[B] val & ([I8](builtin-i8) val | [I16](builtin-i16) val | [I32](builtin-i32) val | [I64](builtin-i64) val | [I128](builtin-i128) val | [ILong](builtin-ilong) val | [ISize](builtin-isize) val | [U8](builtin-u8) val | [U16](builtin-u16) val | [U32](builtin-u32) val | [U64](builtin-u64) val | [U128](builtin-u128) val | [ULong](builtin-ulong) val | [USize](builtin-usize) val | [F32](builtin-f32) val | [F64](builtin-f64) val))]

 [[Source]](https://stdlib.ponylang.io/src/builtin/array/#L201)

 Resize to len elements, populating previously empty elements with random memory. This is only allowed for an array of numbers.

 
```
fun ref undefined[optional B: (A & Real[B] val & (I8 val | I16 val | I32 val | 
    I64 val | I128 val | ILong val | 
    ISize val | U8 val | U16 val | 
    U32 val | U64 val | U128 val | 
    ULong val | USize val | F32 val | 
    F64 val))](
  len: USize val)
: None val

```
 #### Parameters

 * len: [USize](builtin-usize) val

 #### Returns

 * [None](builtin-none) val

 ### read\_u8[optional B: (A & [Real](builtin-real)[B] val & [U8](builtin-u8) val)]

 [[Source]](https://stdlib.ponylang.io/src/builtin/array/#L209)

 Reads a U8 from offset. This is only allowed for an array of U8s.

 
```
fun box read_u8[optional B: (A & Real[B] val & U8 val)](
  offset: USize val)
: U8 val ?

```
 #### Parameters

 * offset: [USize](builtin-usize) val

 #### Returns

 * [U8](builtin-u8) val ?

 ### read\_u16[optional B: (A & [Real](builtin-real)[B] val & [U8](builtin-u8) val)]

 [[Source]](https://stdlib.ponylang.io/src/builtin/array/#L219)

 Reads a U16 from offset. This is only allowed for an array of U8s.

 
```
fun box read_u16[optional B: (A & Real[B] val & U8 val)](
  offset: USize val)
: U16 val ?

```
 #### Parameters

 * offset: [USize](builtin-usize) val

 #### Returns

 * [U16](builtin-u16) val ?

 ### read\_u32[optional B: (A & [Real](builtin-real)[B] val & [U8](builtin-u8) val)]

 [[Source]](https://stdlib.ponylang.io/src/builtin/array/#L230)

 Reads a U32 from offset. This is only allowed for an array of U8s.

 
```
fun box read_u32[optional B: (A & Real[B] val & U8 val)](
  offset: USize val)
: U32 val ?

```
 #### Parameters

 * offset: [USize](builtin-usize) val

 #### Returns

 * [U32](builtin-u32) val ?

 ### read\_u64[optional B: (A & [Real](builtin-real)[B] val & [U8](builtin-u8) val)]

 [[Source]](https://stdlib.ponylang.io/src/builtin/array/#L241)

 Reads a U64 from offset. This is only allowed for an array of U8s.

 
```
fun box read_u64[optional B: (A & Real[B] val & U8 val)](
  offset: USize val)
: U64 val ?

```
 #### Parameters

 * offset: [USize](builtin-usize) val

 #### Returns

 * [U64](builtin-u64) val ?

 ### read\_u128[optional B: (A & [Real](builtin-real)[B] val & [U8](builtin-u8) val)]

 [[Source]](https://stdlib.ponylang.io/src/builtin/array/#L252)

 Reads a U128 from offset. This is only allowed for an array of U8s.

 
```
fun box read_u128[optional B: (A & Real[B] val & U8 val)](
  offset: USize val)
: U128 val ?

```
 #### Parameters

 * offset: [USize](builtin-usize) val

 #### Returns

 * [U128](builtin-u128) val ?

 ### apply

 [[Source]](https://stdlib.ponylang.io/src/builtin/array/#L263)

 Get the i-th element, raising an error if the index is out of bounds.

 
```
fun box apply(
  i: USize val)
: this->A ?

```
 #### Parameters

 * i: [USize](builtin-usize) val

 #### Returns

 * this->A ?

 ### update\_u8[optional B: (A & [Real](builtin-real)[B] val & [U8](builtin-u8) val)]

 [[Source]](https://stdlib.ponylang.io/src/builtin/array/#L273)

 Write a U8 at offset. This is only allowed for an array of U8s.

 
```
fun ref update_u8[optional B: (A & Real[B] val & U8 val)](
  offset: USize val,
  value: U8 val)
: U8 val ?

```
 #### Parameters

 * offset: [USize](builtin-usize) val
* value: [U8](builtin-u8) val

 #### Returns

 * [U8](builtin-u8) val ?

 ### update\_u16[optional B: (A & [Real](builtin-real)[B] val & [U8](builtin-u8) val)]

 [[Source]](https://stdlib.ponylang.io/src/builtin/array/#L283)

 Write a U16 at offset. This is only allowed for an array of U8s.

 
```
fun ref update_u16[optional B: (A & Real[B] val & U8 val)](
  offset: USize val,
  value: U16 val)
: U16 val ?

```
 #### Parameters

 * offset: [USize](builtin-usize) val
* value: [U16](builtin-u16) val

 #### Returns

 * [U16](builtin-u16) val ?

 ### update\_u32[optional B: (A & [Real](builtin-real)[B] val & [U8](builtin-u8) val)]

 [[Source]](https://stdlib.ponylang.io/src/builtin/array/#L294)

 Write a U32 at offset. This is only allowed for an array of U8s.

 
```
fun ref update_u32[optional B: (A & Real[B] val & U8 val)](
  offset: USize val,
  value: U32 val)
: U32 val ?

```
 #### Parameters

 * offset: [USize](builtin-usize) val
* value: [U32](builtin-u32) val

 #### Returns

 * [U32](builtin-u32) val ?

 ### update\_u64[optional B: (A & [Real](builtin-real)[B] val & [U8](builtin-u8) val)]

 [[Source]](https://stdlib.ponylang.io/src/builtin/array/#L305)

 Write a U64 at offset. This is only allowed for an array of U8s.

 
```
fun ref update_u64[optional B: (A & Real[B] val & U8 val)](
  offset: USize val,
  value: U64 val)
: U64 val ?

```
 #### Parameters

 * offset: [USize](builtin-usize) val
* value: [U64](builtin-u64) val

 #### Returns

 * [U64](builtin-u64) val ?

 ### update\_u128[optional B: (A & [Real](builtin-real)[B] val & [U8](builtin-u8) val)]

 [[Source]](https://stdlib.ponylang.io/src/builtin/array/#L316)

 Write a U128 at offset. This is only allowed for an array of U8s.

 
```
fun ref update_u128[optional B: (A & Real[B] val & U8 val)](
  offset: USize val,
  value: U128 val)
: U128 val ?

```
 #### Parameters

 * offset: [USize](builtin-usize) val
* value: [U128](builtin-u128) val

 #### Returns

 * [U128](builtin-u128) val ?

 ### update

 [[Source]](https://stdlib.ponylang.io/src/builtin/array/#L327)

 Change the i-th element, raising an error if the index is out of bounds.

 
```
fun ref update(
  i: USize val,
  value: A)
: A^ ?

```
 #### Parameters

 * i: [USize](builtin-usize) val
* value: A

 #### Returns

 * A^ ?

 ### insert

 [[Source]](https://stdlib.ponylang.io/src/builtin/array/#L337)

 Insert an element into the array. Elements after this are moved up by one index, extending the array.

 When inserting right beyond the last element, at index `this.size()`, the element will be appended, similar to `push()`, an insert at index `0` prepends the value to the array. An insert into an index beyond `this.size()` raises an error.

 
```
let array = Array[U8](4)              // []
array.insert(0, 0xDE)?                // prepend: [0xDE]
array.insert(array.size(), 0xBE)?     // append:  [0xDE; 0xBE]
array.insert(1, 0xAD)?                // insert:  [0xDE; 0xAD; 0xBE]
array.insert(array.size() + 1, 0xEF)? // error

```
 
```
fun ref insert(
  i: USize val,
  value: A)
: None val ?

```
 #### Parameters

 * i: [USize](builtin-usize) val
* value: A

 #### Returns

 * [None](builtin-none) val ?

 ### delete

 [[Source]](https://stdlib.ponylang.io/src/builtin/array/#L364)

 Delete an element from the array. Elements after this are moved down by one index, compacting the array. An out of bounds index raises an error. The deleted element is returned.

 
```
fun ref delete(
  i: USize val)
: A^ ?

```
 #### Parameters

 * i: [USize](builtin-usize) val

 #### Returns

 * A^ ?

 ### truncate

 [[Source]](https://stdlib.ponylang.io/src/builtin/array/#L378)

 Truncate an array to the given length, discarding excess elements. If the array is already smaller than len, do nothing.

 
```
fun ref truncate(
  len: USize val)
: None val

```
 #### Parameters

 * len: [USize](builtin-usize) val

 #### Returns

 * [None](builtin-none) val

 ### trim\_in\_place

 [[Source]](https://stdlib.ponylang.io/src/builtin/array/#L385)

 Trim the array to a portion of itself, covering `from` until `to`. Unlike slice, the operation does not allocate a new array nor copy elements.

 
```
fun ref trim_in_place(
  from: USize val = 0,
  to: USize val = call)
: None val

```
 #### Parameters

 * from: [USize](builtin-usize) val = 0
* to: [USize](builtin-usize) val = call

 #### Returns

 * [None](builtin-none) val

 ### trim

 [[Source]](https://stdlib.ponylang.io/src/builtin/array/#L412)

 Return a shared portion of this array, covering `from` until `to`. Both the original and the new array are immutable, as they share memory. The operation does not allocate a new array pointer nor copy elements.

 
```
fun val trim(
  from: USize val = 0,
  to: USize val = call)
: Array[A] val

```
 #### Parameters

 * from: [USize](builtin-usize) val = 0
* to: [USize](builtin-usize) val = call

 #### Returns

 * [Array](index)[A] val

 ### chop[optional B: (A & [Any](builtin-any) #send)]

 [[Source]](https://stdlib.ponylang.io/src/builtin/array/#L436)

 Chops the array in half at the split point requested and returns both the left and right portions. The original array is trimmed in place and returned as the left portion. If the split point is larger than the array, the left portion is the original array and the right portion is a new empty array. The operation does not allocate a new array pointer nor copy elements.

 The entry type must be sendable so that the two halves can be isolated. Otherwise, two entries may have shared references to mutable data, or even to each other, such as in the code below:

 
```
  class Example
     var other: (Example | None) = None

  let arr: Array[Example] iso = recover
     let obj1 = Example
     let obj2 = Example
     obj1.other = obj2
     obj2.other = obj1
     [obj1; obj2]
  end

```
 
```
fun iso chop[optional B: (A & Any #send)](
  split_point: USize val)
: (Array[A] iso^ , Array[A] iso^)

```
 #### Parameters

 * split\_point: [USize](builtin-usize) val

 #### Returns

 * ([Array](index)[A] iso^ , [Array](index)[A] iso^)

 ### unchop

 [[Source]](https://stdlib.ponylang.io/src/builtin/array/#L479)

 Unchops two iso arrays to return the original array they were chopped from. Both input arrays are isolated and mutable and were originally chopped from a single array. This function checks that they are indeed two arrays chopped from the same original array and can be unchopped before doing the unchopping and returning the unchopped array. If the two arrays cannot be unchopped it returns both arrays without modifying them. The operation does not allocate a new array pointer nor copy elements.

 
```
fun iso unchop(
  b: Array[A] iso)
: ((Array[A] iso^ , Array[A] iso^) | Array[A] iso^)

```
 #### Parameters

 * b: [Array](index)[A] iso

 #### Returns

 * (([Array](index)[A] iso^ , [Array](index)[A] iso^) | [Array](index)[A] iso^)

 ### copy\_from[optional B: (A & [Real](builtin-real)[B] val & [U8](builtin-u8) val)]

 [[Source]](https://stdlib.ponylang.io/src/builtin/array/#L523)

 Copy len elements from src(src\_idx) to this(dst\_idx). Only works for Array[U8].

 
```
fun ref copy_from[optional B: (A & Real[B] val & U8 val)](
  src: Array[U8 val] box,
  src_idx: USize val,
  dst_idx: USize val,
  len: USize val)
: None val

```
 #### Parameters

 * src: [Array](index)[[U8](builtin-u8) val] box
* src\_idx: [USize](builtin-usize) val
* dst\_idx: [USize](builtin-usize) val
* len: [USize](builtin-usize) val

 #### Returns

 * [None](builtin-none) val

 ### copy\_to

 [[Source]](https://stdlib.ponylang.io/src/builtin/array/#L540)

 Copy len elements from this(src\_idx) to dst(dst\_idx).

 
```
fun box copy_to(
  dst: Array[this->A!] ref,
  src_idx: USize val,
  dst_idx: USize val,
  len: USize val)
: None val

```
 #### Parameters

 * dst: [Array](index)[this->A!] ref
* src\_idx: [USize](builtin-usize) val
* dst\_idx: [USize](builtin-usize) val
* len: [USize](builtin-usize) val

 #### Returns

 * [None](builtin-none) val

 ### remove

 [[Source]](https://stdlib.ponylang.io/src/builtin/array/#L556)

 Remove n elements from the array, beginning at index i.

 
```
fun ref remove(
  i: USize val,
  n: USize val)
: None val

```
 #### Parameters

 * i: [USize](builtin-usize) val
* n: [USize](builtin-usize) val

 #### Returns

 * [None](builtin-none) val

 ### clear

 [[Source]](https://stdlib.ponylang.io/src/builtin/array/#L566)

 Remove all elements from the array.

 
```
fun ref clear()
: None val

```
 #### Returns

 * [None](builtin-none) val

 ### push\_u8[optional B: (A & [Real](builtin-real)[B] val & [U8](builtin-u8) val)]

 [[Source]](https://stdlib.ponylang.io/src/builtin/array/#L572)

 Add a U8 to the end of the array. This is only allowed for an array of U8s.

 
```
fun ref push_u8[optional B: (A & Real[B] val & U8 val)](
  value: U8 val)
: None val

```
 #### Parameters

 * value: [U8](builtin-u8) val

 #### Returns

 * [None](builtin-none) val

 ### push\_u16[optional B: (A & [Real](builtin-real)[B] val & [U8](builtin-u8) val)]

 [[Source]](https://stdlib.ponylang.io/src/builtin/array/#L581)

 Add a U16 to the end of the array. This is only allowed for an array of U8s.

 
```
fun ref push_u16[optional B: (A & Real[B] val & U8 val)](
  value: U16 val)
: None val

```
 #### Parameters

 * value: [U16](builtin-u16) val

 #### Returns

 * [None](builtin-none) val

 ### push\_u32[optional B: (A & [Real](builtin-real)[B] val & [U8](builtin-u8) val)]

 [[Source]](https://stdlib.ponylang.io/src/builtin/array/#L590)

 Add a U32 to the end of the array. This is only allowed for an array of U8s.

 
```
fun ref push_u32[optional B: (A & Real[B] val & U8 val)](
  value: U32 val)
: None val

```
 #### Parameters

 * value: [U32](builtin-u32) val

 #### Returns

 * [None](builtin-none) val

 ### push\_u64[optional B: (A & [Real](builtin-real)[B] val & [U8](builtin-u8) val)]

 [[Source]](https://stdlib.ponylang.io/src/builtin/array/#L599)

 Add a U64 to the end of the array. This is only allowed for an array of U8s.

 
```
fun ref push_u64[optional B: (A & Real[B] val & U8 val)](
  value: U64 val)
: None val

```
 #### Parameters

 * value: [U64](builtin-u64) val

 #### Returns

 * [None](builtin-none) val

 ### push\_u128[optional B: (A & [Real](builtin-real)[B] val & [U8](builtin-u8) val)]

 [[Source]](https://stdlib.ponylang.io/src/builtin/array/#L608)

 Add a U128 to the end of the array. This is only allowed for an array of U8s.

 
```
fun ref push_u128[optional B: (A & Real[B] val & U8 val)](
  value: U128 val)
: None val

```
 #### Parameters

 * value: [U128](builtin-u128) val

 #### Returns

 * [None](builtin-none) val

 ### push

 [[Source]](https://stdlib.ponylang.io/src/builtin/array/#L617)

 Add an element to the end of the array.

 
```
fun ref push(
  value: A)
: None val

```
 #### Parameters

 * value: A

 #### Returns

 * [None](builtin-none) val

 ### pop

 [[Source]](https://stdlib.ponylang.io/src/builtin/array/#L625)

 Remove an element from the end of the array. The removed element is returned.

 
```
fun ref pop()
: A^ ?

```
 #### Returns

 * A^ ?

 ### unshift

 [[Source]](https://stdlib.ponylang.io/src/builtin/array/#L632)

 Add an element to the beginning of the array.

 
```
fun ref unshift(
  value: A)
: None val

```
 #### Parameters

 * value: A

 #### Returns

 * [None](builtin-none) val

 ### shift

 [[Source]](https://stdlib.ponylang.io/src/builtin/array/#L640)

 Remove an element from the beginning of the array. The removed element is returned.

 
```
fun ref shift()
: A^ ?

```
 #### Returns

 * A^ ?

 ### append

 [[Source]](https://stdlib.ponylang.io/src/builtin/array/#L647)

 Append the elements from a sequence, starting from the given offset.

 
```
fun ref append(
  seq: (ReadSeq[A] box & ReadElement[A^] box),
  offset: USize val = 0,
  len: USize val = call)
: None val

```
 #### Parameters

 * seq: ([ReadSeq](builtin-readseq)[A] box & [ReadElement](builtin-readelement)[A^] box)
* offset: [USize](builtin-usize) val = 0
* len: [USize](builtin-usize) val = call

 #### Returns

 * [None](builtin-none) val

 ### concat

 [[Source]](https://stdlib.ponylang.io/src/builtin/array/#L674)

 Add len iterated elements to the end of the array, starting from the given offset.

 
```
fun ref concat(
  iter: Iterator[A^] ref,
  offset: USize val = 0,
  len: USize val = call)
: None val

```
 #### Parameters

 * iter: [Iterator](builtin-iterator)[A^] ref
* offset: [USize](builtin-usize) val = 0
* len: [USize](builtin-usize) val = call

 #### Returns

 * [None](builtin-none) val

 ### find

 [[Source]](https://stdlib.ponylang.io/src/builtin/array/#L730)

 Find the `nth` appearance of `value` from the beginning of the array, starting at `offset` and examining higher indices, and using the supplied `predicate` for comparisons. Returns the index of the value, or raise an error if the value isn't present.

 By default, the search starts at the first element of the array, returns the first instance of `value` found, and uses object identity for comparison.

 
```
fun box find(
  value: A!,
  offset: USize val = 0,
  nth: USize val = 0,
  predicate: {(box->A!, box->A!): Bool}[A] val = lambda)
: USize val ?

```
 #### Parameters

 * value: A!
* offset: [USize](builtin-usize) val = 0
* nth: [USize](builtin-usize) val = 0
* predicate: {(box->A!, box->A!): Bool}[A] val = lambda

 #### Returns

 * [USize](builtin-usize) val ?

 ### contains

 [[Source]](https://stdlib.ponylang.io/src/builtin/array/#L764)

 Returns true if the array contains `value`, false otherwise.

 The default predicate checks for matches by identity. To search for matches by structural equality, pass an object literal such as `{(l, r) => l == r}`.

 
```
fun box contains(
  value: A!,
  predicate: {(box->A!, box->A!): Bool}[A] val = lambda)
: Bool val

```
 #### Parameters

 * value: A!
* predicate: {(box->A!, box->A!): Bool}[A] val = lambda

 #### Returns

 * [Bool](builtin-bool) val

 ### rfind

 [[Source]](https://stdlib.ponylang.io/src/builtin/array/#L787)

 Find the `nth` appearance of `value` from the end of the array, starting at `offset` and examining lower indices, and using the supplied `predicate` for comparisons. Returns the index of the value, or raise an error if the value isn't present.

 By default, the search starts at the last element of the array, returns the first instance of `value` found, and uses object identity for comparison.

 
```
fun box rfind(
  value: A!,
  offset: USize val = call,
  nth: USize val = 0,
  predicate: {(box->A!, box->A!): Bool}[A] val = lambda)
: USize val ?

```
 #### Parameters

 * value: A!
* offset: [USize](builtin-usize) val = call
* nth: [USize](builtin-usize) val = 0
* predicate: {(box->A!, box->A!): Bool}[A] val = lambda

 #### Returns

 * [USize](builtin-usize) val ?

 ### clone

 [[Source]](https://stdlib.ponylang.io/src/builtin/array/#L822)

 Clone the array. The new array contains references to the same elements that the old array contains, the elements themselves are not cloned.

 
```
fun box clone()
: Array[this->A!] ref^

```
 #### Returns

 * [Array](index)[this->A!] ref^

 ### slice

 [[Source]](https://stdlib.ponylang.io/src/builtin/array/#L833)

 Create a new array that is a clone of a portion of this array. The range is exclusive and saturated. The new array contains references to the same elements that the old array contains, the elements themselves are not cloned.

 
```
fun box slice(
  from: USize val = 0,
  to: USize val = call,
  step: USize val = 1)
: Array[this->A!] ref^

```
 #### Parameters

 * from: [USize](builtin-usize) val = 0
* to: [USize](builtin-usize) val = call
* step: [USize](builtin-usize) val = 1

 #### Returns

 * [Array](index)[this->A!] ref^

 ### permute

 [[Source]](https://stdlib.ponylang.io/src/builtin/array/#L868)

 Create a new array with the elements permuted. Permute to an arbitrary order that may include duplicates. An out of bounds index raises an error. The new array contains references to the same elements that the old array contains, the elements themselves are not copied.

 
```
fun box permute(
  indices: Iterator[USize val] ref)
: Array[this->A!] ref^ ?

```
 #### Parameters

 * indices: [Iterator](builtin-iterator)[[USize](builtin-usize) val] ref

 #### Returns

 * [Array](index)[this->A!] ref^ ?

 ### reverse

 [[Source]](https://stdlib.ponylang.io/src/builtin/array/#L882)

 Create a new array with the elements in reverse order. The new array contains references to the same elements that the old array contains, the elements themselves are not copied.

 
```
fun box reverse()
: Array[this->A!] ref^

```
 #### Returns

 * [Array](index)[this->A!] ref^

 ### reverse\_in\_place

 [[Source]](https://stdlib.ponylang.io/src/builtin/array/#L890)

 Reverse the array in place.

 
```
fun ref reverse_in_place()
: None val

```
 #### Returns

 * [None](builtin-none) val

 ### swap\_elements

 [[Source]](https://stdlib.ponylang.io/src/builtin/array/#L907)

 Swap the element at index i with the element at index j. If either i or j are out of bounds, an error is raised.

 
```
fun ref swap_elements(
  i: USize val,
  j: USize val)
: None val ?

```
 #### Parameters

 * i: [USize](builtin-usize) val
* j: [USize](builtin-usize) val

 #### Returns

 * [None](builtin-none) val ?

 ### keys

 [[Source]](https://stdlib.ponylang.io/src/builtin/array/#L918)

 Return an iterator over the indices in the array.

 
```
fun box keys()
: ArrayKeys[A, this->Array[A] ref] ref^

```
 #### Returns

 * [ArrayKeys](builtin-arraykeys)[A, this->[Array](index)[A] ref] ref^

 ### values

 [[Source]](https://stdlib.ponylang.io/src/builtin/array/#L924)

 Return an iterator over the values in the array.

 
```
fun box values()
: ArrayValues[A, this->Array[A] ref] ref^

```
 #### Returns

 * [ArrayValues](builtin-arrayvalues)[A, this->[Array](index)[A] ref] ref^

 ### pairs

 [[Source]](https://stdlib.ponylang.io/src/builtin/array/#L930)

 Return an iterator over the (index, value) pairs in the array.

 
```
fun box pairs()
: ArrayPairs[A, this->Array[A] ref] ref^

```
 #### Returns

 * [ArrayPairs](builtin-arraypairs)[A, this->[Array](index)[A] ref] ref^



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/builtin-Array>

ArrayPairs[A: A, B: [Array](builtin-array)[A] #read]
====================================================

 [[Source]](https://stdlib.ponylang.io/src/builtin/array/#L972)

 
```
class ref ArrayPairs[A: A, B: Array[A] #read] is
  Iterator[(USize val , B->A)] ref

```
 #### Implements

 * [Iterator](builtin-iterator)[([USize](builtin-usize) val , B->A)] ref

 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/builtin/array/#L976)

 
```
new ref create(
  array: B)
: ArrayPairs[A, B] ref^

```
 #### Parameters

 * array: B

 #### Returns

 * [ArrayPairs](index)[A, B] ref^

 Public Functions
----------------

 ### has\_next

 [[Source]](https://stdlib.ponylang.io/src/builtin/array/#L980)

 
```
fun box has_next()
: Bool val

```
 #### Returns

 * [Bool](builtin-bool) val

 ### next

 [[Source]](https://stdlib.ponylang.io/src/builtin/array/#L983)

 
```
fun ref next()
: (USize val , B->A) ?

```
 #### Returns

 * ([USize](builtin-usize) val , B->A) ?



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/builtin-ArrayPairs>

ArrayValues[A: A, B: [Array](builtin-array)[A] #read]
=====================================================

 [[Source]](https://stdlib.ponylang.io/src/builtin/array/#L954)

 
```
class ref ArrayValues[A: A, B: Array[A] #read] is
  Iterator[B->A] ref

```
 #### Implements

 * [Iterator](builtin-iterator)[B->A] ref

 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/builtin/array/#L958)

 
```
new ref create(
  array: B)
: ArrayValues[A, B] ref^

```
 #### Parameters

 * array: B

 #### Returns

 * [ArrayValues](index)[A, B] ref^

 Public Functions
----------------

 ### has\_next

 [[Source]](https://stdlib.ponylang.io/src/builtin/array/#L962)

 
```
fun box has_next()
: Bool val

```
 #### Returns

 * [Bool](builtin-bool) val

 ### next

 [[Source]](https://stdlib.ponylang.io/src/builtin/array/#L965)

 
```
fun ref next()
: B->A ?

```
 #### Returns

 * B->A ?

 ### rewind

 [[Source]](https://stdlib.ponylang.io/src/builtin/array/#L968)

 
```
fun ref rewind()
: ArrayValues[A, B] ref

```
 #### Returns

 * [ArrayValues](index)[A, B] ref



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/builtin-ArrayValues>

VecPairs[A: [Any](builtin-any) #share]
======================================

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/vec/#L280)

 
```
class ref VecPairs[A: Any #share]

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/vec/#L285)

 
```
new ref create(
  v: Vec[A] val)
: VecPairs[A] ref^

```
 #### Parameters

 * v: [Vec](collections-persistent-vec)[A] val

 #### Returns

 * [VecPairs](index)[A] ref^

 Public Functions
----------------

 ### has\_next

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/vec/#L288)

 
```
fun box has_next()
: Bool val

```
 #### Returns

 * [Bool](builtin-bool) val

 ### next

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/vec/#L291)

 
```
fun ref next()
: (USize val , A) ?

```
 #### Returns

 * ([USize](builtin-usize) val , A) ?



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/collections-persistent-VecPairs>

Vec[A: [Any](builtin-any) #share]
=================================

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/vec/#L3)

 A persistent vector based on the Hash Array Mapped Trie from 'Ideal Hash Trees' by Phil Bagwell.

 
```
class val Vec[A: Any #share]

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/vec/#L14)

 
```
new val create()
: Vec[A] val^

```
 #### Returns

 * [Vec](index)[A] val^

 Public Functions
----------------

 ### size

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/vec/#L31)

 Return the amount of values in the vector.

 
```
fun box size()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### apply

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/vec/#L43)

 Get the i-th element, raising an error if the index is out of bounds.

 
```
fun box apply(
  i: USize val)
: val->A ?

```
 #### Parameters

 * i: [USize](builtin-usize) val

 #### Returns

 * val->A ?

 ### update

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/vec/#L53)

 Return a vector with the i-th element changed, raising an error if the index is out of bounds.

 
```
fun val update(
  i: USize val,
  value: val->A)
: Vec[A] val ?

```
 #### Parameters

 * i: [USize](builtin-usize) val
* value: val->A

 #### Returns

 * [Vec](index)[A] val ?

 ### insert

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/vec/#L67)

 Return a vector with an element inserted. Elements after this are moved up by one index, extending the vector. An out of bounds index raises an error.

 
```
fun val insert(
  i: USize val,
  value: val->A)
: Vec[A] val ?

```
 #### Parameters

 * i: [USize](builtin-usize) val
* value: val->A

 #### Returns

 * [Vec](index)[A] val ?

 ### delete

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/vec/#L81)

 Return a vector with an element deleted. Elements after this are moved down by one index, compacting the vector. An out of bounds index raises an error.

 
```
fun val delete(
  i: USize val)
: Vec[A] val ?

```
 #### Parameters

 * i: [USize](builtin-usize) val

 #### Returns

 * [Vec](index)[A] val ?

 ### remove

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/vec/#L94)

 Return a vector with n elements removed, beginning at index i.

 
```
fun val remove(
  i: USize val,
  n: USize val)
: Vec[A] val ?

```
 #### Parameters

 * i: [USize](builtin-usize) val
* n: [USize](builtin-usize) val

 #### Returns

 * [Vec](index)[A] val ?

 ### push

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/vec/#L106)

 Return a vector with the value added to the end.

 
```
fun val push(
  value: val->A)
: Vec[A] val

```
 #### Parameters

 * value: val->A

 #### Returns

 * [Vec](index)[A] val

 ### pop

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/vec/#L138)

 Return a vector with the value at the end removed.

 
```
fun val pop()
: Vec[A] val ?

```
 #### Returns

 * [Vec](index)[A] val ?

 ### concat

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/vec/#L156)

 Return a vector with the values of the given iterator added to the end.

 
```
fun val concat(
  iter: Iterator[val->A] ref)
: Vec[A] val

```
 #### Parameters

 * iter: [Iterator](builtin-iterator)[val->A] ref

 #### Returns

 * [Vec](index)[A] val

 ### find

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/vec/#L166)

 Find the `nth` appearance of `value` from the beginning of the vector, starting at `offset` and examining higher indices, and using the supplied `predicate` for comparisons. Returns the index of the value, or raise an error if the value isn't present.

 By default, the search starts at the first element of the vector, returns the first instance of `value` found, and uses object identity for comparison.

 
```
fun val find(
  value: val->A,
  offset: USize val = 0,
  nth: USize val = 0,
  predicate: {(A, A): Bool}[A] val = lambda)
: USize val ?

```
 #### Parameters

 * value: val->A
* offset: [USize](builtin-usize) val = 0
* nth: [USize](builtin-usize) val = 0
* predicate: {(A, A): Bool}[A] val = lambda

 #### Returns

 * [USize](builtin-usize) val ?

 ### contains

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/vec/#L192)

 Returns true if the vector contains `value`, false otherwise.

 
```
fun val contains(
  value: val->A,
  predicate: {(A, A): Bool}[A] val = lambda)
: Bool val

```
 #### Parameters

 * value: val->A
* predicate: {(A, A): Bool}[A] val = lambda

 #### Returns

 * [Bool](builtin-bool) val

 ### slice

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/vec/#L205)

 Return a vector that is a clone of a portion of this vector. The range is exclusive and saturated.

 
```
fun val slice(
  from: USize val = 0,
  to: USize val = call,
  step: USize val = 1)
: Vec[A] val

```
 #### Parameters

 * from: [USize](builtin-usize) val = 0
* to: [USize](builtin-usize) val = call
* step: [USize](builtin-usize) val = 1

 #### Returns

 * [Vec](index)[A] val

 ### reverse

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/vec/#L216)

 Return a vector with the elements in reverse order.

 
```
fun val reverse()
: Vec[A] val

```
 #### Returns

 * [Vec](index)[A] val

 ### keys

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/vec/#L226)

 Return an iterator over the indices in the vector.

 
```
fun val keys()
: VecKeys[A] ref^

```
 #### Returns

 * [VecKeys](collections-persistent-veckeys)[A] ref^

 ### values

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/vec/#L232)

 Return an iterator over the values in the vector.

 
```
fun val values()
: VecValues[A] ref^

```
 #### Returns

 * [VecValues](collections-persistent-vecvalues)[A] ref^

 ### pairs

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/vec/#L238)

 Return an iterator over the (index, value) pairs in the vector.

 
```
fun val pairs()
: VecPairs[A] ref^

```
 #### Returns

 * [VecPairs](collections-persistent-vecpairs)[A] ref^



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/collections-persistent-Vec>

VecKeys[A: [Any](builtin-any) #share]
=====================================

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/vec/#L262)

 
```
class ref VecKeys[A: Any #share]

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/vec/#L265)

 
```
new ref create(
  v: Vec[A] val)
: VecKeys[A] ref^

```
 #### Parameters

 * v: [Vec](collections-persistent-vec)[A] val

 #### Returns

 * [VecKeys](index)[A] ref^

 Public Functions
----------------

 ### has\_next

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/vec/#L267)

 
```
fun box has_next()
: Bool val

```
 #### Returns

 * [Bool](builtin-bool) val

 ### next

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/vec/#L269)

 
```
fun ref next()
: USize val ?

```
 #### Returns

 * [USize](builtin-usize) val ?



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/collections-persistent-VecKeys>

AmbientAuth
===========

 [[Source]](https://stdlib.ponylang.io/src/builtin/ambient_auth/#L1)

 This type represents the root capability. When a Pony program starts, the Env passed to the Main actor contains an instance of the root capability.

 Ambient access to the root capability is denied outside of the builtin package. Inside the builtin package, only Env creates a Root.

 The root capability can be used by any package that wants to establish a principle of least authority. A typical usage is to have a parameter on a constructor for some resource that expects a limiting capability specific to the package, but will also accept the root capability as representing unlimited access.

 
```
primitive val AmbientAuth

```
 Public Functions
----------------

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/builtin/ambient_auth/#L15)

 
```
fun box eq(
  that: AmbientAuth val)
: Bool val

```
 #### Parameters

 * that: [AmbientAuth](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/builtin/ambient_auth/#L15)

 
```
fun box ne(
  that: AmbientAuth val)
: Bool val

```
 #### Parameters

 * that: [AmbientAuth](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/builtin-AmbientAuth>

VecValues[A: [Any](builtin-any) #share]
=======================================

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/vec/#L271)

 
```
class ref VecValues[A: Any #share]

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/vec/#L274)

 
```
new ref create(
  v: Vec[A] val)
: VecValues[A] ref^

```
 #### Parameters

 * v: [Vec](collections-persistent-vec)[A] val

 #### Returns

 * [VecValues](index)[A] ref^

 Public Functions
----------------

 ### has\_next

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/vec/#L276)

 
```
fun box has_next()
: Bool val

```
 #### Returns

 * [Bool](builtin-bool) val

 ### next

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/vec/#L278)

 
```
fun ref next()
: val->A ?

```
 #### Returns

 * val->A ?



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/collections-persistent-VecValues>

HashMap[K: [Any](builtin-any) #share, V: [Any](builtin-any) #share, H: [HashFunction](collections-hashfunction)[K] val]
=======================================================================================================================

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/map/#L14)

 A persistent map based on the Compressed Hash Array Mapped Prefix-tree from 'Optimizing Hash-Array Mapped Tries for Fast and Lean Immutable JVM Collections' by Michael J. Steindorfer and Jurgen J. Vinju

 Usage
-----

 
```
use "collections/persistent"

actor Main
  new create(env: Env) =>
    try
      let m1 = Map[String, U32] // {}
      // Update returns a new map with the provided key set
      // to the provided value. The old map is unchanged.
      let m2 = m1("a") = 5 // {a: 5}
      let m3 = m2("b") = 10 // {a: 5, b: 10}
      let m4 = m3.remove("a")? // {b: 10}
      // You can create a new map from key value pairs.
      let m5 = Map[String, U32].concat([("a", 2); ("b", 3)].values()) // {a: 2, b: 3}
    end

```
 
```
class val HashMap[K: Any #share, V: Any #share, H: HashFunction[K] val]

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/map/#L41)

 
```
new val create()
: HashMap[K, V, H] val^

```
 #### Returns

 * [HashMap](index)[K, V, H] val^

 Public Functions
----------------

 ### apply

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/map/#L49)

 Attempt to get the value corresponding to k.

 
```
fun val apply(
  k: K)
: val->V ?

```
 #### Parameters

 * k: K

 #### Returns

 * val->V ?

 ### size

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/map/#L55)

 Return the amount of key-value pairs in the Map.

 
```
fun val size()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### update

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/map/#L61)

 Update the value associated with the provided key.

 
```
fun val update(
  key: K,
  value: val->V)
: HashMap[K, V, H] val

```
 #### Parameters

 * key: K
* value: val->V

 #### Returns

 * [HashMap](index)[K, V, H] val

 ### remove

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/map/#L74)

 Try to remove the provided key from the Map.

 
```
fun val remove(
  k: K)
: HashMap[K, V, H] val ?

```
 #### Parameters

 * k: K

 #### Returns

 * [HashMap](index)[K, V, H] val ?

 ### get\_or\_else

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/map/#L80)

 Get the value associated with provided key if present. Otherwise, return the provided alternate value.

 
```
fun val get_or_else(
  k: K,
  alt: val->V)
: val->V

```
 #### Parameters

 * k: K
* alt: val->V

 #### Returns

 * val->V

 ### contains

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/map/#L94)

 Check whether the node contains the provided key.

 
```
fun val contains(
  k: K)
: Bool val

```
 #### Parameters

 * k: K

 #### Returns

 * [Bool](builtin-bool) val

 ### concat

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/map/#L102)

 Add the K, V pairs from the given iterator to the map.

 
```
fun val concat(
  iter: Iterator[(val->K , val->V)] ref)
: HashMap[K, V, H] val

```
 #### Parameters

 * iter: [Iterator](builtin-iterator)[(val->K , val->V)] ref

 #### Returns

 * [HashMap](index)[K, V, H] val

 ### add

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/map/#L112)

 Return this Map with the given (key, value) mapping.

 
```
fun val add(
  key: K,
  value: val->V)
: HashMap[K, V, H] val

```
 #### Parameters

 * key: K
* value: val->V

 #### Returns

 * [HashMap](index)[K, V, H] val

 ### sub

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/map/#L118)

 Return this Map without the given key.

 
```
fun val sub(
  key: K)
: HashMap[K, V, H] val

```
 #### Parameters

 * key: K

 #### Returns

 * [HashMap](index)[K, V, H] val

 ### keys

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/map/#L128)

 
```
fun val keys()
: MapKeys[K, V, H] ref

```
 #### Returns

 * [MapKeys](collections-persistent-mapkeys)[K, V, H] ref

 ### values

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/map/#L130)

 
```
fun val values()
: MapValues[K, V, H] ref

```
 #### Returns

 * [MapValues](collections-persistent-mapvalues)[K, V, H] ref

 ### pairs

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/map/#L132)

 
```
fun val pairs()
: MapPairs[K, V, H] ref

```
 #### Returns

 * [MapPairs](collections-persistent-mappairs)[K, V, H] ref



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/collections-persistent-HashMap>

Map[K: ([Hashable](collections-hashable) val & [Equatable](builtin-equatable)[K]), V: [Any](builtin-any) #share]
================================================================================================================

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/map/#L3)

 A map that uses structural equality on the key.

 
```
type Map[K: (Hashable val & Equatable[K]), V: Any #share] is
  HashMap[K, V, HashEq[K] val] val

```
 #### Type Alias For

 * [HashMap](collections-persistent-hashmap)[K, V, [HashEq](collections-hasheq)[K] val] val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/collections-persistent-Map>

Set[A: ([Hashable](collections-hashable) val & [Equatable](builtin-equatable)[A])]
==================================================================================

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/set/#L3)

 
```
type Set[A: (Hashable val & Equatable[A])] is
  HashSet[A, HashEq[A] val] val

```
 #### Type Alias For

 * [HashSet](collections-persistent-hashset)[A, [HashEq](collections-hasheq)[A] val] val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/collections-persistent-Set>

MapIs[K: [Any](builtin-any) #share, V: [Any](builtin-any) #share]
=================================================================

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/map/#L9)

 A map that uses identity comparison on the key.

 
```
type MapIs[K: Any #share, V: Any #share] is
  HashMap[K, V, HashIs[K] val] val

```
 #### Type Alias For

 * [HashMap](collections-persistent-hashmap)[K, V, [HashIs](collections-hashis)[K] val] val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/collections-persistent-MapIs>

SetIs[A: [Any](builtin-any) #share]
===================================

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/set/#L5)

 
```
type SetIs[A: Any #share] is
  HashSet[A, HashIs[A] val] val

```
 #### Type Alias For

 * [HashSet](collections-persistent-hashset)[A, [HashIs](collections-hashis)[A] val] val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/collections-persistent-SetIs>

MapValues[K: [Any](builtin-any) #share, V: [Any](builtin-any) #share, H: [HashFunction](collections-hashfunction)[K] val]
=========================================================================================================================

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/map/#L145)

 
```
class ref MapValues[K: Any #share, V: Any #share, H: HashFunction[K] val]

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/map/#L148)

 
```
new ref create(
  m: HashMap[K, V, H] val)
: MapValues[K, V, H] ref^

```
 #### Parameters

 * m: [HashMap](collections-persistent-hashmap)[K, V, H] val

 #### Returns

 * [MapValues](index)[K, V, H] ref^

 Public Functions
----------------

 ### has\_next

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/map/#L150)

 
```
fun box has_next()
: Bool val

```
 #### Returns

 * [Bool](builtin-bool) val

 ### next

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/map/#L152)

 
```
fun ref next()
: val->V ?

```
 #### Returns

 * val->V ?



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/collections-persistent-MapValues>

HashSet[A: [Any](builtin-any) #share, H: [HashFunction](collections-hashfunction)[A] val]
=========================================================================================

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/set/#L7)

 A set, built on top of persistent Map. This is implemented as map of an alias of a type to itself.

 
```
class val HashSet[A: Any #share, H: HashFunction[A] val] is
  Comparable[HashSet[A, H] box] ref

```
 #### Implements

 * [Comparable](builtin-comparable)[[HashSet](index)[A, H] box] ref

 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/set/#L15)

 
```
new val create()
: HashSet[A, H] val^

```
 #### Returns

 * [HashSet](index)[A, H] val^

 Public Functions
----------------

 ### size

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/set/#L21)

 Return the number of elements in the set.

 
```
fun box size()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### apply

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/set/#L27)

 Return the value if it is in the set, otherwise raise an error.

 
```
fun box apply(
  value: val->A)
: val->A ?

```
 #### Parameters

 * value: val->A

 #### Returns

 * val->A ?

 ### contains

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/set/#L33)

 Check whether the set contains the value.

 
```
fun box contains(
  value: val->A)
: Bool val

```
 #### Parameters

 * value: val->A

 #### Returns

 * [Bool](builtin-bool) val

 ### add

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/set/#L39)

 Return a set with the value added.

 
```
fun val add(
  value: val->A)
: HashSet[A, H] val

```
 #### Parameters

 * value: val->A

 #### Returns

 * [HashSet](index)[A, H] val

 ### sub

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/set/#L45)

 Return a set with the value removed.

 
```
fun val sub(
  value: val->A)
: HashSet[A, H] val

```
 #### Parameters

 * value: val->A

 #### Returns

 * [HashSet](index)[A, H] val

 ### op\_or

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/set/#L51)

 Return a set with the elements of both this and that.

 
```
fun val op_or(
  that: (HashSet[A, H] val | Iterator[A] ref))
: HashSet[A, H] val

```
 #### Parameters

 * that: ([HashSet](index)[A, H] val | [Iterator](builtin-iterator)[A] ref)

 #### Returns

 * [HashSet](index)[A, H] val

 ### op\_and

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/set/#L66)

 Return a set with the elements that are in both this and that.

 
```
fun val op_and(
  that: (HashSet[A, H] val | Iterator[A] ref))
: HashSet[A, H] val

```
 #### Parameters

 * that: ([HashSet](index)[A, H] val | [Iterator](builtin-iterator)[A] ref)

 #### Returns

 * [HashSet](index)[A, H] val

 ### op\_xor

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/set/#L83)

 Return a set with elements that are in either this or that, but not both.

 
```
fun val op_xor(
  that: (HashSet[A, H] val | Iterator[A] ref))
: HashSet[A, H] val

```
 #### Parameters

 * that: ([HashSet](index)[A, H] val | [Iterator](builtin-iterator)[A] ref)

 #### Returns

 * [HashSet](index)[A, H] val

 ### without

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/set/#L102)

 Return a set with the elements of this that are not in that.

 
```
fun val without(
  that: (HashSet[A, H] val | Iterator[A] ref))
: HashSet[A, H] val

```
 #### Parameters

 * that: ([HashSet](index)[A, H] val | [Iterator](builtin-iterator)[A] ref)

 #### Returns

 * [HashSet](index)[A, H] val

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/set/#L119)

 Return true if this and that contain the same elements.

 
```
fun box eq(
  that: HashSet[A, H] box)
: Bool val

```
 #### Parameters

 * that: [HashSet](index)[A, H] box

 #### Returns

 * [Bool](builtin-bool) val

 ### lt

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/set/#L125)

 Return true if every element in this is also in that, and this has fewer elements than that.

 
```
fun box lt(
  that: HashSet[A, H] box)
: Bool val

```
 #### Parameters

 * that: [HashSet](index)[A, H] box

 #### Returns

 * [Bool](builtin-bool) val

 ### le

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/set/#L132)

 Return true if every element in this is also in that.

 
```
fun box le(
  that: HashSet[A, H] box)
: Bool val

```
 #### Parameters

 * that: [HashSet](index)[A, H] box

 #### Returns

 * [Bool](builtin-bool) val

 ### gt

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/set/#L141)

 Return true if every element in that is also in this, and this has more elements than that.

 
```
fun box gt(
  that: HashSet[A, H] box)
: Bool val

```
 #### Parameters

 * that: [HashSet](index)[A, H] box

 #### Returns

 * [Bool](builtin-bool) val

 ### ge

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/set/#L148)

 Return true if every element in that is also in this.

 
```
fun box ge(
  that: HashSet[A, H] box)
: Bool val

```
 #### Parameters

 * that: [HashSet](index)[A, H] box

 #### Returns

 * [Bool](builtin-bool) val

 ### values

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/set/#L154)

 Return an iterator over the values in the set.

 
```
fun box values()
: Iterator[A] ref^

```
 #### Returns

 * [Iterator](builtin-iterator)[A] ref^

 ### compare

 [[Source]](https://stdlib.ponylang.io/src/builtin/compare/#L28)

 
```
fun box compare(
  that: HashSet[A, H] box)
: (Less val | Equal val | Greater val)

```
 #### Parameters

 * that: [HashSet](index)[A, H] box

 #### Returns

 * ([Less](builtin-less) val | [Equal](builtin-equal) val | [Greater](builtin-greater) val)

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/builtin/compare/#L20)

 
```
fun box ne(
  that: HashSet[A, H] box)
: Bool val

```
 #### Parameters

 * that: [HashSet](index)[A, H] box

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/collections-persistent-HashSet>

ArrayKeys[A: A, B: [Array](builtin-array)[A] #read]
===================================================

 [[Source]](https://stdlib.ponylang.io/src/builtin/array/#L936)

 
```
class ref ArrayKeys[A: A, B: Array[A] #read] is
  Iterator[USize val] ref

```
 #### Implements

 * [Iterator](builtin-iterator)[[USize](builtin-usize) val] ref

 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/builtin/array/#L940)

 
```
new ref create(
  array: B)
: ArrayKeys[A, B] ref^

```
 #### Parameters

 * array: B

 #### Returns

 * [ArrayKeys](index)[A, B] ref^

 Public Functions
----------------

 ### has\_next

 [[Source]](https://stdlib.ponylang.io/src/builtin/array/#L944)

 
```
fun box has_next()
: Bool val

```
 #### Returns

 * [Bool](builtin-bool) val

 ### next

 [[Source]](https://stdlib.ponylang.io/src/builtin/array/#L947)

 
```
fun ref next()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/builtin-ArrayKeys>

MapPairs[K: [Any](builtin-any) #share, V: [Any](builtin-any) #share, H: [HashFunction](collections-hashfunction)[K] val]
========================================================================================================================

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/map/#L157)

 
```
class ref MapPairs[K: Any #share, V: Any #share, H: HashFunction[K] val]

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/map/#L160)

 
```
new ref create(
  m: HashMap[K, V, H] val)
: MapPairs[K, V, H] ref^

```
 #### Parameters

 * m: [HashMap](collections-persistent-hashmap)[K, V, H] val

 #### Returns

 * [MapPairs](index)[K, V, H] ref^

 Public Functions
----------------

 ### has\_next

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/map/#L163)

 
```
fun box has_next()
: Bool val

```
 #### Returns

 * [Bool](builtin-bool) val

 ### next

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/map/#L166)

 
```
fun ref next()
: (K , V) ?

```
 #### Returns

 * (K , V) ?



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/collections-persistent-MapPairs>

List[A: A]
==========

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/list/#L1)

 A persistent list with functional transformations.

 Usage
-----

 
```
use "collections/persistent"

actor Main
  new create(env: Env) =>
    try
      let l1 = Lists[U32]([2; 4; 6; 8]) // List(2, 4, 6, 8)

      let empty = Lists[U32].empty() // List()

      // prepend() returns a new List, leaving the
      // old list unchanged
      let l2 = empty.prepend(3) // List(3)
      let l3 = l2.prepend(2) // List(2, 3)
      let l4 = l3.prepend(1) // List(1, 2, 3)
      let l4_head = l4.head() // 1
      let l4_tail = l4.tail() // List(2, 3)

      l4_head == 1
      Lists[U32].eq(l4, Lists[U32]([1; 2; 3]))?
      Lists[U32].eq(l4_tail, Lists[U32]([2; 3]))?

      let doubled = l4.map[U32]({(x) => x * 2 })

      Lists[U32].eq(doubled, Lists[U32]([2; 4; 6]))?
    end

```
 
```
type List[A: A] is
  (Cons[A] val | Nil[A] val)

```
 #### Type Alias For

 * ([Cons](collections-persistent-cons)[A] val | [Nil](collections-persistent-nil)[A] val)



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/collections-persistent-List>

Lists[A: A]
===========

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/list/#L36)

 A primitive containing helper functions for constructing and testing Lists.

 
```
primitive val Lists[A: A]

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/list/#L36)

 
```
new val create()
: Lists[A] val^

```
 #### Returns

 * [Lists](index)[A] val^

 Public Functions
----------------

 ### empty

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/list/#L42)

 Returns an empty list.

 
```
fun box empty()
: (Cons[A] val | Nil[A] val)

```
 #### Returns

 * ([Cons](collections-persistent-cons)[A] val | [Nil](collections-persistent-nil)[A] val)

 ### cons

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/list/#L48)

 Returns a list that has h as a head and t as a tail.

 
```
fun box cons(
  h: val->A,
  t: (Cons[A] val | Nil[A] val))
: (Cons[A] val | Nil[A] val)

```
 #### Parameters

 * h: val->A
* t: ([Cons](collections-persistent-cons)[A] val | [Nil](collections-persistent-nil)[A] val)

 #### Returns

 * ([Cons](collections-persistent-cons)[A] val | [Nil](collections-persistent-nil)[A] val)

 ### apply

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/list/#L54)

 Builds a new list from an Array

 
```
fun box apply(
  arr: Array[val->A] ref)
: (Cons[A] val | Nil[A] val)

```
 #### Parameters

 * arr: [Array](builtin-array)[val->A] ref

 #### Returns

 * ([Cons](collections-persistent-cons)[A] val | [Nil](collections-persistent-nil)[A] val)

 ### from

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/list/#L60)

 Builds a new list from an iterator

 
```
fun box from(
  iter: Iterator[val->A] ref)
: (Cons[A] val | Nil[A] val)

```
 #### Parameters

 * iter: [Iterator](builtin-iterator)[val->A] ref

 #### Returns

 * ([Cons](collections-persistent-cons)[A] val | [Nil](collections-persistent-nil)[A] val)

 ### eq[optional T: [Equatable](builtin-equatable)[T] val]

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/list/#L71)

 Checks whether two lists are equal.

 
```
fun box eq[optional T: Equatable[T] val](
  l1: (Cons[T] val | Nil[T] val),
  l2: (Cons[T] val | Nil[T] val))
: Bool val ?

```
 #### Parameters

 * l1: ([Cons](collections-persistent-cons)[T] val | [Nil](collections-persistent-nil)[T] val)
* l2: ([Cons](collections-persistent-cons)[T] val | [Nil](collections-persistent-nil)[T] val)

 #### Returns

 * [Bool](builtin-bool) val ?

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/list/#L42)

 
```
fun box ne(
  that: Lists[A] val)
: Bool val

```
 #### Parameters

 * that: [Lists](index)[A] val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/collections-persistent-Lists>

MapKeys[K: [Any](builtin-any) #share, V: [Any](builtin-any) #share, H: [HashFunction](collections-hashfunction)[K] val]
=======================================================================================================================

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/map/#L136)

 
```
class ref MapKeys[K: Any #share, V: Any #share, H: HashFunction[K] val]

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/map/#L139)

 
```
new ref create(
  m: HashMap[K, V, H] val)
: MapKeys[K, V, H] ref^

```
 #### Parameters

 * m: [HashMap](collections-persistent-hashmap)[K, V, H] val

 #### Returns

 * [MapKeys](index)[K, V, H] ref^

 Public Functions
----------------

 ### has\_next

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/map/#L141)

 
```
fun box has_next()
: Bool val

```
 #### Returns

 * [Bool](builtin-bool) val

 ### next

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/map/#L143)

 
```
fun ref next()
: K ?

```
 #### Returns

 * K ?



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/collections-persistent-MapKeys>

Nil[A: A]
=========

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/list/#L87)

 The empty list of As.

 
```
primitive val Nil[A: A] is
  ReadSeq[val->A] box

```
 #### Implements

 * [ReadSeq](builtin-readseq)[val->A] box

 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/list/#L87)

 
```
new val create()
: Nil[A] val^

```
 #### Returns

 * [Nil](index)[A] val^

 Public Functions
----------------

 ### size

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/list/#L92)

 Returns the size of the list.

 
```
fun box size()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### apply

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/list/#L98)

 Returns the i-th element of the sequence. For the empty list this call will always error because any index will be out of bounds.

 
```
fun box apply(
  i: USize val)
: val->A ?

```
 #### Parameters

 * i: [USize](builtin-usize) val

 #### Returns

 * val->A ?

 ### values

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/list/#L105)

 Returns an empty iterator over the elements of the empty list.

 
```
fun box values()
: Iterator[val->A] ref^

```
 #### Returns

 * [Iterator](builtin-iterator)[val->A] ref^

 ### is\_empty

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/list/#L114)

 Returns a Bool indicating if the list is empty.

 
```
fun box is_empty()
: Bool val

```
 #### Returns

 * [Bool](builtin-bool) val

 ### is\_non\_empty

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/list/#L120)

 Returns a Bool indicating if the list is non-empty.

 
```
fun box is_non_empty()
: Bool val

```
 #### Returns

 * [Bool](builtin-bool) val

 ### head

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/list/#L126)

 Returns an error, since Nil has no head.

 
```
fun box head()
: val->A ?

```
 #### Returns

 * val->A ?

 ### tail

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/list/#L132)

 Returns an error, since Nil has no tail.

 
```
fun box tail()
: (Cons[A] val | Nil[A] val) ?

```
 #### Returns

 * ([Cons](collections-persistent-cons)[A] val | [Nil](index)[A] val) ?

 ### reverse

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/list/#L138)

 The reverse of the empty list is the empty list.

 
```
fun box reverse()
: Nil[A] val

```
 #### Returns

 * [Nil](index)[A] val

 ### prepend

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/list/#L144)

 Builds a new list with an element added to the front of this list.

 
```
fun box prepend(
  a: val->A!)
: Cons[A] val

```
 #### Parameters

 * a: val->A!

 #### Returns

 * [Cons](collections-persistent-cons)[A] val

 ### concat

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/list/#L150)

 The concatenation of any list l with the empty list is l.

 
```
fun box concat(
  l: (Cons[A] val | Nil[A] val))
: (Cons[A] val | Nil[A] val)

```
 #### Parameters

 * l: ([Cons](collections-persistent-cons)[A] val | [Nil](index)[A] val)

 #### Returns

 * ([Cons](collections-persistent-cons)[A] val | [Nil](index)[A] val)

 ### map[B: B]

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/list/#L156)

 Mapping a function from A to B over the empty list yields the empty list of Bs.

 
```
fun box map[B: B](
  f: {(val->A): val->B}[A, B] box)
: Nil[B] val

```
 #### Parameters

 * f: {(val->A): val->B}[A, B] box

 #### Returns

 * [Nil](index)[B] val

 ### flat\_map[B: B]

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/list/#L163)

 Flatmapping a function from A to B over the empty list yields the empty list of Bs.

 
```
fun box flat_map[B: B](
  f: {(val->A): List[B]}[A, B] box)
: Nil[B] val

```
 #### Parameters

 * f: {(val->A): List[B]}[A, B] box

 #### Returns

 * [Nil](index)[B] val

 ### for\_each

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/list/#L170)

 Applying a function to every member of the empty list is a no-op.

 
```
fun box for_each(
  f: {(val->A)}[A] box)
: None val

```
 #### Parameters

 * f: {(val->A)}[A] box

 #### Returns

 * [None](builtin-none) val

 ### filter

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/list/#L176)

 Filtering the empty list yields the empty list.

 
```
fun box filter(
  f: {(val->A): Bool}[A] box)
: Nil[A] val

```
 #### Parameters

 * f: {(val->A): Bool}[A] box

 #### Returns

 * [Nil](index)[A] val

 ### fold[B: B]

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/list/#L182)

 Folding over the empty list yields the initial accumulator.

 
```
fun box fold[B: B](
  f: {(B, val->A): B^}[A, B] box,
  acc: B)
: B

```
 #### Parameters

 * f: {(B, val->A): B^}[A, B] box
* acc: B

 #### Returns

 * B

 ### every

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/list/#L188)

 Any predicate is true of every member of the empty list.

 
```
fun box every(
  f: {(val->A): Bool}[A] box)
: Bool val

```
 #### Parameters

 * f: {(val->A): Bool}[A] box

 #### Returns

 * [Bool](builtin-bool) val

 ### exists

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/list/#L194)

 For any predicate, there is no element that satisfies it in the empty list.

 
```
fun box exists(
  f: {(val->A): Bool}[A] box)
: Bool val

```
 #### Parameters

 * f: {(val->A): Bool}[A] box

 #### Returns

 * [Bool](builtin-bool) val

 ### partition

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/list/#L201)

 The only partition of the empty list is two empty lists.

 
```
fun box partition(
  f: {(val->A): Bool}[A] box)
: (Nil[A] val , Nil[A] val)

```
 #### Parameters

 * f: {(val->A): Bool}[A] box

 #### Returns

 * ([Nil](index)[A] val , [Nil](index)[A] val)

 ### drop

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/list/#L207)

 There are no elements to drop from the empty list.

 
```
fun box drop(
  n: USize val)
: Nil[A] val

```
 #### Parameters

 * n: [USize](builtin-usize) val

 #### Returns

 * [Nil](index)[A] val

 ### drop\_while

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/list/#L213)

 There are no elements to drop from the empty list.

 
```
fun box drop_while(
  f: {(val->A): Bool}[A] box)
: Nil[A] val

```
 #### Parameters

 * f: {(val->A): Bool}[A] box

 #### Returns

 * [Nil](index)[A] val

 ### take

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/list/#L219)

 There are no elements to take from the empty list.

 
```
fun box take(
  n: USize val)
: Nil[A] val

```
 #### Parameters

 * n: [USize](builtin-usize) val

 #### Returns

 * [Nil](index)[A] val

 ### take\_while

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/list/#L225)

 There are no elements to take from the empty list.

 
```
fun box take_while(
  f: {(val->A): Bool}[A] box)
: Nil[A] val

```
 #### Parameters

 * f: {(val->A): Bool}[A] box

 #### Returns

 * [Nil](index)[A] val

 ### contains[optional T: (A & [HasEq](builtin-haseq)[A!] #read)]

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/list/#L231)

 
```
fun val contains[optional T: (A & HasEq[A!] #read)](
  a: val->T)
: Bool val

```
 #### Parameters

 * a: val->T

 #### Returns

 * [Bool](builtin-bool) val

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/list/#L92)

 
```
fun box eq(
  that: Nil[A] val)
: Bool val

```
 #### Parameters

 * that: [Nil](index)[A] val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/list/#L92)

 
```
fun box ne(
  that: Nil[A] val)
: Bool val

```
 #### Parameters

 * that: [Nil](index)[A] val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/collections-persistent-Nil>

BackpressureAuth
================

 [[Source]](https://stdlib.ponylang.io/src/backpressure/backpressure/#L93)

 
```
type BackpressureAuth is
  (AmbientAuth val | ApplyReleaseBackpressureAuth val)

```
 #### Type Alias For

 * ([AmbientAuth](builtin-ambientauth) val | [ApplyReleaseBackpressureAuth](backpressure-applyreleasebackpressureauth) val)



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/backpressure-BackpressureAuth>

CollisionHash
=============

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/_test/#L341)

 
```
primitive val CollisionHash is
  HashFunction[U64 val] val

```
 #### Implements

 * [HashFunction](collections-hashfunction)[[U64](builtin-u64) val] val

 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/_test/#L341)

 
```
new val create()
: CollisionHash val^

```
 #### Returns

 * [CollisionHash](index) val^

 Public Functions
----------------

 ### hash

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/_test/#L342)

 
```
fun box hash(
  x: U64 val)
: USize val

```
 #### Parameters

 * x: [U64](builtin-u64) val

 #### Returns

 * [USize](builtin-usize) val

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/_test/#L343)

 
```
fun box eq(
  x: U64 val,
  y: U64 val)
: Bool val

```
 #### Parameters

 * x: [U64](builtin-u64) val
* y: [U64](builtin-u64) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/_test/#L342)

 
```
fun box ne(
  that: CollisionHash val)
: Bool val

```
 #### Parameters

 * that: [CollisionHash](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/collections-persistent-CollisionHash>

EnvVars
=======

 [[Source]](https://stdlib.ponylang.io/src/cli/env_vars/#L3)

 
```
primitive val EnvVars

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/cli/env_vars/#L3)

 
```
new val create()
: EnvVars val^

```
 #### Returns

 * [EnvVars](index) val^

 Public Functions
----------------

 ### apply

 [[Source]](https://stdlib.ponylang.io/src/cli/env_vars/#L4)

 Turns an array of strings that look like environment variables, ie. key=value, into a map of string to string. Can optionally filter for keys matching a 'prefix', and will squash resulting keys to lowercase iff 'squash' is true.

 So: = becomes: {KEY, VALUE} or {key, VALUE}

 
```
fun box apply(
  envs: (Array[String val] box | None val),
  prefix: String val = "",
  squash: Bool val = false)
: HashMap[String val, String val, HashEq[String val] val] val

```
 #### Parameters

 * envs: ([Array](builtin-array)[[String](builtin-string) val] box | [None](builtin-none) val)
* prefix: [String](builtin-string) val = ""
* squash: [Bool](builtin-bool) val = false

 #### Returns

 * [HashMap](collections-hashmap)[[String](builtin-string) val, [String](builtin-string) val, [HashEq](collections-hasheq)[[String](builtin-string) val] val] val

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/cli/env_vars/#L4)

 
```
fun box eq(
  that: EnvVars val)
: Bool val

```
 #### Parameters

 * that: [EnvVars](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/cli/env_vars/#L4)

 
```
fun box ne(
  that: EnvVars val)
: Bool val

```
 #### Parameters

 * that: [EnvVars](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/cli-EnvVars>

Cons[A: A]
==========

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/list/#L234)

 A list with a head and a tail, where the tail can be empty.

 
```
class val Cons[A: A] is
  ReadSeq[val->A] box

```
 #### Implements

 * [ReadSeq](builtin-readseq)[val->A] box

 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/list/#L243)

 
```
new val create(
  a: val->A,
  t: (Cons[A] val | Nil[A] val))
: Cons[A] val^

```
 #### Parameters

 * a: val->A
* t: ([Cons](index)[A] val | [Nil](collections-persistent-nil)[A] val)

 #### Returns

 * [Cons](index)[A] val^

 Public Functions
----------------

 ### size

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/list/#L248)

 Returns the size of the list.

 
```
fun box size()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### apply

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/list/#L254)

 Returns the i-th element of the list. Errors if the index is out of bounds.

 
```
fun box apply(
  i: USize val)
: val->A ?

```
 #### Parameters

 * i: [USize](builtin-usize) val

 #### Returns

 * val->A ?

 ### values

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/list/#L263)

 Returns an iterator over the elements of the list.

 
```
fun box values()
: Iterator[val->A] ref^

```
 #### Returns

 * [Iterator](builtin-iterator)[val->A] ref^

 ### is\_empty

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/list/#L273)

 Returns a Bool indicating if the list is empty.

 
```
fun box is_empty()
: Bool val

```
 #### Returns

 * [Bool](builtin-bool) val

 ### is\_non\_empty

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/list/#L279)

 Returns a Bool indicating if the list is non-empty.

 
```
fun box is_non_empty()
: Bool val

```
 #### Returns

 * [Bool](builtin-bool) val

 ### head

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/list/#L285)

 Returns the head of the list.

 
```
fun box head()
: val->A

```
 #### Returns

 * val->A

 ### tail

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/list/#L291)

 Returns the tail of the list.

 
```
fun box tail()
: (Cons[A] val | Nil[A] val)

```
 #### Returns

 * ([Cons](index)[A] val | [Nil](collections-persistent-nil)[A] val)

 ### reverse

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/list/#L297)

 Builds a new list by reversing the elements in the list.

 
```
fun val reverse()
: (Cons[A] val | Nil[A] val)

```
 #### Returns

 * ([Cons](index)[A] val | [Nil](collections-persistent-nil)[A] val)

 ### prepend

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/list/#L313)

 Builds a new list with an element added to the front of this list.

 
```
fun val prepend(
  a: val->A!)
: Cons[A] val

```
 #### Parameters

 * a: val->A!

 #### Returns

 * [Cons](index)[A] val

 ### concat

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/list/#L319)

 Builds a new list that is the concatenation of this list and the provided list.

 
```
fun val concat(
  l: (Cons[A] val | Nil[A] val))
: (Cons[A] val | Nil[A] val)

```
 #### Parameters

 * l: ([Cons](index)[A] val | [Nil](collections-persistent-nil)[A] val)

 #### Returns

 * ([Cons](index)[A] val | [Nil](collections-persistent-nil)[A] val)

 ### map[B: B]

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/list/#L336)

 Builds a new list by applying a function to every member of the list.

 
```
fun val map[B: B](
  f: {(val->A): val->B}[A, B] box)
: (Cons[B] val | Nil[B] val)

```
 #### Parameters

 * f: {(val->A): val->B}[A, B] box

 #### Returns

 * ([Cons](index)[B] val | [Nil](collections-persistent-nil)[B] val)

 ### flat\_map[B: B]

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/list/#L353)

 Builds a new list by applying a function to every member of the list and using the elements of the resulting lists.

 
```
fun val flat_map[B: B](
  f: {(val->A): List[B]}[A, B] box)
: (Cons[B] val | Nil[B] val)

```
 #### Parameters

 * f: {(val->A): List[B]}[A, B] box

 #### Returns

 * ([Cons](index)[B] val | [Nil](collections-persistent-nil)[B] val)

 ### for\_each

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/list/#L383)

 Applies the supplied function to every element of the list in order.

 
```
fun val for_each(
  f: {(val->A)}[A] box)
: None val

```
 #### Parameters

 * f: {(val->A)}[A] box

 #### Returns

 * [None](builtin-none) val

 ### filter

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/list/#L399)

 Builds a new list with those elements that satisfy a provided predicate.

 
```
fun val filter(
  f: {(val->A): Bool}[A] box)
: (Cons[A] val | Nil[A] val)

```
 #### Parameters

 * f: {(val->A): Bool}[A] box

 #### Returns

 * ([Cons](index)[A] val | [Nil](collections-persistent-nil)[A] val)

 ### fold[B: B]

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/list/#L421)

 Folds the elements of the list using the supplied function.

 
```
fun val fold[B: B](
  f: {(B, val->A): B^}[A, B] box,
  acc: B)
: B

```
 #### Parameters

 * f: {(B, val->A): B^}[A, B] box
* acc: B

 #### Returns

 * B

 ### every

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/list/#L438)

 Returns true if every element satisfies the provided predicate, false otherwise.

 
```
fun val every(
  f: {(val->A): Bool}[A] box)
: Bool val

```
 #### Parameters

 * f: {(val->A): Bool}[A] box

 #### Returns

 * [Bool](builtin-bool) val

 ### exists

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/list/#L462)

 Returns true if at least one element satisfies the provided predicate, false otherwise.

 
```
fun val exists(
  f: {(val->A): Bool}[A] box)
: Bool val

```
 #### Parameters

 * f: {(val->A): Bool}[A] box

 #### Returns

 * [Bool](builtin-bool) val

 ### partition

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/list/#L485)

 Builds a pair of lists, the first of which is made up of the elements satisfying the supplied predicate and the second of which is made up of those that do not.

 
```
fun val partition(
  f: {(val->A): Bool}[A] box)
: ((Cons[A] val | Nil[A] val) , (Cons[A] val | Nil[A] val))

```
 #### Parameters

 * f: {(val->A): Bool}[A] box

 #### Returns

 * (([Cons](index)[A] val | [Nil](collections-persistent-nil)[A] val) , ([Cons](index)[A] val | [Nil](collections-persistent-nil)[A] val))

 ### drop

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/list/#L510)

 Builds a list by dropping the first n elements.

 
```
fun val drop(
  n: USize val)
: (Cons[A] val | Nil[A] val)

```
 #### Parameters

 * n: [USize](builtin-usize) val

 #### Returns

 * ([Cons](index)[A] val | [Nil](collections-persistent-nil)[A] val)

 ### drop\_while

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/list/#L526)

 Builds a list by dropping elements from the front of the list until one fails to satisfy the provided predicate.

 
```
fun val drop_while(
  f: {(val->A): Bool}[A] box)
: (Cons[A] val | Nil[A] val)

```
 #### Parameters

 * f: {(val->A): Bool}[A] box

 #### Returns

 * ([Cons](index)[A] val | [Nil](collections-persistent-nil)[A] val)

 ### take

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/list/#L542)

 Builds a list of the first n elements.

 
```
fun val take(
  n: USize val)
: (Cons[A] val | Nil[A] val)

```
 #### Parameters

 * n: [USize](builtin-usize) val

 #### Returns

 * ([Cons](index)[A] val | [Nil](collections-persistent-nil)[A] val)

 ### take\_while

 [[Source]](https://stdlib.ponylang.io/src/collections-persistent/list/#L562)

 Builds a list of elements satisfying the provided predicate until one does not.

 
```
fun val take_while(
  f: {(val->A): Bool}[A] box)
: (Cons[A] val | Nil[A] val)

```
 #### Parameters

 * f: {(val->A): Bool}[A] box

 #### Returns

 * ([Cons](index)[A] val | [Nil](collections-persistent-nil)[A] val)



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/collections-persistent-Cons>

Fibonacci[optional A: ([Integer](builtin-integer)[A] val & ([U8](builtin-u8) val | [U16](builtin-u16) val | [U32](builtin-u32) val | [U64](builtin-u64) val | [U128](builtin-u128) val | [ULong](builtin-ulong) val | [USize](builtin-usize) val))]
===================================================================================================================================================================================================================================================

 [[Source]](https://stdlib.ponylang.io/src/math/fibonacci/#L15)

 Useful for microbenchmarks to impress your friends. Look y'all, Pony goes fast! We suppose if you are into Agile planning poker that you could also use this in conjunction with `Random` to assign User Story Points.

 
```
class ref Fibonacci[optional A: (Integer[A] val & (U8 val | U16 val | U32 val | 
    U64 val | U128 val | ULong val | 
    USize val))] is
  Iterator[A] ref

```
 #### Implements

 * [Iterator](builtin-iterator)[A] ref

 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/math/fibonacci/#L15)

 
```
new iso create()
: Fibonacci[A] iso^

```
 #### Returns

 * [Fibonacci](index)[A] iso^

 Public Functions
----------------

 ### apply

 [[Source]](https://stdlib.ponylang.io/src/math/fibonacci/#L25)

 
```
fun box apply(
  n: U8 val)
: A

```
 #### Parameters

 * n: [U8](builtin-u8) val

 #### Returns

 * A

 ### has\_next

 [[Source]](https://stdlib.ponylang.io/src/math/fibonacci/#L43)

 
```
fun box has_next()
: Bool val

```
 #### Returns

 * [Bool](builtin-bool) val

 ### next

 [[Source]](https://stdlib.ponylang.io/src/math/fibonacci/#L45)

 
```
fun ref next()
: A

```
 #### Returns

 * A



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/math-Fibonacci>

Backpressure
============

 [[Source]](https://stdlib.ponylang.io/src/backpressure/backpressure/#L95)

 
```
primitive val Backpressure

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/backpressure/backpressure/#L95)

 
```
new val create()
: Backpressure val^

```
 #### Returns

 * [Backpressure](index) val^

 Public Functions
----------------

 ### apply

 [[Source]](https://stdlib.ponylang.io/src/backpressure/backpressure/#L96)

 
```
fun box apply(
  auth: (AmbientAuth val | ApplyReleaseBackpressureAuth val))
: None val

```
 #### Parameters

 * auth: ([AmbientAuth](builtin-ambientauth) val | [ApplyReleaseBackpressureAuth](backpressure-applyreleasebackpressureauth) val)

 #### Returns

 * [None](builtin-none) val

 ### release

 [[Source]](https://stdlib.ponylang.io/src/backpressure/backpressure/#L99)

 
```
fun box release(
  auth: (AmbientAuth val | ApplyReleaseBackpressureAuth val))
: None val

```
 #### Parameters

 * auth: ([AmbientAuth](builtin-ambientauth) val | [ApplyReleaseBackpressureAuth](backpressure-applyreleasebackpressureauth) val)

 #### Returns

 * [None](builtin-none) val

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/backpressure/backpressure/#L96)

 
```
fun box eq(
  that: Backpressure val)
: Bool val

```
 #### Parameters

 * that: [Backpressure](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/backpressure/backpressure/#L96)

 
```
fun box ne(
  that: Backpressure val)
: Bool val

```
 #### Parameters

 * that: [Backpressure](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/backpressure-Backpressure>

ApplyReleaseBackpressureAuth
============================

 [[Source]](https://stdlib.ponylang.io/src/backpressure/auth/#L1)

 
```
primitive val ApplyReleaseBackpressureAuth

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/backpressure/auth/#L2)

 
```
new val create(
  from: AmbientAuth val)
: ApplyReleaseBackpressureAuth val^

```
 #### Parameters

 * from: [AmbientAuth](builtin-ambientauth) val

 #### Returns

 * [ApplyReleaseBackpressureAuth](index) val^

 Public Functions
----------------

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/backpressure/auth/#L2)

 
```
fun box eq(
  that: ApplyReleaseBackpressureAuth val)
: Bool val

```
 #### Parameters

 * that: [ApplyReleaseBackpressureAuth](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/backpressure/auth/#L2)

 
```
fun box ne(
  that: ApplyReleaseBackpressureAuth val)
: Bool val

```
 #### Parameters

 * that: [ApplyReleaseBackpressureAuth](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/backpressure-ApplyReleaseBackpressureAuth>

CommandSpec
===========

 [[Source]](https://stdlib.ponylang.io/src/cli/command_spec/#L9)

 CommandSpec describes the specification of a parent or leaf command. Each command has the following attributes:

 * a name: a simple string token that identifies the command.
* a description: used in the syntax message.
* a map of options: the valid options for this command.
* an optional help option+command name for help parsing
* one of:
* a Map of child commands.
* an Array of arguments.

 
```
class ref CommandSpec

```
 Constructors
------------

 ### parent

 [[Source]](https://stdlib.ponylang.io/src/cli/command_spec/#L33)

 Creates a command spec that can accept options and child commands, but not arguments.

 
```
new ref parent(
  name': String val,
  descr': String val = "",
  options': Array[OptionSpec val] box = call,
  commands': Array[CommandSpec ref] box = call)
: CommandSpec ref^ ?

```
 #### Parameters

 * name': [String](builtin-string) val
* descr': [String](builtin-string) val = ""
* options': [Array](builtin-array)[[OptionSpec](cli-optionspec) val] box = call
* commands': [Array](builtin-array)[[CommandSpec](index) ref] box = call

 #### Returns

 * [CommandSpec](index) ref^ ?

 ### leaf

 [[Source]](https://stdlib.ponylang.io/src/cli/command_spec/#L53)

 Creates a command spec that can accept options and arguments, but not child commands.

 
```
new ref leaf(
  name': String val,
  descr': String val = "",
  options': Array[OptionSpec val] box = call,
  args': Array[ArgSpec val] box = call)
: CommandSpec ref^ ?

```
 #### Parameters

 * name': [String](builtin-string) val
* descr': [String](builtin-string) val = ""
* options': [Array](builtin-array)[[OptionSpec](cli-optionspec) val] box = call
* args': [Array](builtin-array)[[ArgSpec](cli-argspec) val] box = call

 #### Returns

 * [CommandSpec](index) ref^ ?

 Public Functions
----------------

 ### add\_command

 [[Source]](https://stdlib.ponylang.io/src/cli/command_spec/#L84)

 Adds an additional child command to this parent command.

 
```
fun ref add_command(
  cmd: CommandSpec box)
: None val ?

```
 #### Parameters

 * cmd: [CommandSpec](index) box

 #### Returns

 * [None](builtin-none) val ?

 ### add\_help

 [[Source]](https://stdlib.ponylang.io/src/cli/command_spec/#L91)

 Adds a standard help option and, optionally command, to a root command.

 
```
fun ref add_help(
  hname: String val = "help",
  descr': String val = "")
: None val ?

```
 #### Parameters

 * hname: [String](builtin-string) val = "help"
* descr': [String](builtin-string) val = ""

 #### Returns

 * [None](builtin-none) val ?

 ### name

 [[Source]](https://stdlib.ponylang.io/src/cli/command_spec/#L106)

 Returns the name of this command.

 
```
fun box name()
: String val

```
 #### Returns

 * [String](builtin-string) val

 ### descr

 [[Source]](https://stdlib.ponylang.io/src/cli/command_spec/#L112)

 Returns the description for this command.

 
```
fun box descr()
: String val

```
 #### Returns

 * [String](builtin-string) val

 ### options

 [[Source]](https://stdlib.ponylang.io/src/cli/command_spec/#L118)

 Returns a map by name of the named options of this command.

 
```
fun box options()
: HashMap[String val, OptionSpec val, HashEq[String val] val] box

```
 #### Returns

 * [HashMap](collections-hashmap)[[String](builtin-string) val, [OptionSpec](cli-optionspec) val, [HashEq](collections-hasheq)[[String](builtin-string) val] val] box

 ### commands

 [[Source]](https://stdlib.ponylang.io/src/cli/command_spec/#L124)

 Returns a map by name of the child commands of this command.

 
```
fun box commands()
: HashMap[String val, CommandSpec box, HashEq[String val] val] box

```
 #### Returns

 * [HashMap](collections-hashmap)[[String](builtin-string) val, [CommandSpec](index) box, [HashEq](collections-hasheq)[[String](builtin-string) val] val] box

 ### args

 [[Source]](https://stdlib.ponylang.io/src/cli/command_spec/#L130)

 Returns an array of the positional arguments of this command.

 
```
fun box args()
: Array[ArgSpec val] box

```
 #### Returns

 * [Array](builtin-array)[[ArgSpec](cli-argspec) val] box

 ### is\_leaf

 [[Source]](https://stdlib.ponylang.io/src/cli/command_spec/#L136)

 
```
fun box is_leaf()
: Bool val

```
 #### Returns

 * [Bool](builtin-bool) val

 ### is\_parent

 [[Source]](https://stdlib.ponylang.io/src/cli/command_spec/#L138)

 
```
fun box is_parent()
: Bool val

```
 #### Returns

 * [Bool](builtin-bool) val

 ### help\_name

 [[Source]](https://stdlib.ponylang.io/src/cli/command_spec/#L140)

 Returns the name of the help command, which defaults to "help".

 
```
fun box help_name()
: String val

```
 #### Returns

 * [String](builtin-string) val

 ### help\_string

 [[Source]](https://stdlib.ponylang.io/src/cli/command_spec/#L146)

 Returns a formated help string for this command and all of its arguments.

 
```
fun box help_string()
: String val

```
 #### Returns

 * [String](builtin-string) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/cli-CommandSpec>

OptionSpec
==========

 [[Source]](https://stdlib.ponylang.io/src/cli/command_spec/#L159)

 OptionSpec describes the specification of a named Option. They have a name, descr(iption), a short-name, a typ(e), and a default value when they are not required.

 Options can be placed anywhere before or after commands, and can be thought of as named arguments.

 
```
class val OptionSpec

```
 Constructors
------------

 ### bool

 [[Source]](https://stdlib.ponylang.io/src/cli/command_spec/#L183)

 Creates an Option with a Bool typed value that can be used like `--opt` or `-O` or `--opt=true` or `-O=true` to yield an option value like `cmd.option("opt").bool() == true`.

 
```
new val bool(
  name': String val,
  descr': String val = "",
  short': (U8 val | None val) = reference,
  default': (Bool val | None val) = reference)
: OptionSpec val^

```
 #### Parameters

 * name': [String](builtin-string) val
* descr': [String](builtin-string) val = ""
* short': ([U8](builtin-u8) val | [None](builtin-none) val) = reference
* default': ([Bool](builtin-bool) val | [None](builtin-none) val) = reference

 #### Returns

 * [OptionSpec](index) val^

 ### string

 [[Source]](https://stdlib.ponylang.io/src/cli/command_spec/#L200)

 Creates an Option with a String typed value that can be used like `--file=dir/filename` or `-F=dir/filename` or `-Fdir/filename` to yield an option value like `cmd.option("file").string() == "dir/filename"`.

 
```
new val string(
  name': String val,
  descr': String val = "",
  short': (U8 val | None val) = reference,
  default': (String val | None val) = reference)
: OptionSpec val^

```
 #### Parameters

 * name': [String](builtin-string) val
* descr': [String](builtin-string) val = ""
* short': ([U8](builtin-u8) val | [None](builtin-none) val) = reference
* default': ([String](builtin-string) val | [None](builtin-none) val) = reference

 #### Returns

 * [OptionSpec](index) val^

 ### i64

 [[Source]](https://stdlib.ponylang.io/src/cli/command_spec/#L217)

 Creates an Option with an I64 typed value that can be used like `--count=42 -C=42` to yield an option value like `cmd.option("count").i64() == I64(42)`.

 
```
new val i64(
  name': String val,
  descr': String val = "",
  short': (U8 val | None val) = reference,
  default': (I64 val | None val) = reference)
: OptionSpec val^

```
 #### Parameters

 * name': [String](builtin-string) val
* descr': [String](builtin-string) val = ""
* short': ([U8](builtin-u8) val | [None](builtin-none) val) = reference
* default': ([I64](builtin-i64) val | [None](builtin-none) val) = reference

 #### Returns

 * [OptionSpec](index) val^

 ### u64

 [[Source]](https://stdlib.ponylang.io/src/cli/command_spec/#L233)

 Creates an Option with an U64 typed value that can be used like `--count=47 -C=47` to yield an option value like `cmd.option("count").u64() == U64(47)`.

 
```
new val u64(
  name': String val,
  descr': String val = "",
  short': (U8 val | None val) = reference,
  default': (U64 val | None val) = reference)
: OptionSpec val^

```
 #### Parameters

 * name': [String](builtin-string) val
* descr': [String](builtin-string) val = ""
* short': ([U8](builtin-u8) val | [None](builtin-none) val) = reference
* default': ([U64](builtin-u64) val | [None](builtin-none) val) = reference

 #### Returns

 * [OptionSpec](index) val^

 ### f64

 [[Source]](https://stdlib.ponylang.io/src/cli/command_spec/#L249)

 Creates an Option with a F64 typed value that can be used like `--ratio=1.039` or `-R=1.039` to yield an option value like `cmd.option("ratio").f64() == F64(1.039)`.

 
```
new val f64(
  name': String val,
  descr': String val = "",
  short': (U8 val | None val) = reference,
  default': (F64 val | None val) = reference)
: OptionSpec val^

```
 #### Parameters

 * name': [String](builtin-string) val
* descr': [String](builtin-string) val = ""
* short': ([U8](builtin-u8) val | [None](builtin-none) val) = reference
* default': ([F64](builtin-f64) val | [None](builtin-none) val) = reference

 #### Returns

 * [OptionSpec](index) val^

 ### string\_seq

 [[Source]](https://stdlib.ponylang.io/src/cli/command_spec/#L265)

 Creates an Option with a ReadSeq[String] typed value that can be used like `--files=file1 --files=files2 --files=files2` to yield a sequence of three strings equivalent to `cmd.option("ratio").string_seq() (equiv) ["file1"; "file2"; "file3"]`.

 
```
new val string_seq(
  name': String val,
  descr': String val = "",
  short': (U8 val | None val) = reference)
: OptionSpec val^

```
 #### Parameters

 * name': [String](builtin-string) val
* descr': [String](builtin-string) val = ""
* short': ([U8](builtin-u8) val | [None](builtin-none) val) = reference

 #### Returns

 * [OptionSpec](index) val^

 Public Functions
----------------

 ### name

 [[Source]](https://stdlib.ponylang.io/src/cli/command_spec/#L281)

 Returns the name of this option.

 
```
fun box name()
: String val

```
 #### Returns

 * [String](builtin-string) val

 ### descr

 [[Source]](https://stdlib.ponylang.io/src/cli/command_spec/#L287)

 Returns the description for this option.

 
```
fun box descr()
: String val

```
 #### Returns

 * [String](builtin-string) val

 ### required

 [[Source]](https://stdlib.ponylang.io/src/cli/command_spec/#L297)

 Returns true iff this option is required to be present in the command line.

 
```
fun box required()
: Bool val

```
 #### Returns

 * [Bool](builtin-bool) val

 ### help\_string

 [[Source]](https://stdlib.ponylang.io/src/cli/command_spec/#L326)

 Returns a formated help string for this option.

 
```
fun box help_string()
: String val

```
 #### Returns

 * [String](builtin-string) val

 ### deb\_string

 [[Source]](https://stdlib.ponylang.io/src/cli/command_spec/#L339)

 
```
fun box deb_string()
: String val

```
 #### Returns

 * [String](builtin-string) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/cli-OptionSpec>

Option
======

 [[Source]](https://stdlib.ponylang.io/src/cli/command/#L63)

 Option contains a spec and an effective value for a given option.

 
```
class val Option

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/cli/command/#L70)

 
```
new val create(
  spec': OptionSpec val,
  value': (Bool val | String val | I64 val | 
    U64 val | F64 val | _StringSeq val))
: Option val^

```
 #### Parameters

 * spec': [OptionSpec](cli-optionspec) val
* value': ([Bool](builtin-bool) val | [String](builtin-string) val | [I64](builtin-i64) val | [U64](builtin-u64) val | [F64](builtin-f64) val | \_StringSeq val)

 #### Returns

 * [Option](index) val^

 Public Functions
----------------

 ### spec

 [[Source]](https://stdlib.ponylang.io/src/cli/command/#L77)

 
```
fun box spec()
: OptionSpec val

```
 #### Returns

 * [OptionSpec](cli-optionspec) val

 ### bool

 [[Source]](https://stdlib.ponylang.io/src/cli/command/#L79)

 Returns the option value as a Bool, defaulting to false.

 
```
fun box bool()
: Bool val

```
 #### Returns

 * [Bool](builtin-bool) val

 ### string

 [[Source]](https://stdlib.ponylang.io/src/cli/command/#L85)

 Returns the option value as a String, defaulting to empty.

 
```
fun box string()
: String val

```
 #### Returns

 * [String](builtin-string) val

 ### i64

 [[Source]](https://stdlib.ponylang.io/src/cli/command/#L91)

 Returns the option value as an I64, defaulting to 0.

 
```
fun box i64()
: I64 val

```
 #### Returns

 * [I64](builtin-i64) val

 ### u64

 [[Source]](https://stdlib.ponylang.io/src/cli/command/#L97)

 Returns the option value as an U64, defaulting to 0.

 
```
fun box u64()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### f64

 [[Source]](https://stdlib.ponylang.io/src/cli/command/#L103)

 Returns the option value as an F64, defaulting to 0.0.

 
```
fun box f64()
: F64 val

```
 #### Returns

 * [F64](builtin-f64) val

 ### string\_seq

 [[Source]](https://stdlib.ponylang.io/src/cli/command/#L109)

 Returns the option value as a ReadSeq[String], defaulting to empty.

 
```
fun box string_seq()
: ReadSeq[String val] val

```
 #### Returns

 * [ReadSeq](builtin-readseq)[[String](builtin-string) val] val

 ### deb\_string

 [[Source]](https://stdlib.ponylang.io/src/cli/command/#L119)

 
```
fun box deb_string()
: String val

```
 #### Returns

 * [String](builtin-string) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/cli-Option>

Help
====

 [[Source]](https://stdlib.ponylang.io/src/cli/command_help/#L3)

 
```
primitive val Help

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/cli/command_help/#L3)

 
```
new val create()
: Help val^

```
 #### Returns

 * [Help](index) val^

 Public Functions
----------------

 ### general

 [[Source]](https://stdlib.ponylang.io/src/cli/command_help/#L4)

 Creates a command help that can print a general program help message.

 
```
fun box general(
  cs: CommandSpec box)
: CommandHelp box

```
 #### Parameters

 * cs: [CommandSpec](cli-commandspec) box

 #### Returns

 * [CommandHelp](cli-commandhelp) box

 ### for\_command

 [[Source]](https://stdlib.ponylang.io/src/cli/command_help/#L10)

 Creates a command help for a specific command that can print a detailed help message.

 
```
fun box for_command(
  cs: CommandSpec box,
  argv: Array[String val] box)
: (CommandHelp box | SyntaxError val)

```
 #### Parameters

 * cs: [CommandSpec](cli-commandspec) box
* argv: [Array](builtin-array)[[String](builtin-string) val] box

 #### Returns

 * ([CommandHelp](cli-commandhelp) box | [SyntaxError](cli-syntaxerror) val)

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/cli/command_help/#L4)

 
```
fun box eq(
  that: Help val)
: Bool val

```
 #### Parameters

 * that: [Help](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/cli/command_help/#L4)

 
```
fun box ne(
  that: Help val)
: Bool val

```
 #### Parameters

 * that: [Help](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/cli-Help>

Command
=======

 [[Source]](https://stdlib.ponylang.io/src/cli/command/#L3)

 Command contains all of the information describing a command with its spec and effective options and arguments, ready to use.

 
```
class box Command

```
 Public Functions
----------------

 ### string

 [[Source]](https://stdlib.ponylang.io/src/cli/command/#L24)

 Returns a representational string for this command.

 
```
fun box string()
: String iso^

```
 #### Returns

 * [String](builtin-string) iso^

 ### spec

 [[Source]](https://stdlib.ponylang.io/src/cli/command/#L39)

 Returns the spec for this command.

 
```
fun box spec()
: CommandSpec box

```
 #### Returns

 * [CommandSpec](cli-commandspec) box

 ### fullname

 [[Source]](https://stdlib.ponylang.io/src/cli/command/#L45)

 Returns the full name of this command, with its parents prefixed.

 
```
fun box fullname()
: String val

```
 #### Returns

 * [String](builtin-string) val

 ### option

 [[Source]](https://stdlib.ponylang.io/src/cli/command/#L51)

 Returns the Option by name, defaulting to a fake Option if unknown.

 
```
fun box option(
  name: String val)
: Option val

```
 #### Parameters

 * name: [String](builtin-string) val

 #### Returns

 * [Option](cli-option) val

 ### arg

 [[Source]](https://stdlib.ponylang.io/src/cli/command/#L57)

 Returns the Arg by name, defaulting to a fake Arg if unknown.

 
```
fun box arg(
  name: String val)
: Arg val

```
 #### Parameters

 * name: [String](builtin-string) val

 #### Returns

 * [Arg](cli-arg) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/cli-Command>

ArgSpec
=======

 [[Source]](https://stdlib.ponylang.io/src/cli/command_spec/#L343)

 ArgSpec describes the specification of a positional Arg(ument). They have a name, descr(iption), a typ(e), and a default value when they are not required.

 Args always come after a leaf command, and are assigned in their positional order.

 
```
class val ArgSpec

```
 Constructors
------------

 ### bool

 [[Source]](https://stdlib.ponylang.io/src/cli/command_spec/#L366)

 Creates an Arg with a Bool typed value that can be used like `<cmd> true` to yield an arg value like `cmd.arg("opt").bool() == true`.

 
```
new val bool(
  name': String val,
  descr': String val = "",
  default': (Bool val | None val) = reference)
: ArgSpec val^

```
 #### Parameters

 * name': [String](builtin-string) val
* descr': [String](builtin-string) val = ""
* default': ([Bool](builtin-bool) val | [None](builtin-none) val) = reference

 #### Returns

 * [ArgSpec](index) val^

 ### string

 [[Source]](https://stdlib.ponylang.io/src/cli/command_spec/#L381)

 Creates an Arg with a String typed value that can be used like `<cmd> filename` to yield an arg value `cmd.arg("file").string() == "filename"`.

 
```
new val string(
  name': String val,
  descr': String val = "",
  default': (String val | None val) = reference)
: ArgSpec val^

```
 #### Parameters

 * name': [String](builtin-string) val
* descr': [String](builtin-string) val = ""
* default': ([String](builtin-string) val | [None](builtin-none) val) = reference

 #### Returns

 * [ArgSpec](index) val^

 ### i64

 [[Source]](https://stdlib.ponylang.io/src/cli/command_spec/#L396)

 Creates an Arg with an I64 typed value that can be used like `<cmd> 42` to yield an arg value like `cmd.arg("count").i64() == I64(42)`.

 
```
new val i64(
  name': String val,
  descr': String val = "",
  default': (I64 val | None val) = reference)
: ArgSpec val^

```
 #### Parameters

 * name': [String](builtin-string) val
* descr': [String](builtin-string) val = ""
* default': ([I64](builtin-i64) val | [None](builtin-none) val) = reference

 #### Returns

 * [ArgSpec](index) val^

 ### u64

 [[Source]](https://stdlib.ponylang.io/src/cli/command_spec/#L410)

 Creates an Arg with an U64 typed value that can be used like `<cmd> 47` to yield an arg value like `cmd.arg("count").u64() == U64(47)`.

 
```
new val u64(
  name': String val,
  descr': String val = "",
  default': (U64 val | None val) = reference)
: ArgSpec val^

```
 #### Parameters

 * name': [String](builtin-string) val
* descr': [String](builtin-string) val = ""
* default': ([U64](builtin-u64) val | [None](builtin-none) val) = reference

 #### Returns

 * [ArgSpec](index) val^

 ### f64

 [[Source]](https://stdlib.ponylang.io/src/cli/command_spec/#L424)

 Creates an Arg with a F64 typed value that can be used like `<cmd> 1.039` to yield an arg value like `cmd.arg("ratio").f64() == F64(1.039)`.

 
```
new val f64(
  name': String val,
  descr': String val = "",
  default': (F64 val | None val) = reference)
: ArgSpec val^

```
 #### Parameters

 * name': [String](builtin-string) val
* descr': [String](builtin-string) val = ""
* default': ([F64](builtin-f64) val | [None](builtin-none) val) = reference

 #### Returns

 * [ArgSpec](index) val^

 ### string\_seq

 [[Source]](https://stdlib.ponylang.io/src/cli/command_spec/#L438)

 Creates an Arg with a ReadSeq[String] typed value that can be used like `<cmd> file1 file2 file3` to yield a sequence of three strings equivalent to `cmd.arg("file").string_seq() (equiv) ["file1"; "file2"; "file3"]`.

 
```
new val string_seq(
  name': String val,
  descr': String val = "")
: ArgSpec val^

```
 #### Parameters

 * name': [String](builtin-string) val
* descr': [String](builtin-string) val = ""

 #### Returns

 * [ArgSpec](index) val^

 Public Functions
----------------

 ### name

 [[Source]](https://stdlib.ponylang.io/src/cli/command_spec/#L452)

 Returns the name of this arg.

 
```
fun box name()
: String val

```
 #### Returns

 * [String](builtin-string) val

 ### descr

 [[Source]](https://stdlib.ponylang.io/src/cli/command_spec/#L458)

 Returns the description for this arg.

 
```
fun box descr()
: String val

```
 #### Returns

 * [String](builtin-string) val

 ### required

 [[Source]](https://stdlib.ponylang.io/src/cli/command_spec/#L468)

 Returns true iff this arg is required to be present in the command line.

 
```
fun box required()
: Bool val

```
 #### Returns

 * [Bool](builtin-bool) val

 ### help\_string

 [[Source]](https://stdlib.ponylang.io/src/cli/command_spec/#L474)

 Returns a formated help string for this arg.

 
```
fun box help_string()
: String val

```
 #### Returns

 * [String](builtin-string) val

 ### deb\_string

 [[Source]](https://stdlib.ponylang.io/src/cli/command_spec/#L480)

 
```
fun box deb_string()
: String val

```
 #### Returns

 * [String](builtin-string) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/cli-ArgSpec>

CommandParser
=============

 [[Source]](https://stdlib.ponylang.io/src/cli/command_parser/#L3)

 
```
class ref CommandParser

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/cli/command_parser/#L7)

 Creates a new parser for a given command spec.

 
```
new box create(
  spec': CommandSpec box)
: CommandParser box^

```
 #### Parameters

 * spec': [CommandSpec](cli-commandspec) box

 #### Returns

 * [CommandParser](index) box^

 Public Functions
----------------

 ### parse

 [[Source]](https://stdlib.ponylang.io/src/cli/command_parser/#L18)

 Parses all of the command line tokens and env vars and returns a Command, or the first SyntaxError.

 
```
fun box parse(
  argv: Array[String val] box,
  envs: (Array[String val] box | None val) = reference)
: (Command box | CommandHelp box | SyntaxError val)

```
 #### Parameters

 * argv: [Array](builtin-array)[[String](builtin-string) val] box
* envs: ([Array](builtin-array)[[String](builtin-string) val] box | [None](builtin-none) val) = reference

 #### Returns

 * ([Command](cli-command) box | [CommandHelp](cli-commandhelp) box | [SyntaxError](cli-syntaxerror) val)



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/cli-CommandParser>

SyntaxError
===========

 [[Source]](https://stdlib.ponylang.io/src/cli/command/#L181)

 SyntaxError summarizes a syntax error in a given parsed command line.

 
```
class val SyntaxError

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/cli/command/#L188)

 
```
new val create(
  token': String val,
  msg': String val)
: SyntaxError val^

```
 #### Parameters

 * token': [String](builtin-string) val
* msg': [String](builtin-string) val

 #### Returns

 * [SyntaxError](index) val^

 Public Functions
----------------

 ### token

 [[Source]](https://stdlib.ponylang.io/src/cli/command/#L192)

 
```
fun box token()
: String val

```
 #### Returns

 * [String](builtin-string) val

 ### string

 [[Source]](https://stdlib.ponylang.io/src/cli/command/#L194)

 
```
fun box string()
: String val

```
 #### Returns

 * [String](builtin-string) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/cli-SyntaxError>

CommandHelp
===========

 [[Source]](https://stdlib.ponylang.io/src/cli/command_help/#L37)

 CommandHelp encapsulates the information needed to generate a user help message for a given CommandSpec, optionally with a specific command identified to print help about. Use `Help.general()` or `Help.for_command()` to create a CommandHelp instance.

 
```
class box CommandHelp

```
 Public Functions
----------------

 ### fullname

 [[Source]](https://stdlib.ponylang.io/src/cli/command_help/#L51)

 
```
fun box fullname()
: String val

```
 #### Returns

 * [String](builtin-string) val

 ### string

 [[Source]](https://stdlib.ponylang.io/src/cli/command_help/#L58)

 
```
fun box string()
: String val

```
 #### Returns

 * [String](builtin-string) val

 ### help\_string

 [[Source]](https://stdlib.ponylang.io/src/cli/command_help/#L60)

 Renders the help message as a String.

 
```
fun box help_string()
: String val

```
 #### Returns

 * [String](builtin-string) val

 ### print\_help

 [[Source]](https://stdlib.ponylang.io/src/cli/command_help/#L70)

 Prints the help message to an OutStream.

 
```
fun box print_help(
  os: OutStream tag)
: None val

```
 #### Parameters

 * os: [OutStream](builtin-outstream) tag

 #### Returns

 * [None](builtin-none) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/cli-CommandHelp>

Arg
===

 [[Source]](https://stdlib.ponylang.io/src/cli/command/#L122)

 Arg contains a spec and an effective value for a given arg.

 
```
class val Arg

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/cli/command/#L129)

 
```
new val create(
  spec': ArgSpec val,
  value': (Bool val | String val | I64 val | 
    U64 val | F64 val | _StringSeq val))
: Arg val^

```
 #### Parameters

 * spec': [ArgSpec](cli-argspec) val
* value': ([Bool](builtin-bool) val | [String](builtin-string) val | [I64](builtin-i64) val | [U64](builtin-u64) val | [F64](builtin-f64) val | \_StringSeq val)

 #### Returns

 * [Arg](index) val^

 Public Functions
----------------

 ### spec

 [[Source]](https://stdlib.ponylang.io/src/cli/command/#L136)

 
```
fun box spec()
: ArgSpec val

```
 #### Returns

 * [ArgSpec](cli-argspec) val

 ### bool

 [[Source]](https://stdlib.ponylang.io/src/cli/command/#L138)

 Returns the arg value as a Bool, defaulting to false.

 
```
fun box bool()
: Bool val

```
 #### Returns

 * [Bool](builtin-bool) val

 ### string

 [[Source]](https://stdlib.ponylang.io/src/cli/command/#L144)

 Returns the arg value as a String, defaulting to empty.

 
```
fun box string()
: String val

```
 #### Returns

 * [String](builtin-string) val

 ### i64

 [[Source]](https://stdlib.ponylang.io/src/cli/command/#L150)

 Returns the arg value as an I64, defaulting to 0.

 
```
fun box i64()
: I64 val

```
 #### Returns

 * [I64](builtin-i64) val

 ### u64

 [[Source]](https://stdlib.ponylang.io/src/cli/command/#L156)

 Returns the arg value as an U64, defaulting to 0.

 
```
fun box u64()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### f64

 [[Source]](https://stdlib.ponylang.io/src/cli/command/#L162)

 Returns the arg value as an F64, defaulting to 0.0.

 
```
fun box f64()
: F64 val

```
 #### Returns

 * [F64](builtin-f64) val

 ### string\_seq

 [[Source]](https://stdlib.ponylang.io/src/cli/command/#L168)

 Returns the arg value as a ReadSeq[String], defaulting to empty.

 
```
fun box string_seq()
: ReadSeq[String val] val

```
 #### Returns

 * [ReadSeq](builtin-readseq)[[String](builtin-string) val] val

 ### deb\_string

 [[Source]](https://stdlib.ponylang.io/src/cli/command/#L178)

 
```
fun box deb_string()
: String val

```
 #### Returns

 * [String](builtin-string) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/cli-Arg>

UDPSocket
=========

 [[Source]](https://stdlib.ponylang.io/src/net/udp_socket/#L5)

 Creates a UDP socket that can be used for sending and receiving UDP messages.

 The following examples create: \* an echo server that listens for connections and returns whatever message it receives \* a client that connects to the server, sends a message, and prints the message it receives in response

 The server is implemented like this:

 
```
use "net"

class MyUDPNotify is UDPNotify
  fun ref received(
    sock: UDPSocket ref,
    data: Array[U8] iso,
    from: NetAddress)
  =>
    sock.write(consume data, from)

  fun ref not_listening(sock: UDPSocket ref) =>
    None

actor Main
  new create(env: Env) =>
    try
      UDPSocket(env.root as AmbientAuth,
        MyUDPNotify, "", "8989")
    end

```
 The client is implemented like this:

 
```
use "net"

class MyUDPNotify is UDPNotify
  let _out: OutStream
  let _destination: NetAddress

  new create(
    out: OutStream,
    destination: NetAddress)
  =>
    _out = out
    _destination = destination

  fun ref listening(sock: UDPSocket ref) =>
    sock.write("hello world", _destination)

  fun ref received(
    sock: UDPSocket ref,
    data: Array[U8] iso,
    from: NetAddress)
  =>
    _out.print("GOT:" + String.from_array(consume data))
    sock.dispose()

  fun ref not_listening(sock: UDPSocket ref) =>
    None

actor Main
  new create(env: Env) =>
    try
      let destination =
        DNS.ip4(env.root as AmbientAuth, "localhost", "8989")(0)?
      UDPSocket(env.root as AmbientAuth,
        recover MyUDPNotify(env.out, consume destination) end)
    end

```
 
```
actor tag UDPSocket

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/net/udp_socket/#L89)

 Listens for both IPv4 and IPv6 datagrams.

 
```
new tag create(
  auth: (AmbientAuth val | NetAuth val | UDPAuth val),
  notify: UDPNotify iso,
  host: String val = "",
  service: String val = "0",
  size: USize val = 1024)
: UDPSocket tag^

```
 #### Parameters

 * auth: ([AmbientAuth](builtin-ambientauth) val | [NetAuth](net-netauth) val | [UDPAuth](net-udpauth) val)
* notify: [UDPNotify](net-udpnotify) iso
* host: [String](builtin-string) val = ""
* service: [String](builtin-string) val = "0"
* size: [USize](builtin-usize) val = 1024

 #### Returns

 * [UDPSocket](index) tag^

 ### ip4

 [[Source]](https://stdlib.ponylang.io/src/net/udp_socket/#L110)

 Listens for IPv4 datagrams.

 
```
new tag ip4(
  auth: (AmbientAuth val | NetAuth val | UDPAuth val),
  notify: UDPNotify iso,
  host: String val = "",
  service: String val = "0",
  size: USize val = 1024)
: UDPSocket tag^

```
 #### Parameters

 * auth: ([AmbientAuth](builtin-ambientauth) val | [NetAuth](net-netauth) val | [UDPAuth](net-udpauth) val)
* notify: [UDPNotify](net-udpnotify) iso
* host: [String](builtin-string) val = ""
* service: [String](builtin-string) val = "0"
* size: [USize](builtin-usize) val = 1024

 #### Returns

 * [UDPSocket](index) tag^

 ### ip6

 [[Source]](https://stdlib.ponylang.io/src/net/udp_socket/#L131)

 Listens for IPv6 datagrams.

 
```
new tag ip6(
  auth: (AmbientAuth val | NetAuth val | UDPAuth val),
  notify: UDPNotify iso,
  host: String val = "",
  service: String val = "0",
  size: USize val = 1024)
: UDPSocket tag^

```
 #### Parameters

 * auth: ([AmbientAuth](builtin-ambientauth) val | [NetAuth](net-netauth) val | [UDPAuth](net-udpauth) val)
* notify: [UDPNotify](net-udpnotify) iso
* host: [String](builtin-string) val = ""
* service: [String](builtin-string) val = "0"
* size: [USize](builtin-usize) val = 1024

 #### Returns

 * [UDPSocket](index) tag^

 Public Behaviours
-----------------

 ### write

 [[Source]](https://stdlib.ponylang.io/src/net/udp_socket/#L152)

 Write a single sequence of bytes.

 
```
be write(
  data: (String val | Array[U8 val] val),
  to: NetAddress val)

```
 #### Parameters

 * data: ([String](builtin-string) val | [Array](builtin-array)[[U8](builtin-u8) val] val)
* to: [NetAddress](net-netaddress) val

 ### writev

 [[Source]](https://stdlib.ponylang.io/src/net/udp_socket/#L158)

 Write a sequence of sequences of bytes.

 
```
be writev(
  data: ByteSeqIter val,
  to: NetAddress val)

```
 #### Parameters

 * data: [ByteSeqIter](builtin-byteseqiter) val
* to: [NetAddress](net-netaddress) val

 ### set\_notify

 [[Source]](https://stdlib.ponylang.io/src/net/udp_socket/#L166)

 Change the notifier.

 
```
be set_notify(
  notify: UDPNotify iso)

```
 #### Parameters

 * notify: [UDPNotify](net-udpnotify) iso

 ### set\_broadcast

 [[Source]](https://stdlib.ponylang.io/src/net/udp_socket/#L172)

 Enable or disable broadcasting from this socket.

 
```
be set_broadcast(
  state: Bool val)

```
 #### Parameters

 * state: [Bool](builtin-bool) val

 ### set\_multicast\_interface

 [[Source]](https://stdlib.ponylang.io/src/net/udp_socket/#L184)

 By default, the OS will choose which address is used to send packets bound for multicast addresses. This can be used to force a specific interface. To revert to allowing the OS to choose, call with an empty string.

 
```
be set_multicast_interface(
  from: String val = "")

```
 #### Parameters

 * from: [String](builtin-string) val = ""

 ### set\_multicast\_loopback

 [[Source]](https://stdlib.ponylang.io/src/net/udp_socket/#L194)

 By default, packets sent to a multicast address will be received by the sending system if it has subscribed to that address. Disabling loopback prevents this.

 
```
be set_multicast_loopback(
  loopback: Bool val)

```
 #### Parameters

 * loopback: [Bool](builtin-bool) val

 ### set\_multicast\_ttl

 [[Source]](https://stdlib.ponylang.io/src/net/udp_socket/#L204)

 Set the TTL for multicast sends. Defaults to 1.

 
```
be set_multicast_ttl(
  ttl: U8 val)

```
 #### Parameters

 * ttl: [U8](builtin-u8) val

 ### multicast\_join

 [[Source]](https://stdlib.ponylang.io/src/net/udp_socket/#L212)

 Add a multicast group. This can be limited to packets arriving on a specific interface.

 
```
be multicast_join(
  group: String val,
  to: String val = "")

```
 #### Parameters

 * group: [String](builtin-string) val
* to: [String](builtin-string) val = ""

 ### multicast\_leave

 [[Source]](https://stdlib.ponylang.io/src/net/udp_socket/#L221)

 Drop a multicast group. This can be limited to packets arriving on a specific interface. No attempt is made to check that this socket has previously added this group.

 
```
be multicast_leave(
  group: String val,
  to: String val = "")

```
 #### Parameters

 * group: [String](builtin-string) val
* to: [String](builtin-string) val = ""

 ### dispose

 [[Source]](https://stdlib.ponylang.io/src/net/udp_socket/#L231)

 Stop listening.

 
```
be dispose()

```
 Public Functions
----------------

 ### local\_address

 [[Source]](https://stdlib.ponylang.io/src/net/udp_socket/#L239)

 Return the bound IP address.

 
```
fun box local_address()
: NetAddress val

```
 #### Returns

 * [NetAddress](net-netaddress) val

 ### getsockopt

 [[Source]](https://stdlib.ponylang.io/src/net/udp_socket/#L410)

 General wrapper for UDP sockets to the `getsockopt(2)` system call.

 The caller must provide an array that is pre-allocated to be at least as large as the largest data structure that the kernel may return for the requested option.

 In case of system call success, this function returns the 2-tuple: 1. The integer `0`. 2. An `Array[U8]` of data returned by the system call's `void *` 4th argument. Its size is specified by the kernel via the system call's `sockopt_len_t *` 5th argument.

 In case of system call failure, this function returns the 2-tuple: 1. The value of `errno`. 2. An undefined value that must be ignored.

 Usage example:

 
```
// listening() is a callback function for class UDPNotify
fun ref listening(sock: UDPSocket ref) =>
  match sock.getsockopt(OSSockOpt.sol_socket(), OSSockOpt.so_rcvbuf(), 4)
    | (0, let gbytes: Array[U8] iso) =>
      try
        let br = Reader.create().>append(consume gbytes)
        ifdef littleendian then
          let buffer_size = br.u32_le()?
        else
          let buffer_size = br.u32_be()?
        end
      end
    | (let errno: U32, _) =>
      // System call failed
  end

```
 
```
fun ref getsockopt(
  level: I32 val,
  option_name: I32 val,
  option_max_size: USize val = 4)
: (U32 val , Array[U8 val] iso^)

```
 #### Parameters

 * level: [I32](builtin-i32) val
* option\_name: [I32](builtin-i32) val
* option\_max\_size: [USize](builtin-usize) val = 4

 #### Returns

 * ([U32](builtin-u32) val , [Array](builtin-array)[[U8](builtin-u8) val] iso^)

 ### getsockopt\_u32

 [[Source]](https://stdlib.ponylang.io/src/net/udp_socket/#L450)

 Wrapper for UDP sockets to the `getsockopt(2)` system call where the kernel's returned option value is a C `uint32_t` type / Pony type `U32`.

 In case of system call success, this function returns the 2-tuple: 1. The integer `0`. 2. The `*option_value` returned by the kernel converted to a Pony `U32`.

 In case of system call failure, this function returns the 2-tuple: 1. The value of `errno`. 2. An undefined value that must be ignored.

 
```
fun ref getsockopt_u32(
  level: I32 val,
  option_name: I32 val)
: (U32 val , U32 val)

```
 #### Parameters

 * level: [I32](builtin-i32) val
* option\_name: [I32](builtin-i32) val

 #### Returns

 * ([U32](builtin-u32) val , [U32](builtin-u32) val)

 ### setsockopt

 [[Source]](https://stdlib.ponylang.io/src/net/udp_socket/#L466)

 General wrapper for UDP sockets to the `setsockopt(2)` system call.

 The caller is responsible for the correct size and byte contents of the `option` array for the requested `level` and `option_name`, including using the appropriate CPU endian byte order.

 This function returns `0` on success, else the value of `errno` on failure.

 Usage example:

 
```
// listening() is a callback function for class UDPNotify
fun ref listening(sock: UDPSocket ref) =>
  let sb = Writer

  sb.u32_le(7744)             // Our desired socket buffer size
  let sbytes = Array[U8]
  for bs in sb.done().values() do
    sbytes.append(bs)
  end
  match sock.setsockopt(OSSockOpt.sol_socket(), OSSockOpt.so_rcvbuf(), sbytes)
    | 0 =>
      // System call was successful
    | let errno: U32 =>
      // System call failed
  end

```
 
```
fun ref setsockopt(
  level: I32 val,
  option_name: I32 val,
  option: Array[U8 val] ref)
: U32 val

```
 #### Parameters

 * level: [I32](builtin-i32) val
* option\_name: [I32](builtin-i32) val
* option: [Array](builtin-array)[[U8](builtin-u8) val] ref

 #### Returns

 * [U32](builtin-u32) val

 ### setsockopt\_u32

 [[Source]](https://stdlib.ponylang.io/src/net/udp_socket/#L499)

 Wrapper for UDP sockets to the `setsockopt(2)` system call where the kernel expects an option value of a C `uint32_t` type / Pony type `U32`.

 This function returns `0` on success, else the value of `errno` on failure.

 
```
fun ref setsockopt_u32(
  level: I32 val,
  option_name: I32 val,
  option: U32 val)
: U32 val

```
 #### Parameters

 * level: [I32](builtin-i32) val
* option\_name: [I32](builtin-i32) val
* option: [U32](builtin-u32) val

 #### Returns

 * [U32](builtin-u32) val

 ### get\_so\_error

 [[Source]](https://stdlib.ponylang.io/src/net/udp_socket/#L511)

 Wrapper for the FFI call `getsockopt(fd, SOL_SOCKET, SO_ERROR, ...)`

 
```
fun ref get_so_error()
: (U32 val , U32 val)

```
 #### Returns

 * ([U32](builtin-u32) val , [U32](builtin-u32) val)

 ### get\_so\_rcvbuf

 [[Source]](https://stdlib.ponylang.io/src/net/udp_socket/#L517)

 Wrapper for the FFI call `getsockopt(fd, SOL_SOCKET, SO_RCVBUF, ...)`

 
```
fun ref get_so_rcvbuf()
: (U32 val , U32 val)

```
 #### Returns

 * ([U32](builtin-u32) val , [U32](builtin-u32) val)

 ### get\_so\_sndbuf

 [[Source]](https://stdlib.ponylang.io/src/net/udp_socket/#L523)

 Wrapper for the FFI call `getsockopt(fd, SOL_SOCKET, SO_SNDBUF, ...)`

 
```
fun ref get_so_sndbuf()
: (U32 val , U32 val)

```
 #### Returns

 * ([U32](builtin-u32) val , [U32](builtin-u32) val)

 ### set\_ip\_multicast\_loop

 [[Source]](https://stdlib.ponylang.io/src/net/udp_socket/#L530)

 Wrapper for the FFI call `setsockopt(fd, SOL_SOCKET, IP_MULTICAST_LOOP, ...)`

 
```
fun ref set_ip_multicast_loop(
  loopback: Bool val)
: U32 val

```
 #### Parameters

 * loopback: [Bool](builtin-bool) val

 #### Returns

 * [U32](builtin-u32) val

 ### set\_ip\_multicast\_ttl

 [[Source]](https://stdlib.ponylang.io/src/net/udp_socket/#L538)

 Wrapper for the FFI call `setsockopt(fd, SOL_SOCKET, IP_MULTICAST_TTL, ...)`

 
```
fun ref set_ip_multicast_ttl(
  ttl: U8 val)
: U32 val

```
 #### Parameters

 * ttl: [U8](builtin-u8) val

 #### Returns

 * [U32](builtin-u32) val

 ### set\_so\_broadcast

 [[Source]](https://stdlib.ponylang.io/src/net/udp_socket/#L545)

 Wrapper for the FFI call `setsockopt(fd, SOL_SOCKET, SO_BROADCAST, ...)`

 
```
fun ref set_so_broadcast(
  state: Bool val)
: U32 val

```
 #### Parameters

 * state: [Bool](builtin-bool) val

 #### Returns

 * [U32](builtin-u32) val

 ### set\_so\_rcvbuf

 [[Source]](https://stdlib.ponylang.io/src/net/udp_socket/#L553)

 Wrapper for the FFI call `setsockopt(fd, SOL_SOCKET, SO_RCVBUF, ...)`

 
```
fun ref set_so_rcvbuf(
  bufsize: U32 val)
: U32 val

```
 #### Parameters

 * bufsize: [U32](builtin-u32) val

 #### Returns

 * [U32](builtin-u32) val

 ### set\_so\_sndbuf

 [[Source]](https://stdlib.ponylang.io/src/net/udp_socket/#L559)

 Wrapper for the FFI call `setsockopt(fd, SOL_SOCKET, SO_SNDBUF, ...)`

 
```
fun ref set_so_sndbuf(
  bufsize: U32 val)
: U32 val

```
 #### Parameters

 * bufsize: [U32](builtin-u32) val

 #### Returns

 * [U32](builtin-u32) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/net-UDPSocket>

UDPSocketAuth
=============

 [[Source]](https://stdlib.ponylang.io/src/net/udp_socket/#L3)

 
```
type UDPSocketAuth is
  (AmbientAuth val | NetAuth val | UDPAuth val)

```
 #### Type Alias For

 * ([AmbientAuth](builtin-ambientauth) val | [NetAuth](net-netauth) val | [UDPAuth](net-udpauth) val)



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/net-UDPSocketAuth>

TCPListener
===========

 [[Source]](https://stdlib.ponylang.io/src/net/tcp_listener/#L3)

 Listens for new network connections.

 The following program creates an echo server that listens for connections on port 8989 and echoes back any data it receives.

 
```
use "net"

class MyTCPConnectionNotify is TCPConnectionNotify
  fun ref received(
    conn: TCPConnection ref,
    data: Array[U8] iso,
    times: USize)
    : Bool
  =>
    conn.write(String.from_array(consume data))
    true

  fun ref connect_failed(conn: TCPConnection ref) =>
    None

class MyTCPListenNotify is TCPListenNotify
  fun ref connected(listen: TCPListener ref): TCPConnectionNotify iso^ =>
    MyTCPConnectionNotify

  fun ref not_listening(listen: TCPListener ref) =>
    None

actor Main
  new create(env: Env) =>
    try
      TCPListener(env.root as AmbientAuth,
        recover MyTCPListenNotify end, "", "8989")
    end

```
 
```
actor tag TCPListener

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/net/tcp_listener/#L52)

 Listens for both IPv4 and IPv6 connections.

 
```
new tag create(
  auth: (AmbientAuth val | NetAuth val | TCPAuth val | 
    TCPListenAuth val),
  notify: TCPListenNotify iso,
  host: String val = "",
  service: String val = "0",
  limit: USize val = 0,
  read_buffer_size: USize val = 16384,
  yield_after_reading: USize val = 16384,
  yield_after_writing: USize val = 16384)
: TCPListener tag^

```
 #### Parameters

 * auth: ([AmbientAuth](builtin-ambientauth) val | [NetAuth](net-netauth) val | [TCPAuth](net-tcpauth) val | [TCPListenAuth](net-tcplistenauth) val)
* notify: [TCPListenNotify](net-tcplistennotify) iso
* host: [String](builtin-string) val = ""
* service: [String](builtin-string) val = "0"
* limit: [USize](builtin-usize) val = 0
* read\_buffer\_size: [USize](builtin-usize) val = 16384
* yield\_after\_reading: [USize](builtin-usize) val = 16384
* yield\_after\_writing: [USize](builtin-usize) val = 16384

 #### Returns

 * [TCPListener](index) tag^

 ### ip4

 [[Source]](https://stdlib.ponylang.io/src/net/tcp_listener/#L76)

 Listens for IPv4 connections.

 
```
new tag ip4(
  auth: (AmbientAuth val | NetAuth val | TCPAuth val | 
    TCPListenAuth val),
  notify: TCPListenNotify iso,
  host: String val = "",
  service: String val = "0",
  limit: USize val = 0,
  read_buffer_size: USize val = 16384,
  yield_after_reading: USize val = 16384,
  yield_after_writing: USize val = 16384)
: TCPListener tag^

```
 #### Parameters

 * auth: ([AmbientAuth](builtin-ambientauth) val | [NetAuth](net-netauth) val | [TCPAuth](net-tcpauth) val | [TCPListenAuth](net-tcplistenauth) val)
* notify: [TCPListenNotify](net-tcplistennotify) iso
* host: [String](builtin-string) val = ""
* service: [String](builtin-string) val = "0"
* limit: [USize](builtin-usize) val = 0
* read\_buffer\_size: [USize](builtin-usize) val = 16384
* yield\_after\_reading: [USize](builtin-usize) val = 16384
* yield\_after\_writing: [USize](builtin-usize) val = 16384

 #### Returns

 * [TCPListener](index) tag^

 ### ip6

 [[Source]](https://stdlib.ponylang.io/src/net/tcp_listener/#L100)

 Listens for IPv6 connections.

 
```
new tag ip6(
  auth: (AmbientAuth val | NetAuth val | TCPAuth val | 
    TCPListenAuth val),
  notify: TCPListenNotify iso,
  host: String val = "",
  service: String val = "0",
  limit: USize val = 0,
  read_buffer_size: USize val = 16384,
  yield_after_reading: USize val = 16384,
  yield_after_writing: USize val = 16384)
: TCPListener tag^

```
 #### Parameters

 * auth: ([AmbientAuth](builtin-ambientauth) val | [NetAuth](net-netauth) val | [TCPAuth](net-tcpauth) val | [TCPListenAuth](net-tcplistenauth) val)
* notify: [TCPListenNotify](net-tcplistennotify) iso
* host: [String](builtin-string) val = ""
* service: [String](builtin-string) val = "0"
* limit: [USize](builtin-usize) val = 0
* read\_buffer\_size: [USize](builtin-usize) val = 16384
* yield\_after\_reading: [USize](builtin-usize) val = 16384
* yield\_after\_writing: [USize](builtin-usize) val = 16384

 #### Returns

 * [TCPListener](index) tag^

 Public Behaviours
-----------------

 ### set\_notify

 [[Source]](https://stdlib.ponylang.io/src/net/tcp_listener/#L124)

 Change the notifier.

 
```
be set_notify(
  notify: TCPListenNotify iso)

```
 #### Parameters

 * notify: [TCPListenNotify](net-tcplistennotify) iso

 ### dispose

 [[Source]](https://stdlib.ponylang.io/src/net/tcp_listener/#L130)

 Stop listening.

 
```
be dispose()

```
 Public Functions
----------------

 ### local\_address

 [[Source]](https://stdlib.ponylang.io/src/net/tcp_listener/#L136)

 Return the bound IP address.

 
```
fun box local_address()
: NetAddress val

```
 #### Returns

 * [NetAddress](net-netaddress) val

 ### close

 [[Source]](https://stdlib.ponylang.io/src/net/tcp_listener/#L245)

 Dispose of resources.

 
```
fun ref close()
: None val

```
 #### Returns

 * [None](builtin-none) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/net-TCPListener>

TCPListenerAuth
===============

 [[Source]](https://stdlib.ponylang.io/src/net/tcp_listener/#L1)

 
```
type TCPListenerAuth is
  (AmbientAuth val | NetAuth val | TCPAuth val | TCPListenAuth val)

```
 #### Type Alias For

 * ([AmbientAuth](builtin-ambientauth) val | [NetAuth](net-netauth) val | [TCPAuth](net-tcpauth) val | [TCPListenAuth](net-tcplistenauth) val)



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/net-TCPListenerAuth>

TCPListenNotify
===============

 [[Source]](https://stdlib.ponylang.io/src/net/tcp_listen_notify/#L1)

 Notifications for TCP listeners.

 For an example of using this class, please see the documentation for the `TCPListener` actor.

 
```
interface ref TCPListenNotify

```
 Public Functions
----------------

 ### listening

 [[Source]](https://stdlib.ponylang.io/src/net/tcp_listen_notify/#L8)

 Called when the listener has been bound to an address.

 
```
fun ref listening(
  listen: TCPListener ref)
: None val

```
 #### Parameters

 * listen: [TCPListener](net-tcplistener) ref

 #### Returns

 * [None](builtin-none) val

 ### not\_listening

 [[Source]](https://stdlib.ponylang.io/src/net/tcp_listen_notify/#L14)

 Called if it wasn't possible to bind the listener to an address.

 It is expected to implement proper error handling. You need to opt in to ignoring errors, which can be implemented like this:

 
```
fun ref not_listening(listen: TCPListener ref) =>
  None

```
 
```
fun ref not_listening(
  listen: TCPListener ref)
: None val

```
 #### Parameters

 * listen: [TCPListener](net-tcplistener) ref

 #### Returns

 * [None](builtin-none) val

 ### closed

 [[Source]](https://stdlib.ponylang.io/src/net/tcp_listen_notify/#L27)

 Called when the listener is closed.

 
```
fun ref closed(
  listen: TCPListener ref)
: None val

```
 #### Parameters

 * listen: [TCPListener](net-tcplistener) ref

 #### Returns

 * [None](builtin-none) val

 ### connected

 [[Source]](https://stdlib.ponylang.io/src/net/tcp_listen_notify/#L33)

 Create a new TCPConnectionNotify to attach to a new TCPConnection for a newly established connection to the server.

 
```
fun ref connected(
  listen: TCPListener ref)
: TCPConnectionNotify iso^ ?

```
 #### Parameters

 * listen: [TCPListener](net-tcplistener) ref

 #### Returns

 * [TCPConnectionNotify](net-tcpconnectionnotify) iso^ ?



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/net-TCPListenNotify>

TCPConnectionAuth
=================

 [[Source]](https://stdlib.ponylang.io/src/net/tcp_connection/#L14)

 
```
type TCPConnectionAuth is
  (AmbientAuth val | NetAuth val | TCPAuth val | TCPConnectAuth val)

```
 #### Type Alias For

 * ([AmbientAuth](builtin-ambientauth) val | [NetAuth](net-netauth) val | [TCPAuth](net-tcpauth) val | [TCPConnectAuth](net-tcpconnectauth) val)



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/net-TCPConnectionAuth>

UDPNotify
=========

 [[Source]](https://stdlib.ponylang.io/src/net/udp_notify/#L1)

 Notifications for UDP connections.

 For an example of using this class please see the documentatoin for the `UDPSocket` actor.

 
```
interface ref UDPNotify

```
 Public Functions
----------------

 ### listening

 [[Source]](https://stdlib.ponylang.io/src/net/udp_notify/#L8)

 Called when the socket has been bound to an address.

 
```
fun ref listening(
  sock: UDPSocket ref)
: None val

```
 #### Parameters

 * sock: [UDPSocket](net-udpsocket) ref

 #### Returns

 * [None](builtin-none) val

 ### not\_listening

 [[Source]](https://stdlib.ponylang.io/src/net/udp_notify/#L14)

 Called if it wasn't possible to bind the socket to an address.

 It is expected to implement proper error handling. You need to opt in to ignoring errors, which can be implemented like this:

 
```
fun ref not_listening(sock: UDPSocket ref) =>
  None

```
 
```
fun ref not_listening(
  sock: UDPSocket ref)
: None val

```
 #### Parameters

 * sock: [UDPSocket](net-udpsocket) ref

 #### Returns

 * [None](builtin-none) val

 ### received

 [[Source]](https://stdlib.ponylang.io/src/net/udp_notify/#L27)

 Called when new data is received on the socket.

 
```
fun ref received(
  sock: UDPSocket ref,
  data: Array[U8 val] iso,
  from: NetAddress val)
: None val

```
 #### Parameters

 * sock: [UDPSocket](net-udpsocket) ref
* data: [Array](builtin-array)[[U8](builtin-u8) val] iso
* from: [NetAddress](net-netaddress) val

 #### Returns

 * [None](builtin-none) val

 ### closed

 [[Source]](https://stdlib.ponylang.io/src/net/udp_notify/#L37)

 Called when the socket is closed.

 
```
fun ref closed(
  sock: UDPSocket ref)
: None val

```
 #### Parameters

 * sock: [UDPSocket](net-udpsocket) ref

 #### Returns

 * [None](builtin-none) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/net-UDPNotify>

TCPAuth
=======

 [[Source]](https://stdlib.ponylang.io/src/net/auth/#L13)

 
```
primitive val TCPAuth

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/net/auth/#L14)

 
```
new val create(
  from: (AmbientAuth val | NetAuth val))
: TCPAuth val^

```
 #### Parameters

 * from: ([AmbientAuth](builtin-ambientauth) val | [NetAuth](net-netauth) val)

 #### Returns

 * [TCPAuth](index) val^

 Public Functions
----------------

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/net/auth/#L14)

 
```
fun box eq(
  that: TCPAuth val)
: Bool val

```
 #### Parameters

 * that: [TCPAuth](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/net/auth/#L14)

 
```
fun box ne(
  that: TCPAuth val)
: Bool val

```
 #### Parameters

 * that: [TCPAuth](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/net-TCPAuth>

NoProxy
=======

 [[Source]](https://stdlib.ponylang.io/src/net/proxy/#L5)

 Default implementation of a proxy that does not alter the supplied `TCPConnectionNotify`.

 
```
actor MyClient
  new create(host: String, service: String, proxy: Proxy = NoProxy) =>
    let conn: TCPConnection = TCPConnection.create(
      env.root as AmbientAuth,
      proxy.apply(MyConnectionNotify.create()),
      "localhost",
      "80")

```
 
```
class val NoProxy is
  Proxy ref

```
 #### Implements

 * [Proxy](net-proxy) ref

 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/net/proxy/#L5)

 
```
new iso create()
: NoProxy iso^

```
 #### Returns

 * [NoProxy](index) iso^

 Public Functions
----------------

 ### apply

 [[Source]](https://stdlib.ponylang.io/src/net/proxy/#L19)

 
```
fun box apply(
  wrap: TCPConnectionNotify iso)
: TCPConnectionNotify iso^

```
 #### Parameters

 * wrap: [TCPConnectionNotify](net-tcpconnectionnotify) iso

 #### Returns

 * [TCPConnectionNotify](net-tcpconnectionnotify) iso^



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/net-NoProxy>

DNSLookupAuth
=============

 [[Source]](https://stdlib.ponylang.io/src/net/dns/#L1)

 
```
type DNSLookupAuth is
  (AmbientAuth val | NetAuth val | DNSAuth val)

```
 #### Type Alias For

 * ([AmbientAuth](builtin-ambientauth) val | [NetAuth](net-netauth) val | [DNSAuth](net-dnsauth) val)



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/net-DNSLookupAuth>

TCPConnectionNotify
===================

 [[Source]](https://stdlib.ponylang.io/src/net/tcp_connection_notify/#L1)

 Notifications for TCP connections.

 For an example of using this class please see the documentation for the `TCPConnection` and `TCPListener` actors.

 
```
interface ref TCPConnectionNotify

```
 Public Functions
----------------

 ### accepted

 [[Source]](https://stdlib.ponylang.io/src/net/tcp_connection_notify/#L8)

 Called when a TCPConnection is accepted by a TCPListener.

 
```
fun ref accepted(
  conn: TCPConnection ref)
: None val

```
 #### Parameters

 * conn: [TCPConnection](net-tcpconnection) ref

 #### Returns

 * [None](builtin-none) val

 ### proxy\_via

 [[Source]](https://stdlib.ponylang.io/src/net/tcp_connection_notify/#L14)

 Called before before attempting to connect to the destination server In order to connect via proxy, return the host & service for the proxy server.

 An implementation of this function might look like:

 
```
let _proxy_host = "some-proxy.example.com"
let _proxy_service = "80"
var _destination_host: ( None | String )
var _destination_service: ( None | String )

fun ref proxy_via(host: String, service: String): (String, String) =>
  _destination_host = host
  _destination_service = service
  ( _proxy_host, _proxy_service )

```
 
```
fun ref proxy_via(
  host: String val,
  service: String val)
: (String val , String val)

```
 #### Parameters

 * host: [String](builtin-string) val
* service: [String](builtin-string) val

 #### Returns

 * ([String](builtin-string) val , [String](builtin-string) val)

 ### connecting

 [[Source]](https://stdlib.ponylang.io/src/net/tcp_connection_notify/#L35)

 Called if name resolution succeeded for a TCPConnection and we are now waiting for a connection to the server to succeed. The count is the number of connections we're trying. The notifier will be informed each time the count changes, until a connection is made or connect\_failed() is called.

 
```
fun ref connecting(
  conn: TCPConnection ref,
  count: U32 val)
: None val

```
 #### Parameters

 * conn: [TCPConnection](net-tcpconnection) ref
* count: [U32](builtin-u32) val

 #### Returns

 * [None](builtin-none) val

 ### connected

 [[Source]](https://stdlib.ponylang.io/src/net/tcp_connection_notify/#L44)

 Called when we have successfully connected to the server.

 
```
fun ref connected(
  conn: TCPConnection ref)
: None val

```
 #### Parameters

 * conn: [TCPConnection](net-tcpconnection) ref

 #### Returns

 * [None](builtin-none) val

 ### connect\_failed

 [[Source]](https://stdlib.ponylang.io/src/net/tcp_connection_notify/#L50)

 Called when we have failed to connect to all possible addresses for the server. At this point, the connection will never be established.

 It is expected to implement proper error handling. You need to opt in to ignoring errors, which can be implemented like this:

 
```
fun ref connect_failed(conn: TCPConnection ref) =>
  None

```
 
```
fun ref connect_failed(
  conn: TCPConnection ref)
: None val

```
 #### Parameters

 * conn: [TCPConnection](net-tcpconnection) ref

 #### Returns

 * [None](builtin-none) val

 ### auth\_failed

 [[Source]](https://stdlib.ponylang.io/src/net/tcp_connection_notify/#L64)

 A raw TCPConnection has no authentication mechanism. However, when protocols are wrapped in other protocols, this can be used to report an authentication failure in a lower level protocol (e.g. SSL).

 
```
fun ref auth_failed(
  conn: TCPConnection ref)
: None val

```
 #### Parameters

 * conn: [TCPConnection](net-tcpconnection) ref

 #### Returns

 * [None](builtin-none) val

 ### sent

 [[Source]](https://stdlib.ponylang.io/src/net/tcp_connection_notify/#L72)

 Called when data is sent on the connection. This gives the notifier an opportunity to modify sent data before it is written. To swallow data, return an empty string.

 
```
fun ref sent(
  conn: TCPConnection ref,
  data: (String val | Array[U8 val] val))
: (String val | Array[U8 val] val)

```
 #### Parameters

 * conn: [TCPConnection](net-tcpconnection) ref
* data: ([String](builtin-string) val | [Array](builtin-array)[[U8](builtin-u8) val] val)

 #### Returns

 * ([String](builtin-string) val | [Array](builtin-array)[[U8](builtin-u8) val] val)

 ### sentv

 [[Source]](https://stdlib.ponylang.io/src/net/tcp_connection_notify/#L80)

 Called when multiple chunks of data are sent to the connection in a single call. This gives the notifier an opportunity to modify the sent data chunks before they are written. To swallow the send, return an empty Array[String].

 
```
fun ref sentv(
  conn: TCPConnection ref,
  data: ByteSeqIter val)
: ByteSeqIter val

```
 #### Parameters

 * conn: [TCPConnection](net-tcpconnection) ref
* data: [ByteSeqIter](builtin-byteseqiter) val

 #### Returns

 * [ByteSeqIter](builtin-byteseqiter) val

 ### received

 [[Source]](https://stdlib.ponylang.io/src/net/tcp_connection_notify/#L89)

 Called when new data is received on the connection. Return true if you want to continue receiving messages without yielding until you read max\_size on the TCPConnection. Return false to cause the TCPConnection to yield now.

 Includes the number of times during the current behavior, that received has been called. This allows the notifier to end reads on a regular basis.

 
```
fun ref received(
  conn: TCPConnection ref,
  data: Array[U8 val] iso,
  times: USize val)
: Bool val

```
 #### Parameters

 * conn: [TCPConnection](net-tcpconnection) ref
* data: [Array](builtin-array)[[U8](builtin-u8) val] iso
* times: [USize](builtin-usize) val

 #### Returns

 * [Bool](builtin-bool) val

 ### expect

 [[Source]](https://stdlib.ponylang.io/src/net/tcp_connection_notify/#L106)

 Called when the connection has been told to expect a certain quantity of bytes. This allows nested notifiers to change the expected quantity, which allows a lower level protocol to handle any framing (e.g. SSL).

 
```
fun ref expect(
  conn: TCPConnection ref,
  qty: USize val)
: USize val

```
 #### Parameters

 * conn: [TCPConnection](net-tcpconnection) ref
* qty: [USize](builtin-usize) val

 #### Returns

 * [USize](builtin-usize) val

 ### closed

 [[Source]](https://stdlib.ponylang.io/src/net/tcp_connection_notify/#L114)

 Called when the connection is closed.

 
```
fun ref closed(
  conn: TCPConnection ref)
: None val

```
 #### Parameters

 * conn: [TCPConnection](net-tcpconnection) ref

 #### Returns

 * [None](builtin-none) val

 ### throttled

 [[Source]](https://stdlib.ponylang.io/src/net/tcp_connection_notify/#L120)

 Called when the connection starts experiencing TCP backpressure. You should respond to this by pausing additional calls to `write` and `writev` until you are informed that pressure has been released. Failure to respond to the `throttled` notification will result in outgoing data queuing in the connection and increasing memory usage.

 
```
fun ref throttled(
  conn: TCPConnection ref)
: None val

```
 #### Parameters

 * conn: [TCPConnection](net-tcpconnection) ref

 #### Returns

 * [None](builtin-none) val

 ### unthrottled

 [[Source]](https://stdlib.ponylang.io/src/net/tcp_connection_notify/#L130)

 Called when the connection stops experiencing TCP backpressure. Upon receiving this notification, you should feel free to start making calls to `write` and `writev` again.

 
```
fun ref unthrottled(
  conn: TCPConnection ref)
: None val

```
 #### Parameters

 * conn: [TCPConnection](net-tcpconnection) ref

 #### Returns

 * [None](builtin-none) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/net-TCPConnectionNotify>

Proxy
=====

 [[Source]](https://stdlib.ponylang.io/src/net/proxy/#L2)

 
```
interface ref Proxy

```
 Public Functions
----------------

 ### apply

 [[Source]](https://stdlib.ponylang.io/src/net/proxy/#L3)

 
```
fun box apply(
  wrap: TCPConnectionNotify iso)
: TCPConnectionNotify iso^

```
 #### Parameters

 * wrap: [TCPConnectionNotify](net-tcpconnectionnotify) iso

 #### Returns

 * [TCPConnectionNotify](net-tcpconnectionnotify) iso^



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/net-Proxy>

TCPConnection
=============

 [[Source]](https://stdlib.ponylang.io/src/net/tcp_connection/#L16)

 A TCP connection. When connecting, the Happy Eyeballs algorithm is used.

 The following code creates a client that connects to port 8989 of the local host, writes "hello world", and listens for a response, which it then prints.

 
```
use "net"

class MyTCPConnectionNotify is TCPConnectionNotify
  let _out: OutStream

  new create(out: OutStream) =>
    _out = out

  fun ref connected(conn: TCPConnection ref) =>
    conn.write("hello world")

  fun ref received(
    conn: TCPConnection ref,
    data: Array[U8] iso,
    times: USize)
    : Bool
  =>
    _out.print("GOT:" + String.from_array(consume data))
    conn.close()
    true

  fun ref connect_failed(conn: TCPConnection ref) =>
    None

actor Main
  new create(env: Env) =>
    try
      TCPConnection(env.root as AmbientAuth,
        recover MyTCPConnectionNotify(env.out) end, "", "8989")
    end

```
 Note: when writing to the connection data will be silently discarded if the connection has not yet been established.

 Backpressure support
--------------------

 ### Write

 The TCP protocol has built-in backpressure support. This is generally experienced as the outgoing write buffer becoming full and being unable to write all requested data to the socket. In `TCPConnection`, this is hidden from the programmer. When this occurs, `TCPConnection` will buffer the extra data until such time as it is able to be sent. Left unchecked, this could result in uncontrolled queuing. To address this, `TCPConnectionNotify` implements two methods `throttled` and `unthrottled` that are called when backpressure is applied and released.

 Upon receiving a `throttled` notification, your application has two choices on how to handle it. One is to inform the Pony runtime that it can no longer make progress and that runtime backpressure should be applied to any actors sending this one messages. For example, you might construct your application like:

 
```
// Here we have a TCPConnectionNotify that upon construction
// is given a BackpressureAuth token. This allows the notifier
// to inform the Pony runtime when to apply and release backpressure
// as the connection experiences it.
// Note the calls to
//
// Backpressure.apply(_auth)
// Backpressure.release(_auth)
//
// that apply and release backpressure as needed

use "backpressure"
use "collections"
use "net"

class SlowDown is TCPConnectionNotify
  let _auth: BackpressureAuth
  let _out: StdStream

  new iso create(auth: BackpressureAuth, out: StdStream) =>
    _auth = auth
    _out = out

  fun ref throttled(connection: TCPConnection ref) =>
    _out.print("Experiencing backpressure!")
    Backpressure.apply(_auth)

  fun ref unthrottled(connection: TCPConnection ref) =>
    _out.print("Releasing backpressure!")
    Backpressure.release(_auth)

  fun ref closed(connection: TCPConnection ref) =>
    // if backpressure has been applied, make sure we release
    // when shutting down
    _out.print("Releasing backpressure if applied!")
    Backpressure.release(_auth)

  fun ref connect_failed(conn: TCPConnection ref) =>
    None

actor Main
  new create(env: Env) =>
    try
      let auth = env.root as AmbientAuth
      let socket = TCPConnection(auth, recover SlowDown(auth, env.out) end,
        "", "7669")
    end


```
 Or if you want, you could handle backpressure by shedding load, that is, dropping the extra data rather than carrying out the send. This might look like:

 
```
use "net"

class ThrowItAway is TCPConnectionNotify
  var _throttled: Bool = false

  fun ref sent(conn: TCPConnection ref, data: ByteSeq): ByteSeq =>
    if not _throttled then
      data
    else
      ""
    end

  fun ref sentv(conn: TCPConnection ref, data: ByteSeqIter): ByteSeqIter =>
    if not _throttled then
      data
    else
      recover Array[String] end
    end

  fun ref throttled(connection: TCPConnection ref) =>
    _throttled = true

  fun ref unthrottled(connection: TCPConnection ref) =>
    _throttled = false

  fun ref connect_failed(conn: TCPConnection ref) =>
    None

actor Main
  new create(env: Env) =>
    try
      TCPConnection(env.root as AmbientAuth,
        recover ThrowItAway end, "", "7669")
    end

```
 In general, unless you have a very specific use case, we strongly advise that you don't implement a load shedding scheme where you drop data.

 ### Read

 If your application is unable to keep up with data being sent to it over a `TCPConnection` you can use the builtin read backpressure support to pause reading the socket which will in turn start to exert backpressure on the corresponding writer on the other end of that socket.

 The `mute` behavior allow any other actors in your application to request the cessation of additional reads until such time as `unmute` is called. Please note that this cessation is not guaranteed to happen immediately as it is the result of an asynchronous behavior call and as such will have to wait for existing messages in the `TCPConnection`'s mailbox to be handled.

 On non-windows platforms, your `TCPConnection` will not notice if the other end of the connection closes until you unmute it. Unix type systems like FreeBSD, Linux and OSX learn about a closed connection upon read. On these platforms, you **must** call `unmute` on a muted connection to have it close. Without calling `unmute` the `TCPConnection` actor will never exit.

 Proxy support
-------------

 Using the `proxy_via` callback in a `TCPConnectionNotify` it is possible to implement proxies. The function takes the intended destination host and service as parameters and returns a 2-tuple of the proxy host and service.

 The proxy `TCPConnectionNotify` should decorate another implementation of `TCPConnectionNotify` passing relevent data through.

 ### Example proxy implementation

 
```
actor Main
  new create(env: Env) =>
    MyClient.create(
      "example.com", // we actually want to connect to this host
      "80",
      ExampleProxy.create("proxy.example.com", "80")) // we connect via this proxy

actor MyClient
  new create(host: String, service: String, proxy: Proxy = NoProxy) =>
    let conn: TCPConnection = TCPConnection.create(
      env.root as AmbientAuth,
      proxy.apply(MyConnectionNotify.create()),
      host,
      service)

class ExampleProxy is Proxy
  let _proxy_host: String
  let _proxy_service: String

  new create(proxy_host: String, proxy_service: String) =>
    _proxy_host = proxy_host
    _proxy_service = proxy_service

  fun apply(wrap: TCPConnectionNotify iso): TCPConnectionNotify iso^ =>
    ExampleProxyNotify.create(consume wrap, _proxy_service, _proxy_service)

class iso ExampleProxyNotify is TCPConnectionNotify
  // Fictional proxy implementation that has no error
  // conditions, and always forwards the connection.
  let _proxy_host: String
  let _proxy_service: String
  var _destination_host: (None | String) = None
  var _destination_service: (None | String) = None
  let _wrapped: TCPConnectionNotify iso

  new iso create(wrap: TCPConnectionNotify iso, proxy_host: String, proxy_service: String) =>
    _wrapped = wrap
    _proxy_host = proxy_host
    _proxy_service = proxy_service

  fun ref proxy_via(host: String, service: String): (String, String) =>
    // Stash the original host & service; return the host & service
    // for the proxy; indicating that the initial TCP connection should
    // be made to the proxy
    _destination_host = host
    _destination_service = service
    (_proxy_host, _proxy_service)

  fun ref connected(conn: TCPConnection ref) =>
    // conn is the connection to the *proxy* server. We need to ask the
    // proxy server to forward this connection to our intended final
    // destination.
    conn.write((_destination_host + "\n").array())
    conn.write((_destination_service + "\n").array())
    wrapped.connected(conn)

  fun ref received(conn, data, times) => _wrapped.received(conn, data, times)
  fun ref connect_failed(conn: TCPConnection ref) => None

```
 
```
actor tag TCPConnection

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/net/tcp_connection/#L300)

 Connect via IPv4 or IPv6. If `from` is a non-empty string, the connection will be made from the specified interface.

 
```
new tag create(
  auth: (AmbientAuth val | NetAuth val | TCPAuth val | 
    TCPConnectAuth val),
  notify: TCPConnectionNotify iso,
  host: String val,
  service: String val,
  from: String val = "",
  read_buffer_size: USize val = 16384,
  yield_after_reading: USize val = 16384,
  yield_after_writing: USize val = 16384)
: TCPConnection tag^

```
 #### Parameters

 * auth: ([AmbientAuth](builtin-ambientauth) val | [NetAuth](net-netauth) val | [TCPAuth](net-tcpauth) val | [TCPConnectAuth](net-tcpconnectauth) val)
* notify: [TCPConnectionNotify](net-tcpconnectionnotify) iso
* host: [String](builtin-string) val
* service: [String](builtin-string) val
* from: [String](builtin-string) val = ""
* read\_buffer\_size: [USize](builtin-usize) val = 16384
* yield\_after\_reading: [USize](builtin-usize) val = 16384
* yield\_after\_writing: [USize](builtin-usize) val = 16384

 #### Returns

 * [TCPConnection](index) tag^

 ### ip4

 [[Source]](https://stdlib.ponylang.io/src/net/tcp_connection/#L331)

 Connect via IPv4.

 
```
new tag ip4(
  auth: (AmbientAuth val | NetAuth val | TCPAuth val | 
    TCPConnectAuth val),
  notify: TCPConnectionNotify iso,
  host: String val,
  service: String val,
  from: String val = "",
  read_buffer_size: USize val = 16384,
  yield_after_reading: USize val = 16384,
  yield_after_writing: USize val = 16384)
: TCPConnection tag^

```
 #### Parameters

 * auth: ([AmbientAuth](builtin-ambientauth) val | [NetAuth](net-netauth) val | [TCPAuth](net-tcpauth) val | [TCPConnectAuth](net-tcpconnectauth) val)
* notify: [TCPConnectionNotify](net-tcpconnectionnotify) iso
* host: [String](builtin-string) val
* service: [String](builtin-string) val
* from: [String](builtin-string) val = ""
* read\_buffer\_size: [USize](builtin-usize) val = 16384
* yield\_after\_reading: [USize](builtin-usize) val = 16384
* yield\_after\_writing: [USize](builtin-usize) val = 16384

 #### Returns

 * [TCPConnection](index) tag^

 ### ip6

 [[Source]](https://stdlib.ponylang.io/src/net/tcp_connection/#L361)

 Connect via IPv6.

 
```
new tag ip6(
  auth: (AmbientAuth val | NetAuth val | TCPAuth val | 
    TCPConnectAuth val),
  notify: TCPConnectionNotify iso,
  host: String val,
  service: String val,
  from: String val = "",
  read_buffer_size: USize val = 16384,
  yield_after_reading: USize val = 16384,
  yield_after_writing: USize val = 16384)
: TCPConnection tag^

```
 #### Parameters

 * auth: ([AmbientAuth](builtin-ambientauth) val | [NetAuth](net-netauth) val | [TCPAuth](net-tcpauth) val | [TCPConnectAuth](net-tcpconnectauth) val)
* notify: [TCPConnectionNotify](net-tcpconnectionnotify) iso
* host: [String](builtin-string) val
* service: [String](builtin-string) val
* from: [String](builtin-string) val = ""
* read\_buffer\_size: [USize](builtin-usize) val = 16384
* yield\_after\_reading: [USize](builtin-usize) val = 16384
* yield\_after\_writing: [USize](builtin-usize) val = 16384

 #### Returns

 * [TCPConnection](index) tag^

 Public Behaviours
-----------------

 ### write

 [[Source]](https://stdlib.ponylang.io/src/net/tcp_connection/#L429)

 Write a single sequence of bytes. Data will be silently discarded if the connection has not yet been established though.

 
```
be write(
  data: (String val | Array[U8 val] val))

```
 #### Parameters

 * data: ([String](builtin-string) val | [Array](builtin-array)[[U8](builtin-u8) val] val)

 ### writev

 [[Source]](https://stdlib.ponylang.io/src/net/tcp_connection/#L440)

 Write a sequence of sequences of bytes. Data will be silently discarded if the connection has not yet been established though.

 
```
be writev(
  data: ByteSeqIter val)

```
 #### Parameters

 * data: [ByteSeqIter](builtin-byteseqiter) val

 ### mute

 [[Source]](https://stdlib.ponylang.io/src/net/tcp_connection/#L497)

 Temporarily suspend reading off this TCPConnection until such time as `unmute` is called.

 
```
be mute()

```
 ### unmute

 [[Source]](https://stdlib.ponylang.io/src/net/tcp_connection/#L504)

 Start reading off this TCPConnection again after having been muted.

 
```
be unmute()

```
 ### set\_notify

 [[Source]](https://stdlib.ponylang.io/src/net/tcp_connection/#L513)

 Change the notifier.

 
```
be set_notify(
  notify: TCPConnectionNotify iso)

```
 #### Parameters

 * notify: [TCPConnectionNotify](net-tcpconnectionnotify) iso

 ### dispose

 [[Source]](https://stdlib.ponylang.io/src/net/tcp_connection/#L519)

 Close the connection gracefully once all writes are sent.

 
```
be dispose()

```
 Public Functions
----------------

 ### local\_address

 [[Source]](https://stdlib.ponylang.io/src/net/tcp_connection/#L525)

 Return the local IP address. If this TCPConnection is closed then the address returned is invalid.

 
```
fun box local_address()
: NetAddress val

```
 #### Returns

 * [NetAddress](net-netaddress) val

 ### remote\_address

 [[Source]](https://stdlib.ponylang.io/src/net/tcp_connection/#L534)

 Return the remote IP address. If this TCPConnection is closed then the address returned is invalid.

 
```
fun box remote_address()
: NetAddress val

```
 #### Returns

 * [NetAddress](net-netaddress) val

 ### expect

 [[Source]](https://stdlib.ponylang.io/src/net/tcp_connection/#L543)

 A `received` call on the notifier must contain exactly `qty` bytes. If `qty` is zero, the call can contain any amount of data. This has no effect if called in the `sent` notifier callback.

 Errors if `qty` exceeds the max buffer size as indicated by the `read_buffer_size` supplied when the connection was created.

 
```
fun ref expect(
  qty: USize val = 0)
: None val ?

```
 #### Parameters

 * qty: [USize](builtin-usize) val = 0

 #### Returns

 * [None](builtin-none) val ?

 ### set\_nodelay

 [[Source]](https://stdlib.ponylang.io/src/net/tcp_connection/#L562)

 Turn Nagle on/off. Defaults to on. This can only be set on a connected socket.

 
```
fun ref set_nodelay(
  state: Bool val)
: None val

```
 #### Parameters

 * state: [Bool](builtin-bool) val

 #### Returns

 * [None](builtin-none) val

 ### set\_keepalive

 [[Source]](https://stdlib.ponylang.io/src/net/tcp_connection/#L571)

 Sets the TCP keepalive timeout to approximately `secs` seconds. Exact timing is OS dependent. If `secs` is zero, TCP keepalive is disabled. TCP keepalive is disabled by default. This can only be set on a connected socket.

 
```
fun ref set_keepalive(
  secs: U32 val)
: None val

```
 #### Parameters

 * secs: [U32](builtin-u32) val

 #### Returns

 * [None](builtin-none) val

 ### write\_final

 [[Source]](https://stdlib.ponylang.io/src/net/tcp_connection/#L673)

 Write as much as possible to the socket. Set `_writeable` to `false` if not everything was written. On an error, close the connection. This is for data that has already been transformed by the notifier. Data will be silently discarded if the connection has not yet been established though.

 
```
fun ref write_final(
  data: (String val | Array[U8 val] val))
: None val

```
 #### Parameters

 * data: ([String](builtin-string) val | [Array](builtin-array)[[U8](builtin-u8) val] val)

 #### Returns

 * [None](builtin-none) val

 ### close

 [[Source]](https://stdlib.ponylang.io/src/net/tcp_connection/#L1017)

 Attempt to perform a graceful shutdown. Don't accept new writes. If the connection isn't muted then we won't finish closing until we get a zero length read. If the connection is muted, perform a hard close and shut down immediately.

 
```
fun ref close()
: None val

```
 #### Returns

 * [None](builtin-none) val

 ### hard\_close

 [[Source]](https://stdlib.ponylang.io/src/net/tcp_connection/#L1073)

 When an error happens, do a non-graceful close.

 
```
fun ref hard_close()
: None val

```
 #### Returns

 * [None](builtin-none) val

 ### getsockopt

 [[Source]](https://stdlib.ponylang.io/src/net/tcp_connection/#L1139)

 General wrapper for TCP sockets to the `getsockopt(2)` system call.

 The caller must provide an array that is pre-allocated to be at least as large as the largest data structure that the kernel may return for the requested option.

 In case of system call success, this function returns the 2-tuple: 1. The integer `0`. 2. An `Array[U8]` of data returned by the system call's `void *` 4th argument. Its size is specified by the kernel via the system call's `sockopt_len_t *` 5th argument.

 In case of system call failure, this function returns the 2-tuple: 1. The value of `errno`. 2. An undefined value that must be ignored.

 Usage example:

 
```
// connected() is a callback function for class TCPConnectionNotify
fun ref connected(conn: TCPConnection ref) =>
  match conn.getsockopt(OSSockOpt.sol_socket(), OSSockOpt.so_rcvbuf(), 4)
    | (0, let gbytes: Array[U8] iso) =>
      try
        let br = Reader.create().>append(consume gbytes)
        ifdef littleendian then
          let buffer_size = br.u32_le()?
        else
          let buffer_size = br.u32_be()?
        end
      end
    | (let errno: U32, _) =>
      // System call failed
  end

```
 
```
fun ref getsockopt(
  level: I32 val,
  option_name: I32 val,
  option_max_size: USize val = 4)
: (U32 val , Array[U8 val] iso^)

```
 #### Parameters

 * level: [I32](builtin-i32) val
* option\_name: [I32](builtin-i32) val
* option\_max\_size: [USize](builtin-usize) val = 4

 #### Returns

 * ([U32](builtin-u32) val , [Array](builtin-array)[[U8](builtin-u8) val] iso^)

 ### getsockopt\_u32

 [[Source]](https://stdlib.ponylang.io/src/net/tcp_connection/#L1180)

 Wrapper for TCP sockets to the `getsockopt(2)` system call where the kernel's returned option value is a C `uint32_t` type / Pony type `U32`.

 In case of system call success, this function returns the 2-tuple: 1. The integer `0`. 2. The `*option_value` returned by the kernel converted to a Pony `U32`.

 In case of system call failure, this function returns the 2-tuple: 1. The value of `errno`. 2. An undefined value that must be ignored.

 
```
fun ref getsockopt_u32(
  level: I32 val,
  option_name: I32 val)
: (U32 val , U32 val)

```
 #### Parameters

 * level: [I32](builtin-i32) val
* option\_name: [I32](builtin-i32) val

 #### Returns

 * ([U32](builtin-u32) val , [U32](builtin-u32) val)

 ### setsockopt

 [[Source]](https://stdlib.ponylang.io/src/net/tcp_connection/#L1196)

 General wrapper for TCP sockets to the `setsockopt(2)` system call.

 The caller is responsible for the correct size and byte contents of the `option` array for the requested `level` and `option_name`, including using the appropriate machine endian byte order.

 This function returns `0` on success, else the value of `errno` on failure.

 Usage example:

 
```
// connected() is a callback function for class TCPConnectionNotify
fun ref connected(conn: TCPConnection ref) =>
  let sb = Writer

  sb.u32_le(7744)             // Our desired socket buffer size
  let sbytes = Array[U8]
  for bs in sb.done().values() do
    sbytes.append(bs)
  end
  match conn.setsockopt(OSSockOpt.sol_socket(), OSSockOpt.so_rcvbuf(), sbytes)
    | 0 =>
      // System call was successful
    | let errno: U32 =>
      // System call failed
  end

```
 
```
fun ref setsockopt(
  level: I32 val,
  option_name: I32 val,
  option: Array[U8 val] ref)
: U32 val

```
 #### Parameters

 * level: [I32](builtin-i32) val
* option\_name: [I32](builtin-i32) val
* option: [Array](builtin-array)[[U8](builtin-u8) val] ref

 #### Returns

 * [U32](builtin-u32) val

 ### setsockopt\_u32

 [[Source]](https://stdlib.ponylang.io/src/net/tcp_connection/#L1229)

 General wrapper for TCP sockets to the `setsockopt(2)` system call where the kernel expects an option value of a C `uint32_t` type / Pony type `U32`.

 This function returns `0` on success, else the value of `errno` on failure.

 
```
fun ref setsockopt_u32(
  level: I32 val,
  option_name: I32 val,
  option: U32 val)
: U32 val

```
 #### Parameters

 * level: [I32](builtin-i32) val
* option\_name: [I32](builtin-i32) val
* option: [U32](builtin-u32) val

 #### Returns

 * [U32](builtin-u32) val

 ### get\_so\_error

 [[Source]](https://stdlib.ponylang.io/src/net/tcp_connection/#L1241)

 Wrapper for the FFI call `getsockopt(fd, SOL_SOCKET, SO_ERROR, ...)`

 
```
fun ref get_so_error()
: (U32 val , U32 val)

```
 #### Returns

 * ([U32](builtin-u32) val , [U32](builtin-u32) val)

 ### get\_so\_rcvbuf

 [[Source]](https://stdlib.ponylang.io/src/net/tcp_connection/#L1247)

 Wrapper for the FFI call `getsockopt(fd, SOL_SOCKET, SO_RCVBUF, ...)`

 
```
fun ref get_so_rcvbuf()
: (U32 val , U32 val)

```
 #### Returns

 * ([U32](builtin-u32) val , [U32](builtin-u32) val)

 ### get\_so\_sndbuf

 [[Source]](https://stdlib.ponylang.io/src/net/tcp_connection/#L1253)

 Wrapper for the FFI call `getsockopt(fd, SOL_SOCKET, SO_SNDBUF, ...)`

 
```
fun ref get_so_sndbuf()
: (U32 val , U32 val)

```
 #### Returns

 * ([U32](builtin-u32) val , [U32](builtin-u32) val)

 ### get\_tcp\_nodelay

 [[Source]](https://stdlib.ponylang.io/src/net/tcp_connection/#L1259)

 Wrapper for the FFI call `getsockopt(fd, SOL_SOCKET, TCP_NODELAY, ...)`

 
```
fun ref get_tcp_nodelay()
: (U32 val , U32 val)

```
 #### Returns

 * ([U32](builtin-u32) val , [U32](builtin-u32) val)

 ### set\_so\_rcvbuf

 [[Source]](https://stdlib.ponylang.io/src/net/tcp_connection/#L1266)

 Wrapper for the FFI call `setsockopt(fd, SOL_SOCKET, SO_RCVBUF, ...)`

 
```
fun ref set_so_rcvbuf(
  bufsize: U32 val)
: U32 val

```
 #### Parameters

 * bufsize: [U32](builtin-u32) val

 #### Returns

 * [U32](builtin-u32) val

 ### set\_so\_sndbuf

 [[Source]](https://stdlib.ponylang.io/src/net/tcp_connection/#L1272)

 Wrapper for the FFI call `setsockopt(fd, SOL_SOCKET, SO_SNDBUF, ...)`

 
```
fun ref set_so_sndbuf(
  bufsize: U32 val)
: U32 val

```
 #### Parameters

 * bufsize: [U32](builtin-u32) val

 #### Returns

 * [U32](builtin-u32) val

 ### set\_tcp\_nodelay

 [[Source]](https://stdlib.ponylang.io/src/net/tcp_connection/#L1278)

 Wrapper for the FFI call `setsockopt(fd, SOL_SOCKET, TCP_NODELAY, ...)`

 
```
fun ref set_tcp_nodelay(
  state: Bool val)
: U32 val

```
 #### Parameters

 * state: [Bool](builtin-bool) val

 #### Returns

 * [U32](builtin-u32) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/net-TCPConnection>

NetAddress
==========

 [[Source]](https://stdlib.ponylang.io/src/net/net_address/#L1)

 Represents an IPv4 or IPv6 address. The family field indicates the address type. The addr field is either the IPv4 address or the IPv6 flow info. The addr1-4 fields are the IPv6 address, or invalid for an IPv4 address. The scope field is the IPv6 scope, or invalid for an IPv4 address.

 This class is modelled after the C data structure for holding socket addresses for both IPv4 and IPv6 `sockaddr_storage`.

 Use the `name` method to obtain address/hostname and port/service as Strings.

 
```
class val NetAddress is
  Equatable[NetAddress val] ref

```
 #### Implements

 * [Equatable](builtin-equatable)[[NetAddress](index) val] ref

 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/net/net_address/#L1)

 
```
new iso create()
: NetAddress iso^

```
 #### Returns

 * [NetAddress](index) iso^

 Public Functions
----------------

 ### ip4

 [[Source]](https://stdlib.ponylang.io/src/net/net_address/#L55)

 Returns true for an IPv4 address.

 
```
fun box ip4()
: Bool val

```
 #### Returns

 * [Bool](builtin-bool) val

 ### ip6

 [[Source]](https://stdlib.ponylang.io/src/net/net_address/#L61)

 Returns true for an IPv6 address.

 
```
fun box ip6()
: Bool val

```
 #### Returns

 * [Bool](builtin-bool) val

 ### name

 [[Source]](https://stdlib.ponylang.io/src/net/net_address/#L67)

 Returns the host and service name.

 If `reversedns` is an instance of `DNSLookupAuth` a DNS lookup will be executed and the hostname for this address is returned as first element of the result tuple. If no hostname could be found, an error is raised. If `reversedns` is `None` the plain IP address is given and no DNS lookup is executed.

 If `servicename` is `false` the numeric port is returned as second element of the result tuple. If it is `true` the port is translated into its corresponding servicename (e.g. port 80 is returned as `"http"`).

 Internally this method uses the POSIX C function `getnameinfo`.

 
```
fun box name(
  reversedns: (AmbientAuth val | NetAuth val | DNSAuth val | 
    None val) = reference,
  servicename: Bool val = false)
: (String val , String val) ?

```
 #### Parameters

 * reversedns: ([AmbientAuth](builtin-ambientauth) val | [NetAuth](net-netauth) val | [DNSAuth](net-dnsauth) val | [None](builtin-none) val) = reference
* servicename: [Bool](builtin-bool) val = false

 #### Returns

 * ([String](builtin-string) val , [String](builtin-string) val) ?

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/net/net_address/#L103)

 
```
fun box eq(
  that: NetAddress box)
: Bool val

```
 #### Parameters

 * that: [NetAddress](index) box

 #### Returns

 * [Bool](builtin-bool) val

 ### host\_eq

 [[Source]](https://stdlib.ponylang.io/src/net/net_address/#L109)

 
```
fun box host_eq(
  that: NetAddress box)
: Bool val

```
 #### Parameters

 * that: [NetAddress](index) box

 #### Returns

 * [Bool](builtin-bool) val

 ### length

 [[Source]](https://stdlib.ponylang.io/src/net/net_address/#L119)

 For platforms (OSX/FreeBSD) with `length` field as part of its `struct sockaddr` definition, returns the `length`. Else (Linux/Windows) returns the size of `sockaddr_in` or `sockaddr_in6`.

 
```
fun box length()
: U8 val

```
 #### Returns

 * [U8](builtin-u8) val

 ### family

 [[Source]](https://stdlib.ponylang.io/src/net/net_address/#L136)

 Returns the `family`.

 
```
fun box family()
: U8 val

```
 #### Returns

 * [U8](builtin-u8) val

 ### port

 [[Source]](https://stdlib.ponylang.io/src/net/net_address/#L155)

 Returns port number in host byte order.

 
```
fun box port()
: U16 val

```
 #### Returns

 * [U16](builtin-u16) val

 ### scope

 [[Source]](https://stdlib.ponylang.io/src/net/net_address/#L161)

 Returns IPv6 scope identifier: Unicast, Anycast, Multicast and unassigned scopes.

 
```
fun box scope()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### ipv4\_addr

 [[Source]](https://stdlib.ponylang.io/src/net/net_address/#L169)

 Returns IPV4 address (`_addr` field in the class) if `ip4()` is `True`. If `ip4()` is `False` then the contents are invalid.

 
```
fun box ipv4_addr()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### ipv6\_addr

 [[Source]](https://stdlib.ponylang.io/src/net/net_address/#L176)

 Returns IPV6 address as the 4-tuple (say `a`). `a._1 = _addr1` // Bits 0-32 of the IPv6 address in host byte order. `a._2 = _addr2 // Bits 33-64 of the IPv6 address in host byte order.`a.\_3 = \_addr3 // Bits 65-96 of the IPv6 address in host byte order. `a.\_4 = \_addr4 // Bits 97-128 of the IPv6 address in host byte order.

 The contents of the 4-tuple returned are valid only if `ip6()` is `True`.

 
```
fun box ipv6_addr()
: (U32 val , U32 val , U32 val , 
    U32 val)

```
 #### Returns

 * ([U32](builtin-u32) val , [U32](builtin-u32) val , [U32](builtin-u32) val , [U32](builtin-u32) val)

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/builtin/compare/#L20)

 
```
fun box ne(
  that: NetAddress val)
: Bool val

```
 #### Parameters

 * that: [NetAddress](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/net-NetAddress>

NetAuth
=======

 [[Source]](https://stdlib.ponylang.io/src/net/auth/#L1)

 
```
primitive val NetAuth

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/net/auth/#L2)

 
```
new val create(
  from: AmbientAuth val)
: NetAuth val^

```
 #### Parameters

 * from: [AmbientAuth](builtin-ambientauth) val

 #### Returns

 * [NetAuth](index) val^

 Public Functions
----------------

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/net/auth/#L2)

 
```
fun box eq(
  that: NetAuth val)
: Bool val

```
 #### Parameters

 * that: [NetAuth](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/net/auth/#L2)

 
```
fun box ne(
  that: NetAuth val)
: Bool val

```
 #### Parameters

 * that: [NetAuth](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/net-NetAuth>

DNSAuth
=======

 [[Source]](https://stdlib.ponylang.io/src/net/auth/#L5)

 
```
primitive val DNSAuth

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/net/auth/#L6)

 
```
new val create(
  from: (AmbientAuth val | NetAuth val))
: DNSAuth val^

```
 #### Parameters

 * from: ([AmbientAuth](builtin-ambientauth) val | [NetAuth](net-netauth) val)

 #### Returns

 * [DNSAuth](index) val^

 Public Functions
----------------

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/net/auth/#L6)

 
```
fun box eq(
  that: DNSAuth val)
: Bool val

```
 #### Parameters

 * that: [DNSAuth](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/net/auth/#L6)

 
```
fun box ne(
  that: DNSAuth val)
: Bool val

```
 #### Parameters

 * that: [DNSAuth](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/net-DNSAuth>

UDPAuth
=======

 [[Source]](https://stdlib.ponylang.io/src/net/auth/#L9)

 
```
primitive val UDPAuth

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/net/auth/#L10)

 
```
new val create(
  from: (AmbientAuth val | NetAuth val))
: UDPAuth val^

```
 #### Parameters

 * from: ([AmbientAuth](builtin-ambientauth) val | [NetAuth](net-netauth) val)

 #### Returns

 * [UDPAuth](index) val^

 Public Functions
----------------

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/net/auth/#L10)

 
```
fun box eq(
  that: UDPAuth val)
: Bool val

```
 #### Parameters

 * that: [UDPAuth](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/net/auth/#L10)

 
```
fun box ne(
  that: UDPAuth val)
: Bool val

```
 #### Parameters

 * that: [UDPAuth](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/net-UDPAuth>

DNS
===

 [[Source]](https://stdlib.ponylang.io/src/net/dns/#L3)

 Helper functions for resolving DNS queries.

 
```
primitive val DNS

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/net/dns/#L3)

 
```
new val create()
: DNS val^

```
 #### Returns

 * [DNS](index) val^

 Public Functions
----------------

 ### apply

 [[Source]](https://stdlib.ponylang.io/src/net/dns/#L7)

 Gets all IPv4 and IPv6 addresses for a host and service.

 
```
fun box apply(
  auth: (AmbientAuth val | NetAuth val | DNSAuth val),
  host: String val,
  service: String val)
: Array[NetAddress val] iso^

```
 #### Parameters

 * auth: ([AmbientAuth](builtin-ambientauth) val | [NetAuth](net-netauth) val | [DNSAuth](net-dnsauth) val)
* host: [String](builtin-string) val
* service: [String](builtin-string) val

 #### Returns

 * [Array](builtin-array)[[NetAddress](net-netaddress) val] iso^

 ### ip4

 [[Source]](https://stdlib.ponylang.io/src/net/dns/#L15)

 Gets all IPv4 addresses for a host and service.

 
```
fun box ip4(
  auth: (AmbientAuth val | NetAuth val | DNSAuth val),
  host: String val,
  service: String val)
: Array[NetAddress val] iso^

```
 #### Parameters

 * auth: ([AmbientAuth](builtin-ambientauth) val | [NetAuth](net-netauth) val | [DNSAuth](net-dnsauth) val)
* host: [String](builtin-string) val
* service: [String](builtin-string) val

 #### Returns

 * [Array](builtin-array)[[NetAddress](net-netaddress) val] iso^

 ### ip6

 [[Source]](https://stdlib.ponylang.io/src/net/dns/#L23)

 Gets all IPv6 addresses for a host and service.

 
```
fun box ip6(
  auth: (AmbientAuth val | NetAuth val | DNSAuth val),
  host: String val,
  service: String val)
: Array[NetAddress val] iso^

```
 #### Parameters

 * auth: ([AmbientAuth](builtin-ambientauth) val | [NetAuth](net-netauth) val | [DNSAuth](net-dnsauth) val)
* host: [String](builtin-string) val
* service: [String](builtin-string) val

 #### Returns

 * [Array](builtin-array)[[NetAddress](net-netaddress) val] iso^

 ### broadcast\_ip4

 [[Source]](https://stdlib.ponylang.io/src/net/dns/#L31)

 Link-local IP4 broadcast address.

 
```
fun box broadcast_ip4(
  auth: (AmbientAuth val | NetAuth val | DNSAuth val),
  service: String val)
: Array[NetAddress val] iso^

```
 #### Parameters

 * auth: ([AmbientAuth](builtin-ambientauth) val | [NetAuth](net-netauth) val | [DNSAuth](net-dnsauth) val)
* service: [String](builtin-string) val

 #### Returns

 * [Array](builtin-array)[[NetAddress](net-netaddress) val] iso^

 ### broadcast\_ip6

 [[Source]](https://stdlib.ponylang.io/src/net/dns/#L39)

 Link-local IP6 broadcast address.

 
```
fun box broadcast_ip6(
  auth: (AmbientAuth val | NetAuth val | DNSAuth val),
  service: String val)
: Array[NetAddress val] iso^

```
 #### Parameters

 * auth: ([AmbientAuth](builtin-ambientauth) val | [NetAuth](net-netauth) val | [DNSAuth](net-dnsauth) val)
* service: [String](builtin-string) val

 #### Returns

 * [Array](builtin-array)[[NetAddress](net-netaddress) val] iso^

 ### is\_ip4

 [[Source]](https://stdlib.ponylang.io/src/net/dns/#L47)

 Returns true if the host is a literal IPv4 address.

 
```
fun box is_ip4(
  host: String val)
: Bool val

```
 #### Parameters

 * host: [String](builtin-string) val

 #### Returns

 * [Bool](builtin-bool) val

 ### is\_ip6

 [[Source]](https://stdlib.ponylang.io/src/net/dns/#L53)

 Returns true if the host is a literal IPv6 address.

 
```
fun box is_ip6(
  host: String val)
: Bool val

```
 #### Parameters

 * host: [String](builtin-string) val

 #### Returns

 * [Bool](builtin-bool) val

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/net/dns/#L7)

 
```
fun box eq(
  that: DNS val)
: Bool val

```
 #### Parameters

 * that: [DNS](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/net/dns/#L7)

 
```
fun box ne(
  that: DNS val)
: Bool val

```
 #### Parameters

 * that: [DNS](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/net-DNS>

Info
====

 [[Source]](https://stdlib.ponylang.io/src/logger/logger/#L101)

 
```
primitive val Info

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/logger/logger/#L101)

 
```
new val create()
: Info val^

```
 #### Returns

 * [Info](index) val^

 Public Functions
----------------

 ### apply

 [[Source]](https://stdlib.ponylang.io/src/logger/logger/#L102)

 
```
fun box apply()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/logger/logger/#L102)

 
```
fun box eq(
  that: Info val)
: Bool val

```
 #### Parameters

 * that: [Info](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/logger/logger/#L102)

 
```
fun box ne(
  that: Info val)
: Bool val

```
 #### Parameters

 * that: [Info](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/logger-Info>

TCPListenAuth
=============

 [[Source]](https://stdlib.ponylang.io/src/net/auth/#L17)

 
```
primitive val TCPListenAuth

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/net/auth/#L18)

 
```
new val create(
  from: (AmbientAuth val | NetAuth val | TCPAuth val))
: TCPListenAuth val^

```
 #### Parameters

 * from: ([AmbientAuth](builtin-ambientauth) val | [NetAuth](net-netauth) val | [TCPAuth](net-tcpauth) val)

 #### Returns

 * [TCPListenAuth](index) val^

 Public Functions
----------------

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/net/auth/#L18)

 
```
fun box eq(
  that: TCPListenAuth val)
: Bool val

```
 #### Parameters

 * that: [TCPListenAuth](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/net/auth/#L18)

 
```
fun box ne(
  that: TCPListenAuth val)
: Bool val

```
 #### Parameters

 * that: [TCPListenAuth](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/net-TCPListenAuth>

Error
=====

 [[Source]](https://stdlib.ponylang.io/src/logger/logger/#L107)

 
```
primitive val Error

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/logger/logger/#L107)

 
```
new val create()
: Error val^

```
 #### Returns

 * [Error](index) val^

 Public Functions
----------------

 ### apply

 [[Source]](https://stdlib.ponylang.io/src/logger/logger/#L108)

 
```
fun box apply()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/logger/logger/#L108)

 
```
fun box eq(
  that: Error val)
: Bool val

```
 #### Parameters

 * that: [Error](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/logger/logger/#L108)

 
```
fun box ne(
  that: Error val)
: Bool val

```
 #### Parameters

 * that: [Error](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/logger-Error>

Fine
====

 [[Source]](https://stdlib.ponylang.io/src/logger/logger/#L98)

 
```
primitive val Fine

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/logger/logger/#L98)

 
```
new val create()
: Fine val^

```
 #### Returns

 * [Fine](index) val^

 Public Functions
----------------

 ### apply

 [[Source]](https://stdlib.ponylang.io/src/logger/logger/#L99)

 
```
fun box apply()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/logger/logger/#L99)

 
```
fun box eq(
  that: Fine val)
: Bool val

```
 #### Parameters

 * that: [Fine](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/logger/logger/#L99)

 
```
fun box ne(
  that: Fine val)
: Bool val

```
 #### Parameters

 * that: [Fine](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/logger-Fine>

StringLogger
============

 [[Source]](https://stdlib.ponylang.io/src/logger/logger/#L134)

 
```
primitive val StringLogger

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/logger/logger/#L134)

 
```
new val create()
: StringLogger val^

```
 #### Returns

 * [StringLogger](index) val^

 Public Functions
----------------

 ### apply

 [[Source]](https://stdlib.ponylang.io/src/logger/logger/#L135)

 
```
fun box apply(
  level: (Fine val | Info val | Warn val | 
    Error val),
  out: OutStream tag,
  formatter: LogFormatter val = reference)
: Logger[String val] val

```
 #### Parameters

 * level: ([Fine](logger-fine) val | [Info](logger-info) val | [Warn](logger-warn) val | [Error](logger-error) val)
* out: [OutStream](builtin-outstream) tag
* formatter: [LogFormatter](logger-logformatter) val = reference

 #### Returns

 * [Logger](logger-logger)[[String](builtin-string) val] val

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/logger/logger/#L135)

 
```
fun box eq(
  that: StringLogger val)
: Bool val

```
 #### Parameters

 * that: [StringLogger](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/logger/logger/#L135)

 
```
fun box ne(
  that: StringLogger val)
: Bool val

```
 #### Parameters

 * that: [StringLogger](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/logger-StringLogger>

TCPConnectAuth
==============

 [[Source]](https://stdlib.ponylang.io/src/net/auth/#L21)

 
```
primitive val TCPConnectAuth

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/net/auth/#L22)

 
```
new val create(
  from: (AmbientAuth val | NetAuth val | TCPAuth val))
: TCPConnectAuth val^

```
 #### Parameters

 * from: ([AmbientAuth](builtin-ambientauth) val | [NetAuth](net-netauth) val | [TCPAuth](net-tcpauth) val)

 #### Returns

 * [TCPConnectAuth](index) val^

 Public Functions
----------------

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/net/auth/#L22)

 
```
fun box eq(
  that: TCPConnectAuth val)
: Bool val

```
 #### Parameters

 * that: [TCPConnectAuth](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/net/auth/#L22)

 
```
fun box ne(
  that: TCPConnectAuth val)
: Bool val

```
 #### Parameters

 * that: [TCPConnectAuth](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/net-TCPConnectAuth>

Logger[A: A]
============

 [[Source]](https://stdlib.ponylang.io/src/logger/logger/#L110)

 
```
class val Logger[A: A]

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/logger/logger/#L116)

 
```
new val create(
  level: (Fine val | Info val | Warn val | 
    Error val),
  out: OutStream tag,
  f: {(A): String}[A] val,
  formatter: LogFormatter val = reference)
: Logger[A] val^

```
 #### Parameters

 * level: ([Fine](logger-fine) val | [Info](logger-info) val | [Warn](logger-warn) val | [Error](logger-error) val)
* out: [OutStream](builtin-outstream) tag
* f: {(A): String}[A] val
* formatter: [LogFormatter](logger-logformatter) val = reference

 #### Returns

 * [Logger](index)[A] val^

 Public Functions
----------------

 ### apply

 [[Source]](https://stdlib.ponylang.io/src/logger/logger/#L127)

 
```
fun box apply(
  level: (Fine val | Info val | Warn val | 
    Error val))
: Bool val

```
 #### Parameters

 * level: ([Fine](logger-fine) val | [Info](logger-info) val | [Warn](logger-warn) val | [Error](logger-error) val)

 #### Returns

 * [Bool](builtin-bool) val

 ### log

 [[Source]](https://stdlib.ponylang.io/src/logger/logger/#L130)

 
```
fun box log(
  value: A,
  loc: SourceLoc val = __loc)
: Bool val

```
 #### Parameters

 * value: A
* loc: [SourceLoc](builtin-sourceloc) val = \_\_loc

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/logger-Logger>

LogLevel
========

 [[Source]](https://stdlib.ponylang.io/src/logger/logger/#L91)

 
```
type LogLevel is
  (Fine val | Info val | Warn val | Error val)

```
 #### Type Alias For

 * ([Fine](logger-fine) val | [Info](logger-info) val | [Warn](logger-warn) val | [Error](logger-error) val)



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/logger-LogLevel>

Warn
====

 [[Source]](https://stdlib.ponylang.io/src/logger/logger/#L104)

 
```
primitive val Warn

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/logger/logger/#L104)

 
```
new val create()
: Warn val^

```
 #### Returns

 * [Warn](index) val^

 Public Functions
----------------

 ### apply

 [[Source]](https://stdlib.ponylang.io/src/logger/logger/#L105)

 
```
fun box apply()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/logger/logger/#L105)

 
```
fun box eq(
  that: Warn val)
: Bool val

```
 #### Parameters

 * that: [Warn](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/logger/logger/#L105)

 
```
fun box ne(
  that: Warn val)
: Bool val

```
 #### Parameters

 * that: [Warn](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/logger-Warn>

Serialise
=========

 [[Source]](https://stdlib.ponylang.io/src/serialise/serialise/#L30)

 
```
primitive val Serialise

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/serialise/serialise/#L30)

 
```
new val create()
: Serialise val^

```
 #### Returns

 * [Serialise](index) val^

 Public Functions
----------------

 ### signature

 [[Source]](https://stdlib.ponylang.io/src/serialise/serialise/#L31)

 Returns a byte array that is unique to this compiled Pony binary, for the purposes of comparing before deserialising any data from that source. It is statistically impossible for two serialisation-incompatible Pony binaries to have the same serialise signature.

 
```
fun box signature()
: Array[U8 val] val

```
 #### Returns

 * [Array](builtin-array)[[U8](builtin-u8) val] val

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/serialise/serialise/#L31)

 
```
fun box eq(
  that: Serialise val)
: Bool val

```
 #### Parameters

 * that: [Serialise](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/serialise/serialise/#L31)

 
```
fun box ne(
  that: Serialise val)
: Bool val

```
 #### Parameters

 * that: [Serialise](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/serialise-Serialise>

SerialiseAuth
=============

 [[Source]](https://stdlib.ponylang.io/src/serialise/serialise/#L40)

 This is a capability that allows the holder to serialise objects. It does not allow the holder to examine serialised data or to deserialise objects.

 
```
primitive val SerialiseAuth

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/serialise/serialise/#L45)

 
```
new val create(
  auth: AmbientAuth val)
: SerialiseAuth val^

```
 #### Parameters

 * auth: [AmbientAuth](builtin-ambientauth) val

 #### Returns

 * [SerialiseAuth](index) val^

 Public Functions
----------------

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/serialise/serialise/#L45)

 
```
fun box eq(
  that: SerialiseAuth val)
: Bool val

```
 #### Parameters

 * that: [SerialiseAuth](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/serialise/serialise/#L45)

 
```
fun box ne(
  that: SerialiseAuth val)
: Bool val

```
 #### Parameters

 * that: [SerialiseAuth](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/serialise-SerialiseAuth>

DefaultLogFormatter
===================

 [[Source]](https://stdlib.ponylang.io/src/logger/logger/#L154)

 
```
primitive val DefaultLogFormatter is
  LogFormatter val

```
 #### Implements

 * [LogFormatter](logger-logformatter) val

 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/logger/logger/#L154)

 
```
new val create()
: DefaultLogFormatter val^

```
 #### Returns

 * [DefaultLogFormatter](index) val^

 Public Functions
----------------

 ### apply

 [[Source]](https://stdlib.ponylang.io/src/logger/logger/#L155)

 
```
fun box apply(
  msg: String val,
  loc: SourceLoc val)
: String val

```
 #### Parameters

 * msg: [String](builtin-string) val
* loc: [SourceLoc](builtin-sourceloc) val

 #### Returns

 * [String](builtin-string) val

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/logger/logger/#L155)

 
```
fun box eq(
  that: DefaultLogFormatter val)
: Bool val

```
 #### Parameters

 * that: [DefaultLogFormatter](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/logger/logger/#L155)

 
```
fun box ne(
  that: DefaultLogFormatter val)
: Bool val

```
 #### Parameters

 * that: [DefaultLogFormatter](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/logger-DefaultLogFormatter>

OutputSerialisedAuth
====================

 [[Source]](https://stdlib.ponylang.io/src/serialise/serialise/#L56)

 This is a capability token that allows the holder to examine serialised data. This should only be provided to types that need to write serialised data to some output stream, such as a file or socket. A type with the SerialiseAuth capability should usually not also have OutputSerialisedAuth, as the combination gives the holder the ability to examine the bitwise contents of any object it has a reference to.

 
```
primitive val OutputSerialisedAuth

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/serialise/serialise/#L65)

 
```
new val create(
  auth: AmbientAuth val)
: OutputSerialisedAuth val^

```
 #### Parameters

 * auth: [AmbientAuth](builtin-ambientauth) val

 #### Returns

 * [OutputSerialisedAuth](index) val^

 Public Functions
----------------

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/serialise/serialise/#L65)

 
```
fun box eq(
  that: OutputSerialisedAuth val)
: Bool val

```
 #### Parameters

 * that: [OutputSerialisedAuth](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/serialise/serialise/#L65)

 
```
fun box ne(
  that: OutputSerialisedAuth val)
: Bool val

```
 #### Parameters

 * that: [OutputSerialisedAuth](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/serialise-OutputSerialisedAuth>

ProcessNotify
=============

 [[Source]](https://stdlib.ponylang.io/src/process/process_notify/#L1)

 Notifications for Process connections.

 
```
interface ref ProcessNotify

```
 Public Functions
----------------

 ### created

 [[Source]](https://stdlib.ponylang.io/src/process/process_notify/#L6)

 ProcessMonitor calls this when it is created.

 
```
fun ref created(
  process: ProcessMonitor ref)
: None val

```
 #### Parameters

 * process: [ProcessMonitor](process-processmonitor) ref

 #### Returns

 * [None](builtin-none) val

 ### stdout

 [[Source]](https://stdlib.ponylang.io/src/process/process_notify/#L11)

 ProcessMonitor calls this when new data is received on STDOUT of the forked process

 
```
fun ref stdout(
  process: ProcessMonitor ref,
  data: Array[U8 val] iso)
: None val

```
 #### Parameters

 * process: [ProcessMonitor](process-processmonitor) ref
* data: [Array](builtin-array)[[U8](builtin-u8) val] iso

 #### Returns

 * [None](builtin-none) val

 ### stderr

 [[Source]](https://stdlib.ponylang.io/src/process/process_notify/#L17)

 ProcessMonitor calls this when new data is received on STDERR of the forked process

 
```
fun ref stderr(
  process: ProcessMonitor ref,
  data: Array[U8 val] iso)
: None val

```
 #### Parameters

 * process: [ProcessMonitor](process-processmonitor) ref
* data: [Array](builtin-array)[[U8](builtin-u8) val] iso

 #### Returns

 * [None](builtin-none) val

 ### failed

 [[Source]](https://stdlib.ponylang.io/src/process/process_notify/#L23)

 ProcessMonitor calls this if we run into errors communicating with the forked process.

 
```
fun ref failed(
  process: ProcessMonitor ref,
  err: ProcessError val)
: None val

```
 #### Parameters

 * process: [ProcessMonitor](process-processmonitor) ref
* err: [ProcessError](process-processerror) val

 #### Returns

 * [None](builtin-none) val

 ### expect

 [[Source]](https://stdlib.ponylang.io/src/process/process_notify/#L29)

 Called when the process monitor has been told to expect a certain quantity of bytes. This allows nested notifiers to change the expected quantity, which allows a lower level protocol to handle any framing.

 
```
fun ref expect(
  process: ProcessMonitor ref,
  qty: USize val)
: USize val

```
 #### Parameters

 * process: [ProcessMonitor](process-processmonitor) ref
* qty: [USize](builtin-usize) val

 #### Returns

 * [USize](builtin-usize) val

 ### dispose

 [[Source]](https://stdlib.ponylang.io/src/process/process_notify/#L37)

 Call when ProcessMonitor terminates to cleanup ProcessNotify. We return the exit status of the child process, it can be either an instance of [Exited](process-exited) if the process finished. The childs exit code can be retrieved using [Exited.exit\_code()](process-exited#exit_code).

 On Posix systems, if the process has been killed by a signal (e.g. through the `kill` command), `child_exit_status` will be an instance of [Signaled](process-signaled) with the signal number that terminated the process available via [Signaled.signal()](process-signaled#signal).

 
```
fun ref dispose(
  process: ProcessMonitor ref,
  child_exit_status: (Exited val | Signaled val))
: None val

```
 #### Parameters

 * process: [ProcessMonitor](process-processmonitor) ref
* child\_exit\_status: ([Exited](process-exited) val | [Signaled](process-signaled) val)

 #### Returns

 * [None](builtin-none) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/process-ProcessNotify>

LogFormatter
============

 [[Source]](https://stdlib.ponylang.io/src/logger/logger/#L143)

 Interface required to implement custom log formatting.

 * `msg` is the logged message
* `loc` is the location log was called from

 See `DefaultLogFormatter` for an example of how to implement a LogFormatter.

 
```
interface val LogFormatter

```
 Public Functions
----------------

 ### apply

 [[Source]](https://stdlib.ponylang.io/src/logger/logger/#L152)

 
```
fun box apply(
  msg: String val,
  loc: SourceLoc val)
: String val

```
 #### Parameters

 * msg: [String](builtin-string) val
* loc: [SourceLoc](builtin-sourceloc) val

 #### Returns

 * [String](builtin-string) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/logger-LogFormatter>

ProcessErrorType
================

 [[Source]](https://stdlib.ponylang.io/src/process/process_error/#L26)

 
```
type ProcessErrorType is
  (ExecveError val | PipeError val | ForkError val | WaitpidError val | WriteError val | KillError val | CapError val | ChdirError val | UnknownError val)

```
 #### Type Alias For

 * ([ExecveError](process-execveerror) val | [PipeError](process-pipeerror) val | [ForkError](process-forkerror) val | [WaitpidError](process-waitpiderror) val | [WriteError](process-writeerror) val | [KillError](process-killerror) val | [CapError](process-caperror) val | [ChdirError](process-chdirerror) val | [UnknownError](process-unknownerror) val)



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/process-ProcessErrorType>

InputSerialisedAuth
===================

 [[Source]](https://stdlib.ponylang.io/src/serialise/serialise/#L68)

 This is a capability token that allows the holder to treat data arbitrary bytes as serialised data. This is the most dangerous capability, as currently it is possible for a malformed chunk of data to crash your program if it is deserialised.

 
```
primitive val InputSerialisedAuth

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/serialise/serialise/#L75)

 
```
new val create(
  auth: AmbientAuth val)
: InputSerialisedAuth val^

```
 #### Parameters

 * auth: [AmbientAuth](builtin-ambientauth) val

 #### Returns

 * [InputSerialisedAuth](index) val^

 Public Functions
----------------

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/serialise/serialise/#L75)

 
```
fun box eq(
  that: InputSerialisedAuth val)
: Bool val

```
 #### Parameters

 * that: [InputSerialisedAuth](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/serialise/serialise/#L75)

 
```
fun box ne(
  that: InputSerialisedAuth val)
: Bool val

```
 #### Parameters

 * that: [InputSerialisedAuth](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/serialise-InputSerialisedAuth>

Serialised
==========

 [[Source]](https://stdlib.ponylang.io/src/serialise/serialise/#L78)

 This represents serialised data. How it can be used depends on the other capabilities a caller holds.

 
```
class val Serialised

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/serialise/serialise/#L85)

 A caller with SerialiseAuth can create serialised data from any object.

 
```
new ref create(
  auth: SerialiseAuth val,
  data: Any box)
: Serialised ref^ ?

```
 #### Parameters

 * auth: [SerialiseAuth](serialise-serialiseauth) val
* data: [Any](builtin-any) box

 #### Returns

 * [Serialised](index) ref^ ?

 ### input

 [[Source]](https://stdlib.ponylang.io/src/serialise/serialise/#L99)

 A caller with InputSerialisedAuth can create serialised data from any arbitrary set of bytes. It is the caller's responsibility to ensure that the data is in fact well-formed serialised data. This is currently the most dangerous method, as there is currently no way to check validity at runtime.

 
```
new ref input(
  auth: InputSerialisedAuth val,
  data: Array[U8 val] val)
: Serialised ref^

```
 #### Parameters

 * auth: [InputSerialisedAuth](serialise-inputserialisedauth) val
* data: [Array](builtin-array)[[U8](builtin-u8) val] val

 #### Returns

 * [Serialised](index) ref^

 Public Functions
----------------

 ### apply

 [[Source]](https://stdlib.ponylang.io/src/serialise/serialise/#L109)

 A caller with DeserialiseAuth can create an object graph from serialised data.

 
```
fun box apply(
  auth: DeserialiseAuth val)
: Any iso^ ?

```
 #### Parameters

 * auth: [DeserialiseAuth](serialise-deserialiseauth) val

 #### Returns

 * [Any](builtin-any) iso^ ?

 ### output

 [[Source]](https://stdlib.ponylang.io/src/serialise/serialise/#L126)

 A caller with OutputSerialisedAuth can gain access to the underlying bytes that contain the serialised data. This can be used to write those bytes to, for example, a file or socket.

 
```
fun box output(
  auth: OutputSerialisedAuth val)
: Array[U8 val] val

```
 #### Parameters

 * auth: [OutputSerialisedAuth](serialise-outputserialisedauth) val

 #### Returns

 * [Array](builtin-array)[[U8](builtin-u8) val] val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/serialise-Serialised>

Exited
======

 [[Source]](https://stdlib.ponylang.io/src/process/_process/#L72)

 Process exit status: Process exited with an exit code.

 
```
class val Exited is
  Stringable box,
  Equatable[(Exited val | Signaled val)] ref

```
 #### Implements

 * [Stringable](builtin-stringable) box
* [Equatable](builtin-equatable)[([Exited](index) val | [Signaled](process-signaled) val)] ref

 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/process/_process/#L78)

 
```
new val create(
  code: I32 val)
: Exited val^

```
 #### Parameters

 * code: [I32](builtin-i32) val

 #### Returns

 * [Exited](index) val^

 Public Functions
----------------

 ### exit\_code

 [[Source]](https://stdlib.ponylang.io/src/process/_process/#L81)

 Retrieve the exit code of the exited process.

 
```
fun box exit_code()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### string

 [[Source]](https://stdlib.ponylang.io/src/process/_process/#L87)

 
```
fun box string()
: String iso^

```
 #### Returns

 * [String](builtin-string) iso^

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/process/_process/#L95)

 
```
fun box eq(
  other: (Exited val | Signaled val))
: Bool val

```
 #### Parameters

 * other: ([Exited](index) val | [Signaled](process-signaled) val)

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/builtin/compare/#L20)

 
```
fun box ne(
  that: (Exited val | Signaled val))
: Bool val

```
 #### Parameters

 * that: ([Exited](index) val | [Signaled](process-signaled) val)

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/process-Exited>

DeserialiseAuth
===============

 [[Source]](https://stdlib.ponylang.io/src/serialise/serialise/#L48)

 This is a capability token that allows the holder to deserialise objects. It does not allow the holder to serialise objects or examine serialised.

 
```
primitive val DeserialiseAuth

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/serialise/serialise/#L53)

 
```
new val create(
  auth: AmbientAuth val)
: DeserialiseAuth val^

```
 #### Parameters

 * auth: [AmbientAuth](builtin-ambientauth) val

 #### Returns

 * [DeserialiseAuth](index) val^

 Public Functions
----------------

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/serialise/serialise/#L53)

 
```
fun box eq(
  that: DeserialiseAuth val)
: Bool val

```
 #### Parameters

 * that: [DeserialiseAuth](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/serialise/serialise/#L53)

 
```
fun box ne(
  that: DeserialiseAuth val)
: Bool val

```
 #### Parameters

 * that: [DeserialiseAuth](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/serialise-DeserialiseAuth>

ProcessMonitorAuth
==================

 [[Source]](https://stdlib.ponylang.io/src/process/process_monitor/#L100)

 
```
type ProcessMonitorAuth is
  (AmbientAuth val | StartProcessAuth val)

```
 #### Type Alias For

 * ([AmbientAuth](builtin-ambientauth) val | [StartProcessAuth](process-startprocessauth) val)



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/process-ProcessMonitorAuth>

ForkError
=========

 [[Source]](https://stdlib.ponylang.io/src/process/process_error/#L44)

 
```
primitive val ForkError

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/process/process_error/#L44)

 
```
new val create()
: ForkError val^

```
 #### Returns

 * [ForkError](index) val^

 Public Functions
----------------

 ### string

 [[Source]](https://stdlib.ponylang.io/src/process/process_error/#L45)

 
```
fun box string()
: String iso^

```
 #### Returns

 * [String](builtin-string) iso^

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/process/process_error/#L45)

 
```
fun box eq(
  that: ForkError val)
: Bool val

```
 #### Parameters

 * that: [ForkError](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/process/process_error/#L45)

 
```
fun box ne(
  that: ForkError val)
: Bool val

```
 #### Parameters

 * that: [ForkError](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/process-ForkError>

ExecveError
===========

 [[Source]](https://stdlib.ponylang.io/src/process/process_error/#L38)

 
```
primitive val ExecveError

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/process/process_error/#L38)

 
```
new val create()
: ExecveError val^

```
 #### Returns

 * [ExecveError](index) val^

 Public Functions
----------------

 ### string

 [[Source]](https://stdlib.ponylang.io/src/process/process_error/#L39)

 
```
fun box string()
: String iso^

```
 #### Returns

 * [String](builtin-string) iso^

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/process/process_error/#L39)

 
```
fun box eq(
  that: ExecveError val)
: Bool val

```
 #### Parameters

 * that: [ExecveError](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/process/process_error/#L39)

 
```
fun box ne(
  that: ExecveError val)
: Bool val

```
 #### Parameters

 * that: [ExecveError](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/process-ExecveError>

Signaled
========

 [[Source]](https://stdlib.ponylang.io/src/process/_process/#L103)

 Process exit status: Process was terminated by a signal.

 
```
class val Signaled is
  Stringable box,
  Equatable[(Exited val | Signaled val)] ref

```
 #### Implements

 * [Stringable](builtin-stringable) box
* [Equatable](builtin-equatable)[([Exited](process-exited) val | [Signaled](index) val)] ref

 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/process/_process/#L109)

 
```
new val create(
  sig: U32 val)
: Signaled val^

```
 #### Parameters

 * sig: [U32](builtin-u32) val

 #### Returns

 * [Signaled](index) val^

 Public Functions
----------------

 ### signal

 [[Source]](https://stdlib.ponylang.io/src/process/_process/#L112)

 Retrieve the signal number that exited the process.

 
```
fun box signal()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### string

 [[Source]](https://stdlib.ponylang.io/src/process/_process/#L118)

 
```
fun box string()
: String iso^

```
 #### Returns

 * [String](builtin-string) iso^

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/process/_process/#L126)

 
```
fun box eq(
  other: (Exited val | Signaled val))
: Bool val

```
 #### Parameters

 * other: ([Exited](process-exited) val | [Signaled](index) val)

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/builtin/compare/#L20)

 
```
fun box ne(
  that: (Exited val | Signaled val))
: Bool val

```
 #### Parameters

 * that: ([Exited](process-exited) val | [Signaled](index) val)

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/process-Signaled>

PipeError
=========

 [[Source]](https://stdlib.ponylang.io/src/process/process_error/#L41)

 
```
primitive val PipeError

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/process/process_error/#L41)

 
```
new val create()
: PipeError val^

```
 #### Returns

 * [PipeError](index) val^

 Public Functions
----------------

 ### string

 [[Source]](https://stdlib.ponylang.io/src/process/process_error/#L42)

 
```
fun box string()
: String iso^

```
 #### Returns

 * [String](builtin-string) iso^

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/process/process_error/#L42)

 
```
fun box eq(
  that: PipeError val)
: Bool val

```
 #### Parameters

 * that: [PipeError](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/process/process_error/#L42)

 
```
fun box ne(
  that: PipeError val)
: Bool val

```
 #### Parameters

 * that: [PipeError](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/process-PipeError>

ProcessMonitor
==============

 [[Source]](https://stdlib.ponylang.io/src/process/process_monitor/#L102)

 Fork+execs / creates a child process and monitors it. Notifies a client about STDOUT / STDERR events.

 
```
actor tag ProcessMonitor

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/process/process_monitor/#L128)

 Create infrastructure to communicate with a forked child process and register the asio events. Fork child process and notify our user about incoming data via the notifier.

 
```
new tag create(
  auth: (AmbientAuth val | StartProcessAuth val),
  backpressure_auth: (AmbientAuth val | ApplyReleaseBackpressureAuth val),
  notifier: ProcessNotify iso,
  filepath: FilePath val,
  args: Array[String val] val,
  vars: Array[String val] val,
  wdir: (FilePath val | None val) = reference,
  process_poll_interval: U64 val = call)
: ProcessMonitor tag^

```
 #### Parameters

 * auth: ([AmbientAuth](builtin-ambientauth) val | [StartProcessAuth](process-startprocessauth) val)
* backpressure\_auth: ([AmbientAuth](builtin-ambientauth) val | [ApplyReleaseBackpressureAuth](backpressure-applyreleasebackpressureauth) val)
* notifier: [ProcessNotify](process-processnotify) iso
* filepath: [FilePath](files-filepath) val
* args: [Array](builtin-array)[[String](builtin-string) val] val
* vars: [Array](builtin-array)[[String](builtin-string) val] val
* wdir: ([FilePath](files-filepath) val | [None](builtin-none) val) = reference
* process\_poll\_interval: [U64](builtin-u64) val = call

 #### Returns

 * [ProcessMonitor](index) tag^

 Public Behaviours
-----------------

 ### print

 [[Source]](https://stdlib.ponylang.io/src/process/process_monitor/#L243)

 Print some bytes and append a newline.

 
```
be print(
  data: (String val | Array[U8 val] val))

```
 #### Parameters

 * data: ([String](builtin-string) val | [Array](builtin-array)[[U8](builtin-u8) val] val)

 ### write

 [[Source]](https://stdlib.ponylang.io/src/process/process_monitor/#L252)

 Write to STDIN of the child process.

 
```
be write(
  data: (String val | Array[U8 val] val))

```
 #### Parameters

 * data: ([String](builtin-string) val | [Array](builtin-array)[[U8](builtin-u8) val] val)

 ### printv

 [[Source]](https://stdlib.ponylang.io/src/process/process_monitor/#L260)

 Print an iterable collection of ByteSeqs.

 
```
be printv(
  data: ByteSeqIter val)

```
 #### Parameters

 * data: [ByteSeqIter](builtin-byteseqiter) val

 ### writev

 [[Source]](https://stdlib.ponylang.io/src/process/process_monitor/#L269)

 Write an iterable collection of ByteSeqs.

 
```
be writev(
  data: ByteSeqIter val)

```
 #### Parameters

 * data: [ByteSeqIter](builtin-byteseqiter) val

 ### done\_writing

 [[Source]](https://stdlib.ponylang.io/src/process/process_monitor/#L277)

 Set the \_done\_writing flag to true. If \_pending is empty we can close the \_stdin pipe.

 
```
be done_writing()

```
 ### dispose

 [[Source]](https://stdlib.ponylang.io/src/process/process_monitor/#L288)

 Terminate child and close down everything.

 
```
be dispose()

```
 ### timer\_notify

 [[Source]](https://stdlib.ponylang.io/src/process/process_monitor/#L336)

 Windows IO polling timer has fired

 
```
be timer_notify()

```
 Public Functions
----------------

 ### expect

 [[Source]](https://stdlib.ponylang.io/src/process/process_monitor/#L296)

 A `stdout` call on the notifier must contain exactly `qty` bytes. If `qty` is zero, the call can contain any amount of data.

 
```
fun ref expect(
  qty: USize val = 0)
: None val

```
 #### Parameters

 * qty: [USize](builtin-usize) val = 0

 #### Returns

 * [None](builtin-none) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/process-ProcessMonitor>

ProcessError
============

 [[Source]](https://stdlib.ponylang.io/src/process/process_error/#L1)

 
```
class val ProcessError

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/process/process_error/#L5)

 
```
new val create(
  error_type': (ExecveError val | PipeError val | ForkError val | 
    WaitpidError val | WriteError val | KillError val | 
    CapError val | ChdirError val | UnknownError val),
  message': (String val | None val) = reference)
: ProcessError val^

```
 #### Parameters

 * error\_type': ([ExecveError](process-execveerror) val | [PipeError](process-pipeerror) val | [ForkError](process-forkerror) val | [WaitpidError](process-waitpiderror) val | [WriteError](process-writeerror) val | [KillError](process-killerror) val | [CapError](process-caperror) val | [ChdirError](process-chdirerror) val | [UnknownError](process-unknownerror) val)
* message': ([String](builtin-string) val | [None](builtin-none) val) = reference

 #### Returns

 * [ProcessError](index) val^

 Public fields
-------------

 ### let error\_type: ([ExecveError](process-execveerror) val | [PipeError](process-pipeerror) val | [ForkError](process-forkerror) val |

 
```
[WaitpidError](process-WaitpidError.md) val | [WriteError](process-WriteError.md) val | [KillError](process-KillError.md) val | 
[CapError](process-CapError.md) val | [ChdirError](process-ChdirError.md) val | [UnknownError](process-UnknownError.md) val)

```
 [[Source]](https://stdlib.ponylang.io/src/process/process_error/#L2)

 ### let message: ([String](builtin-string) val | [None](builtin-none) val)

 [[Source]](https://stdlib.ponylang.io/src/process/process_error/#L3)

 Public Functions
----------------

 ### string

 [[Source]](https://stdlib.ponylang.io/src/process/process_error/#L11)

 
```
fun box string()
: String iso^

```
 #### Returns

 * [String](builtin-string) iso^



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/process-ProcessError>

WriteError
==========

 [[Source]](https://stdlib.ponylang.io/src/process/process_error/#L50)

 
```
primitive val WriteError

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/process/process_error/#L50)

 
```
new val create()
: WriteError val^

```
 #### Returns

 * [WriteError](index) val^

 Public Functions
----------------

 ### string

 [[Source]](https://stdlib.ponylang.io/src/process/process_error/#L51)

 
```
fun box string()
: String iso^

```
 #### Returns

 * [String](builtin-string) iso^

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/process/process_error/#L51)

 
```
fun box eq(
  that: WriteError val)
: Bool val

```
 #### Parameters

 * that: [WriteError](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/process/process_error/#L51)

 
```
fun box ne(
  that: WriteError val)
: Bool val

```
 #### Parameters

 * that: [WriteError](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/process-WriteError>

WaitpidError
============

 [[Source]](https://stdlib.ponylang.io/src/process/process_error/#L47)

 
```
primitive val WaitpidError

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/process/process_error/#L47)

 
```
new val create()
: WaitpidError val^

```
 #### Returns

 * [WaitpidError](index) val^

 Public Functions
----------------

 ### string

 [[Source]](https://stdlib.ponylang.io/src/process/process_error/#L48)

 
```
fun box string()
: String iso^

```
 #### Returns

 * [String](builtin-string) iso^

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/process/process_error/#L48)

 
```
fun box eq(
  that: WaitpidError val)
: Bool val

```
 #### Parameters

 * that: [WaitpidError](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/process/process_error/#L48)

 
```
fun box ne(
  that: WaitpidError val)
: Bool val

```
 #### Parameters

 * that: [WaitpidError](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/process-WaitpidError>

ChdirError
==========

 [[Source]](https://stdlib.ponylang.io/src/process/process_error/#L59)

 
```
primitive val ChdirError

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/process/process_error/#L59)

 
```
new val create()
: ChdirError val^

```
 #### Returns

 * [ChdirError](index) val^

 Public Functions
----------------

 ### string

 [[Source]](https://stdlib.ponylang.io/src/process/process_error/#L60)

 
```
fun box string()
: String iso^

```
 #### Returns

 * [String](builtin-string) iso^

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/process/process_error/#L60)

 
```
fun box eq(
  that: ChdirError val)
: Bool val

```
 #### Parameters

 * that: [ChdirError](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/process/process_error/#L60)

 
```
fun box ne(
  that: ChdirError val)
: Bool val

```
 #### Parameters

 * that: [ChdirError](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/process-ChdirError>

KillError
=========

 [[Source]](https://stdlib.ponylang.io/src/process/process_error/#L53)

 
```
primitive val KillError

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/process/process_error/#L53)

 
```
new val create()
: KillError val^

```
 #### Returns

 * [KillError](index) val^

 Public Functions
----------------

 ### string

 [[Source]](https://stdlib.ponylang.io/src/process/process_error/#L54)

 
```
fun box string()
: String iso^

```
 #### Returns

 * [String](builtin-string) iso^

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/process/process_error/#L54)

 
```
fun box eq(
  that: KillError val)
: Bool val

```
 #### Parameters

 * that: [KillError](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/process/process_error/#L54)

 
```
fun box ne(
  that: KillError val)
: Bool val

```
 #### Parameters

 * that: [KillError](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/process-KillError>

CapError
========

 [[Source]](https://stdlib.ponylang.io/src/process/process_error/#L56)

 
```
primitive val CapError

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/process/process_error/#L56)

 
```
new val create()
: CapError val^

```
 #### Returns

 * [CapError](index) val^

 Public Functions
----------------

 ### string

 [[Source]](https://stdlib.ponylang.io/src/process/process_error/#L57)

 
```
fun box string()
: String iso^

```
 #### Returns

 * [String](builtin-string) iso^

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/process/process_error/#L57)

 
```
fun box eq(
  that: CapError val)
: Bool val

```
 #### Parameters

 * that: [CapError](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/process/process_error/#L57)

 
```
fun box ne(
  that: CapError val)
: Bool val

```
 #### Parameters

 * that: [CapError](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/process-CapError>

StartProcessAuth
================

 [[Source]](https://stdlib.ponylang.io/src/process/auth/#L1)

 
```
primitive val StartProcessAuth

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/process/auth/#L2)

 
```
new val create(
  from: AmbientAuth val)
: StartProcessAuth val^

```
 #### Parameters

 * from: [AmbientAuth](builtin-ambientauth) val

 #### Returns

 * [StartProcessAuth](index) val^

 Public Functions
----------------

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/process/auth/#L2)

 
```
fun box eq(
  that: StartProcessAuth val)
: Bool val

```
 #### Parameters

 * that: [StartProcessAuth](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/process/auth/#L2)

 
```
fun box ne(
  that: StartProcessAuth val)
: Bool val

```
 #### Parameters

 * that: [StartProcessAuth](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/process-StartProcessAuth>

Fulfill[A: [Any](builtin-any) #share, B: [Any](builtin-any) #share]
===================================================================

 [[Source]](https://stdlib.ponylang.io/src/promises/fulfill/#L4)

 A function from A to B that is called when a promise is fulfilled.

 
```
interface iso Fulfill[A: Any #share, B: Any #share]

```
 Public Functions
----------------

 ### apply

 [[Source]](https://stdlib.ponylang.io/src/promises/fulfill/#L8)

 
```
fun ref apply(
  value: A)
: B ?

```
 #### Parameters

 * value: A

 #### Returns

 * B ?



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/promises-Fulfill>

Promise[A: [Any](builtin-any) #share]
=====================================

 [[Source]](https://stdlib.ponylang.io/src/promises/promise/#L94)

 A promise to eventually produce a result of type A. This promise can either be fulfilled or rejected.

 Any number of promises can be chained after this one.

 
```
actor tag Promise[A: Any #share]

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/promises/promise/#L94)

 
```
new tag create()
: Promise[A] tag^

```
 #### Returns

 * [Promise](index)[A] tag^

 Public Behaviours
-----------------

 ### apply

 [[Source]](https://stdlib.ponylang.io/src/promises/promise/#L104)

 Fulfill the promise.

 
```
be apply(
  value: A)

```
 #### Parameters

 * value: A

 ### reject

 [[Source]](https://stdlib.ponylang.io/src/promises/promise/#L120)

 Reject the promise.

 
```
be reject()

```
 Public Functions
----------------

 ### next[B: [Any](builtin-any) #share]

 [[Source]](https://stdlib.ponylang.io/src/promises/promise/#L136)

 Chain a promise after this one.

 When this promise is fulfilled, the result of type A is passed to the fulfill function, generating in an intermediate result of type B. This is then used to fulfill the next promise in the chain.

 If there is no fulfill function, or if the fulfill function raises an error, then the next promise in the chain will be rejected.

 If this promise is rejected, this step's reject function is called with no input, generating an intermediate result of type B which is used to fulfill the next promise in the chain.

 If there is no reject function, of if the reject function raises an error, then the next promise in the chain will be rejected.

 
```
fun tag next[B: Any #share](
  fulfill: Fulfill[A, B] iso,
  rejected: Reject[B] iso = qualify)
: Promise[B] tag

```
 #### Parameters

 * fulfill: [Fulfill](promises-fulfill)[A, B] iso
* rejected: [Reject](promises-reject)[B] iso = qualify

 #### Returns

 * [Promise](index)[B] tag

 ### add[optional B: [Any](builtin-any) #share]

 [[Source]](https://stdlib.ponylang.io/src/promises/promise/#L163)

 Add two promises into one promise that returns the result of both when they are fulfilled. If either of the promises is rejected then the new promise is also rejected.

 
```
fun tag add[optional B: Any #share](
  p: Promise[B] tag)
: Promise[(A , B)] tag

```
 #### Parameters

 * p: [Promise](index)[B] tag

 #### Returns

 * [Promise](index)[(A , B)] tag

 ### join

 [[Source]](https://stdlib.ponylang.io/src/promises/promise/#L199)

 Create a promise that is fulfilled when the receiver and all promises in the given iterator are fulfilled. If the receiver or any promise in the sequence is rejected then the new promise is also rejected.

 Join `p1` and `p2` with an existing promise, `p3`.

 
```
use "promises"

actor Main
  new create(env: Env) =>

    let p1 = Promise[String val]
    let p2 = Promise[String val]
    let p3 = Promise[String val]

    p3.join([p1; p2].values())
      .next[None]({(a: Array[String val] val) =>
        for s in a.values() do
          env.out.print(s)
        end
      })

    p2("second")
    p3("third")
    p1("first")

```
 
```
fun tag join(
  ps: Iterator[Promise[A] tag] ref)
: Promise[Array[A] val] tag

```
 #### Parameters

 * ps: [Iterator](builtin-iterator)[[Promise](index)[A] tag] ref

 #### Returns

 * [Promise](index)[[Array](builtin-array)[A] val] tag

 ### select

 [[Source]](https://stdlib.ponylang.io/src/promises/promise/#L233)

 Return a promise that is fulfilled when either promise is fulfilled, resulting in a tuple of its value and the other promise.

 
```
fun tag select(
  p: Promise[A] tag)
: Promise[(A , Promise[A] tag)] tag

```
 #### Parameters

 * p: [Promise](index)[A] tag

 #### Returns

 * [Promise](index)[(A , [Promise](index)[A] tag)] tag

 ### timeout

 [[Source]](https://stdlib.ponylang.io/src/promises/promise/#L257)

 Reject the promise after the given expiration in nanoseconds.

 
```
fun tag timeout(
  expiration: U64 val)
: None val

```
 #### Parameters

 * expiration: [U64](builtin-u64) val

 #### Returns

 * [None](builtin-none) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/promises-Promise>

Timers
======

 [[Source]](https://stdlib.ponylang.io/src/time/timers/#L13)

 A hierarchical set of timing wheels.

 
```
actor tag Timers

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/time/timers/#L24)

 Create a timer handler with the specified number of slop bits. No slop bits means trying for nanosecond resolution. 10 slop bits is approximately microsecond resolution, 20 slop bits is approximately millisecond resolution.

 
```
new tag create(
  slop: USize val = 20)
: Timers tag^

```
 #### Parameters

 * slop: [USize](builtin-usize) val = 20

 #### Returns

 * [Timers](index) tag^

 Public Behaviours
-----------------

 ### apply

 [[Source]](https://stdlib.ponylang.io/src/time/timers/#L38)

 Sets a timer. Fire it if need be, schedule it on the right timing wheel, then rearm the timer.

 
```
be apply(
  timer: Timer iso)

```
 #### Parameters

 * timer: [Timer](time-timer) iso

 ### cancel

 [[Source]](https://stdlib.ponylang.io/src/time/timers/#L49)

 Cancels a timer.

 
```
be cancel(
  timer: Timer tag)

```
 #### Parameters

 * timer: [Timer](time-timer) tag

 ### dispose

 [[Source]](https://stdlib.ponylang.io/src/time/timers/#L64)

 Dispose of this set of timing wheels.

 
```
be dispose()

```


 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/time-Timers>

ProcessExitStatus
=================

 [[Source]](https://stdlib.ponylang.io/src/process/_process/#L135)

 Representing possible exit states of processes. A process either exited with an exit code or, only on posix systems, has been terminated by a signal.

 
```
type ProcessExitStatus is
  (Exited val | Signaled val)

```
 #### Type Alias For

 * ([Exited](process-exited) val | [Signaled](process-signaled) val)



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/process-ProcessExitStatus>

TimerNotify
===========

 [[Source]](https://stdlib.ponylang.io/src/time/timer_notify/#L1)

 Notifications for timer.

 
```
interface ref TimerNotify

```
 Public Functions
----------------

 ### apply

 [[Source]](https://stdlib.ponylang.io/src/time/timer_notify/#L5)

 Called with the the number of times the timer has fired since this was last called. Usually, the value of `count` will be 1. If it is not 1, it means that the timer isn't firing on schedule.

 For example, if your timer is set to fire every 10 milliseconds, and `count` is 2, that means it has been between 20-29 milliseconds since the last time your timer fired. Non 1 values for a timer are rare and indicate a system under heavy load.

 Return true to reschedule the timer (if it has an interval), or false to cancel the timer (even if it has an interval).

 
```
fun ref apply(
  timer: Timer ref,
  count: U64 val)
: Bool val

```
 #### Parameters

 * timer: [Timer](time-timer) ref
* count: [U64](builtin-u64) val

 #### Returns

 * [Bool](builtin-bool) val

 ### cancel

 [[Source]](https://stdlib.ponylang.io/src/time/timer_notify/#L21)

 Called if the timer is cancelled. This is also called if the notifier returns false from its `apply` method.

 
```
fun ref cancel(
  timer: Timer ref)
: None val

```
 #### Parameters

 * timer: [Timer](time-timer) ref

 #### Returns

 * [None](builtin-none) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/time-TimerNotify>

Reject[A: [Any](builtin-any) #share]
====================================

 [[Source]](https://stdlib.ponylang.io/src/promises/fulfill/#L10)

 A function on A that is called when a promise is rejected.

 
```
interface iso Reject[A: Any #share]

```
 Public Functions
----------------

 ### apply

 [[Source]](https://stdlib.ponylang.io/src/promises/fulfill/#L14)

 
```
fun ref apply()
: A ?

```
 #### Returns

 * A ?



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/promises-Reject>

Promises[A: [Any](builtin-any) #share]
======================================

 [[Source]](https://stdlib.ponylang.io/src/promises/promise/#L284)

 
```
primitive val Promises[A: Any #share]

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/promises/promise/#L284)

 
```
new val create()
: Promises[A] val^

```
 #### Returns

 * [Promises](index)[A] val^

 Public Functions
----------------

 ### join

 [[Source]](https://stdlib.ponylang.io/src/promises/promise/#L285)

 Create a promise that is fulfilled when all promises in the given sequence are fulfilled. If any promise in the sequence is rejected then the new promise is also rejected. The order that values appear in the final array is based on when each promise is fulfilled and not the order that they are given.

 Join three existing promises to make a fourth.

 
```
use "promises"

actor Main
  new create(env: Env) =>

    let p1 = Promise[String val]
    let p2 = Promise[String val]
    let p3 = Promise[String val]

    Promises[String val].join([p1; p2; p3].values())
      .next[None]({(a: Array[String val] val) =>
        for s in a.values() do
          env.out.print(s)
        end
      })

    p2("second")
    p3("third")
    p1("first")

```
 
```
fun box join(
  ps: Iterator[Promise[A] tag] ref)
: Promise[Array[A] val] tag

```
 #### Parameters

 * ps: [Iterator](builtin-iterator)[[Promise](promises-promise)[A] tag] ref

 #### Returns

 * [Promise](promises-promise)[[Array](builtin-array)[A] val] tag

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/promises/promise/#L285)

 
```
fun box eq(
  that: Promises[A] val)
: Bool val

```
 #### Parameters

 * that: [Promises](index)[A] val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/promises/promise/#L285)

 
```
fun box ne(
  that: Promises[A] val)
: Bool val

```
 #### Parameters

 * that: [Promises](index)[A] val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/promises-Promises>

RejectAlways[A: [Any](builtin-any) #share]
==========================================

 [[Source]](https://stdlib.ponylang.io/src/promises/fulfill/#L23)

 A reject that always raises an error.

 
```
class iso RejectAlways[A: Any #share]

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/promises/fulfill/#L23)

 
```
new iso create()
: RejectAlways[A] iso^

```
 #### Returns

 * [RejectAlways](index)[A] iso^

 Public Functions
----------------

 ### apply

 [[Source]](https://stdlib.ponylang.io/src/promises/fulfill/#L27)

 
```
fun ref apply()
: A ?

```
 #### Returns

 * A ?



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/promises-RejectAlways>

FulfillIdentity[A: [Any](builtin-any) #share]
=============================================

 [[Source]](https://stdlib.ponylang.io/src/promises/fulfill/#L16)

 An identity function for fulfilling promises.

 
```
class iso FulfillIdentity[A: Any #share]

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/promises/fulfill/#L16)

 
```
new iso create()
: FulfillIdentity[A] iso^

```
 #### Returns

 * [FulfillIdentity](index)[A] iso^

 Public Functions
----------------

 ### apply

 [[Source]](https://stdlib.ponylang.io/src/promises/fulfill/#L20)

 
```
fun ref apply(
  value: A)
: A

```
 #### Parameters

 * value: A

 #### Returns

 * A



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/promises-FulfillIdentity>

UnknownError
============

 [[Source]](https://stdlib.ponylang.io/src/process/process_error/#L62)

 
```
primitive val UnknownError

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/process/process_error/#L62)

 
```
new val create()
: UnknownError val^

```
 #### Returns

 * [UnknownError](index) val^

 Public Functions
----------------

 ### string

 [[Source]](https://stdlib.ponylang.io/src/process/process_error/#L63)

 
```
fun box string()
: String iso^

```
 #### Returns

 * [String](builtin-string) iso^

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/process/process_error/#L63)

 
```
fun box eq(
  that: UnknownError val)
: Bool val

```
 #### Parameters

 * that: [UnknownError](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/process/process_error/#L63)

 
```
fun box ne(
  that: UnknownError val)
: Bool val

```
 #### Parameters

 * that: [UnknownError](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/process-UnknownError>

Timer
=====

 [[Source]](https://stdlib.ponylang.io/src/time/timer/#L3)

 The `Timer` class represents a timer that fires after an expiration time, and then fires at an interval. When a `Timer` fires, it calls the `apply` method of the `TimerNotify` object that was passed to it when it was created.

 The following example waits 5 seconds and then fires every 2 seconds, and when it fires the `TimerNotify` object prints how many times it has been called:

 
```
use "time"

actor Main
  new create(env: Env) =>
    let timers = Timers
    let timer = Timer(Notify(env), 5_000_000_000, 2_000_000_000)
    timers(consume timer)

class Notify is TimerNotify
  let _env: Env
  var _counter: U32 = 0
  new iso create(env: Env) =>
    _env = env
  fun ref apply(timer: Timer, count: U64): Bool =>
    _env.out.print(_counter.string())
    _counter = _counter + 1
    true

```
 
```
class ref Timer

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/time/timer/#L39)

 Create a new timer. The expiration time should be a nanosecond count until the first expiration. The interval should also be in nanoseconds.

 
```
new iso create(
  notify: TimerNotify iso,
  expiration: U64 val,
  interval: U64 val = 0)
: Timer iso^

```
 #### Parameters

 * notify: [TimerNotify](time-timernotify) iso
* expiration: [U64](builtin-u64) val
* interval: [U64](builtin-u64) val = 0

 #### Returns

 * [Timer](index) iso^

 ### abs

 [[Source]](https://stdlib.ponylang.io/src/time/timer/#L54)

 Creates a new timer with an absolute expiration time rather than a relative time. The expiration time is wall-clock adjusted system time.

 
```
new ref abs(
  notify: TimerNotify ref,
  expiration: (I64 val , I64 val),
  interval: U64 val = 0)
: Timer ref^

```
 #### Parameters

 * notify: [TimerNotify](time-timernotify) ref
* expiration: ([I64](builtin-i64) val , [I64](builtin-i64) val)
* interval: [U64](builtin-u64) val = 0

 #### Returns

 * [Timer](index) ref^



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/time-Timer>

Time
====

 [[Source]](https://stdlib.ponylang.io/src/time/time/#L38)

 A collection of ways to fetch the current time.

 
```
primitive val Time

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/time/time/#L38)

 
```
new val create()
: Time val^

```
 #### Returns

 * [Time](index) val^

 Public Functions
----------------

 ### now

 [[Source]](https://stdlib.ponylang.io/src/time/time/#L42)

 The wall-clock adjusted system time with nanoseconds. Return: (seconds, nanoseconds)

 
```
fun box now()
: (I64 val , I64 val)

```
 #### Returns

 * ([I64](builtin-i64) val , [I64](builtin-i64) val)

 ### seconds

 [[Source]](https://stdlib.ponylang.io/src/time/time/#L65)

 The wall-clock adjusted system time.

 
```
fun box seconds()
: I64 val

```
 #### Returns

 * [I64](builtin-i64) val

 ### millis

 [[Source]](https://stdlib.ponylang.io/src/time/time/#L71)

 Monotonic unadjusted milliseconds.

 
```
fun box millis()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### micros

 [[Source]](https://stdlib.ponylang.io/src/time/time/#L87)

 Monotonic unadjusted microseconds.

 
```
fun box micros()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### nanos

 [[Source]](https://stdlib.ponylang.io/src/time/time/#L103)

 Monotonic unadjusted nanoseconds.

 
```
fun box nanos()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### cycles

 [[Source]](https://stdlib.ponylang.io/src/time/time/#L119)

 Processor cycle count. Don't use this for performance timing, as it does not control for out-of-order execution.

 
```
fun box cycles()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### perf\_begin

 [[Source]](https://stdlib.ponylang.io/src/time/time/#L126)

 Get a cycle count for beginning a performance testing block. This will will prevent instructions from before this call leaking into the block and instructions after this call being executed earlier.

 
```
fun box perf_begin()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### perf\_end

 [[Source]](https://stdlib.ponylang.io/src/time/time/#L139)

 Get a cycle count for ending a performance testing block. This will will prevent instructions from after this call leaking into the block and instructions before this call being executed later.

 
```
fun box perf_end()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/time/time/#L42)

 
```
fun box eq(
  that: Time val)
: Bool val

```
 #### Parameters

 * that: [Time](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/time/time/#L42)

 
```
fun box ne(
  that: Time val)
: Bool val

```
 #### Parameters

 * that: [Time](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/time-Time>

PosixDate
=========

 [[Source]](https://stdlib.ponylang.io/src/time/posix_date/#L1)

 Represents a proleptic Gregorian date and time, without specifying a time zone. The day of month, month, day of week, and day of year are all indexed from 1, i.e. January is 1, Monday is 1.

 
```
class ref PosixDate

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/time/posix_date/#L17)

 Create a date from a POSIX time. Negative arguments will be changed to zero.

 
```
new ref create(
  seconds: I64 val = 0,
  nanoseconds: I64 val = 0)
: PosixDate ref^

```
 #### Parameters

 * seconds: [I64](builtin-i64) val = 0
* nanoseconds: [I64](builtin-i64) val = 0

 #### Returns

 * [PosixDate](index) ref^

 Public fields
-------------

 ### var nsec: [I32](builtin-i32) val

 [[Source]](https://stdlib.ponylang.io/src/time/posix_date/#L7)

 ### var sec: [I32](builtin-i32) val

 [[Source]](https://stdlib.ponylang.io/src/time/posix_date/#L8)

 ### var min: [I32](builtin-i32) val

 [[Source]](https://stdlib.ponylang.io/src/time/posix_date/#L9)

 ### var hour: [I32](builtin-i32) val

 [[Source]](https://stdlib.ponylang.io/src/time/posix_date/#L10)

 ### var day\_of\_month: [I32](builtin-i32) val

 [[Source]](https://stdlib.ponylang.io/src/time/posix_date/#L11)

 ### var month: [I32](builtin-i32) val

 [[Source]](https://stdlib.ponylang.io/src/time/posix_date/#L12)

 ### var year: [I32](builtin-i32) val

 [[Source]](https://stdlib.ponylang.io/src/time/posix_date/#L13)

 ### var day\_of\_week: [I32](builtin-i32) val

 [[Source]](https://stdlib.ponylang.io/src/time/posix_date/#L14)

 ### var day\_of\_year: [I32](builtin-i32) val

 [[Source]](https://stdlib.ponylang.io/src/time/posix_date/#L15)

 Public Functions
----------------

 ### time

 [[Source]](https://stdlib.ponylang.io/src/time/posix_date/#L25)

 Return a POSIX time. Treats the date as UTC.

 
```
fun box time()
: I64 val

```
 #### Returns

 * [I64](builtin-i64) val

 ### normal

 [[Source]](https://stdlib.ponylang.io/src/time/posix_date/#L31)

 Normalise all the fields of the date. For example, if the hour is 24, it is set to 0 and the day is advanced. This allows fields to be changed naively, eg. adding 1000 to hours to advance the time by 1000 hours, and then normalising the date.

 
```
fun ref normal()
: None val

```
 #### Returns

 * [None](builtin-none) val

 ### format

 [[Source]](https://stdlib.ponylang.io/src/time/posix_date/#L40)

 Format the time as for strftime.

 
```
fun box format(
  fmt: String val)
: String val ?

```
 #### Parameters

 * fmt: [String](builtin-string) val

 #### Returns

 * [String](builtin-string) val ?



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/time-PosixDate>

Nanos
=====

 [[Source]](https://stdlib.ponylang.io/src/time/nanos/#L2)

 Collection of utility functions for converting various durations of time to nanoseconds, for passing to other functions in the time package.

 
```
primitive val Nanos

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/time/nanos/#L2)

 
```
new val create()
: Nanos val^

```
 #### Returns

 * [Nanos](index) val^

 Public Functions
----------------

 ### from\_seconds

 [[Source]](https://stdlib.ponylang.io/src/time/nanos/#L7)

 
```
fun box from_seconds(
  t: U64 val)
: U64 val

```
 #### Parameters

 * t: [U64](builtin-u64) val

 #### Returns

 * [U64](builtin-u64) val

 ### from\_millis

 [[Source]](https://stdlib.ponylang.io/src/time/nanos/#L10)

 
```
fun box from_millis(
  t: U64 val)
: U64 val

```
 #### Parameters

 * t: [U64](builtin-u64) val

 #### Returns

 * [U64](builtin-u64) val

 ### from\_micros

 [[Source]](https://stdlib.ponylang.io/src/time/nanos/#L13)

 
```
fun box from_micros(
  t: U64 val)
: U64 val

```
 #### Parameters

 * t: [U64](builtin-u64) val

 #### Returns

 * [U64](builtin-u64) val

 ### from\_seconds\_f

 [[Source]](https://stdlib.ponylang.io/src/time/nanos/#L16)

 
```
fun box from_seconds_f(
  t: F64 val)
: U64 val

```
 #### Parameters

 * t: [F64](builtin-f64) val

 #### Returns

 * [U64](builtin-u64) val

 ### from\_millis\_f

 [[Source]](https://stdlib.ponylang.io/src/time/nanos/#L19)

 
```
fun box from_millis_f(
  t: F64 val)
: U64 val

```
 #### Parameters

 * t: [F64](builtin-f64) val

 #### Returns

 * [U64](builtin-u64) val

 ### from\_micros\_f

 [[Source]](https://stdlib.ponylang.io/src/time/nanos/#L22)

 
```
fun box from_micros_f(
  t: F64 val)
: U64 val

```
 #### Parameters

 * t: [F64](builtin-f64) val

 #### Returns

 * [U64](builtin-u64) val

 ### from\_wall\_clock

 [[Source]](https://stdlib.ponylang.io/src/time/nanos/#L25)

 
```
fun box from_wall_clock(
  wall: (I64 val , I64 val))
: U64 val

```
 #### Parameters

 * wall: ([I64](builtin-i64) val , [I64](builtin-i64) val)

 #### Returns

 * [U64](builtin-u64) val

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/time/nanos/#L7)

 
```
fun box eq(
  that: Nanos val)
: Bool val

```
 #### Parameters

 * that: [Nanos](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/time/nanos/#L7)

 
```
fun box ne(
  that: Nanos val)
: Bool val

```
 #### Parameters

 * that: [Nanos](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/time-Nanos>

UnitTest
========

 [[Source]](https://stdlib.ponylang.io/src/ponytest/unit_test/#L1)

 Each unit test class must provide this trait. Simple tests only need to define the name() and apply() functions. The remaining functions specify additional test options.

 
```
trait ref UnitTest

```
 Public Functions
----------------

 ### name

 [[Source]](https://stdlib.ponylang.io/src/ponytest/unit_test/#L8)

 Report the test name, which is used when printing test results and on the command line to select tests to run.

 
```
fun box name()
: String val

```
 #### Returns

 * [String](builtin-string) val

 ### exclusion\_group

 [[Source]](https://stdlib.ponylang.io/src/ponytest/unit_test/#L14)

 Report the test exclusion group, returning an empty string for none. The default body returns an empty string.

 
```
fun box exclusion_group()
: String val

```
 #### Returns

 * [String](builtin-string) val

 ### apply

 [[Source]](https://stdlib.ponylang.io/src/ponytest/unit_test/#L21)

 Run the test. Raising an error is interpreted as a test failure.

 
```
fun ref apply(
  h: TestHelper val)
: None val ?

```
 #### Parameters

 * h: [TestHelper](ponytest-testhelper) val

 #### Returns

 * [None](builtin-none) val ?

 ### timed\_out

 [[Source]](https://stdlib.ponylang.io/src/ponytest/unit_test/#L27)

 Tear down a possibly hanging test. Called when the timeout specified by to long\_test() expires. There is no need for this function to call complete(false). tear\_down() will still be called after this completes. The default is to do nothing.

 
```
fun ref timed_out(
  h: TestHelper val)
: None val

```
 #### Parameters

 * h: [TestHelper](ponytest-testhelper) val

 #### Returns

 * [None](builtin-none) val

 ### set\_up

 [[Source]](https://stdlib.ponylang.io/src/ponytest/unit_test/#L37)

 Set up the testing environment before a test method is called. Default is to do nothing.

 
```
fun ref set_up(
  h: TestHelper val)
: None val ?

```
 #### Parameters

 * h: [TestHelper](ponytest-testhelper) val

 #### Returns

 * [None](builtin-none) val ?

 ### tear\_down

 [[Source]](https://stdlib.ponylang.io/src/ponytest/unit_test/#L44)

 Tidy up after the test has completed. Called for each run test, whether that test passed, succeeded or timed out. The default is to do nothing.

 
```
fun ref tear_down(
  h: TestHelper val)
: None val

```
 #### Parameters

 * h: [TestHelper](ponytest-testhelper) val

 #### Returns

 * [None](builtin-none) val

 ### label

 [[Source]](https://stdlib.ponylang.io/src/ponytest/unit_test/#L52)

 Report the test label, returning an empty string for none. It can be later use to filter tests which we want to run, by labels.

 
```
fun box label()
: String val

```
 #### Returns

 * [String](builtin-string) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/ponytest-UnitTest>

TestList
========

 [[Source]](https://stdlib.ponylang.io/src/ponytest/test_list/#L1)

 Source of unit tests for a PonyTest object. See package doc string for further information and example use.

 
```
trait ref TestList

```
 Public Functions
----------------

 ### tests

 [[Source]](https://stdlib.ponylang.io/src/ponytest/test_list/#L7)

 Add all the tests in this suite to the given test object. Typically the implementation of this function will be of the form:

 
```
fun tests(test: PonyTest) =>
  test(_TestClass1)
  test(_TestClass2)
  test(_TestClass3)

```
 
```
fun tag tests(
  test: PonyTest tag)
: None val

```
 #### Parameters

 * test: [PonyTest](ponytest-ponytest) tag

 #### Returns

 * [None](builtin-none) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/ponytest-TestList>

CommonPrefix
============

 [[Source]](https://stdlib.ponylang.io/src/strings/common_prefix/#L1)

 Creates a string that is the common prefix of the supplied strings, possibly empty.

 
```
primitive val CommonPrefix

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/strings/common_prefix/#L1)

 
```
new val create()
: CommonPrefix val^

```
 #### Returns

 * [CommonPrefix](index) val^

 Public Functions
----------------

 ### apply

 [[Source]](https://stdlib.ponylang.io/src/strings/common_prefix/#L7)

 
```
fun box apply(
  data: ReadSeq[Stringable box] box)
: String iso^

```
 #### Parameters

 * data: [ReadSeq](builtin-readseq)[[Stringable](builtin-stringable) box] box

 #### Returns

 * [String](builtin-string) iso^

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/strings/common_prefix/#L7)

 
```
fun box eq(
  that: CommonPrefix val)
: Bool val

```
 #### Parameters

 * that: [CommonPrefix](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/strings/common_prefix/#L7)

 
```
fun box ne(
  that: CommonPrefix val)
: Bool val

```
 #### Parameters

 * that: [CommonPrefix](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/strings-CommonPrefix>

TestHelper
==========

 [[Source]](https://stdlib.ponylang.io/src/ponytest/test_helper/#L4)

 Per unit test class that provides control, logging and assertion functions.

 Each unit test is given a TestHelper when it is run. This is val and so can be passed between methods and actors within the test without restriction.

 The assertion functions check the relevant condition and mark the test as a failure if appropriate. The success or failure of the condition is reported back as a Bool which can be checked if a different code path is needed when that condition fails.

 All assert functions take an optional message argument. This is simply a string that is printed as part of the error message when the condition fails. It is intended to aid identifying what failed.

 
```
class val TestHelper

```
 Public fields
-------------

 ### let env: [Env](builtin-env) val

 [[Source]](https://stdlib.ponylang.io/src/ponytest/test_helper/#L22)

 The process environment.

 This is useful for getting the [root authority](builtin-ambientauth) in order to access the filesystem (See [files](files--index)) or the network (See [net](net--index)) in your tests.

 Public Functions
----------------

 ### log

 [[Source]](https://stdlib.ponylang.io/src/ponytest/test_helper/#L38)

 Log the given message.

 The verbose parameter allows messages to be printed only when the --verbose command line option is used. For example, by default assert failures are logged, but passes are not. With --verbose both passes and fails are reported.

 Logs are printed one test at a time to avoid interleaving log lines from concurrent tests.

 
```
fun box log(
  msg: String val,
  verbose: Bool val = false)
: None val

```
 #### Parameters

 * msg: [String](builtin-string) val
* verbose: [Bool](builtin-bool) val = false

 #### Returns

 * [None](builtin-none) val

 ### fail

 [[Source]](https://stdlib.ponylang.io/src/ponytest/test_helper/#L52)

 Flag the test as having failed.

 
```
fun box fail(
  msg: String val = "Test failed")
: None val

```
 #### Parameters

 * msg: [String](builtin-string) val = "Test failed"

 #### Returns

 * [None](builtin-none) val

 ### assert\_true

 [[Source]](https://stdlib.ponylang.io/src/ponytest/test_helper/#L58)

 Assert that the given expression is true.

 
```
fun box assert_true(
  actual: Bool val,
  msg: String val = "",
  loc: SourceLoc val = __loc)
: Bool val

```
 #### Parameters

 * actual: [Bool](builtin-bool) val
* msg: [String](builtin-string) val = ""
* loc: [SourceLoc](builtin-sourceloc) val = \_\_loc

 #### Returns

 * [Bool](builtin-bool) val

 ### assert\_false

 [[Source]](https://stdlib.ponylang.io/src/ponytest/test_helper/#L71)

 Assert that the given expression is false.

 
```
fun box assert_false(
  actual: Bool val,
  msg: String val = "",
  loc: SourceLoc val = __loc)
: Bool val

```
 #### Parameters

 * actual: [Bool](builtin-bool) val
* msg: [String](builtin-string) val = ""
* loc: [SourceLoc](builtin-sourceloc) val = \_\_loc

 #### Returns

 * [Bool](builtin-bool) val

 ### assert\_error

 [[Source]](https://stdlib.ponylang.io/src/ponytest/test_helper/#L84)

 Assert that the given test function throws an error when run.

 
```
fun box assert_error(
  test: ITest box,
  msg: String val = "",
  loc: SourceLoc val = __loc)
: Bool val

```
 #### Parameters

 * test: [ITest](ponytest-itest) box
* msg: [String](builtin-string) val = ""
* loc: [SourceLoc](builtin-sourceloc) val = \_\_loc

 #### Returns

 * [Bool](builtin-bool) val

 ### assert\_no\_error

 [[Source]](https://stdlib.ponylang.io/src/ponytest/test_helper/#L99)

 Assert that the gived test function does not throw an error when run.

 
```
fun box assert_no_error(
  test: ITest box,
  msg: String val = "",
  loc: SourceLoc val = __loc)
: Bool val

```
 #### Parameters

 * test: [ITest](ponytest-itest) box
* msg: [String](builtin-string) val = ""
* loc: [SourceLoc](builtin-sourceloc) val = \_\_loc

 #### Returns

 * [Bool](builtin-bool) val

 ### assert\_is[A: A]

 [[Source]](https://stdlib.ponylang.io/src/ponytest/test_helper/#L117)

 Assert that the 2 given expressions resolve to the same instance

 
```
fun box assert_is[A: A](
  expect: A,
  actual: A,
  msg: String val = "",
  loc: SourceLoc val = __loc)
: Bool val

```
 #### Parameters

 * expect: A
* actual: A
* msg: [String](builtin-string) val = ""
* loc: [SourceLoc](builtin-sourceloc) val = \_\_loc

 #### Returns

 * [Bool](builtin-bool) val

 ### assert\_eq[A: ([Equatable](builtin-equatable)[A] #read & [Stringable](builtin-stringable) #read)]

 [[Source]](https://stdlib.ponylang.io/src/ponytest/test_helper/#L154)

 Assert that the 2 given expressions are equal.

 
```
fun box assert_eq[A: (Equatable[A] #read & Stringable #read)](
  expect: A,
  actual: A,
  msg: String val = "",
  loc: SourceLoc val = __loc)
: Bool val

```
 #### Parameters

 * expect: A
* actual: A
* msg: [String](builtin-string) val = ""
* loc: [SourceLoc](builtin-sourceloc) val = \_\_loc

 #### Returns

 * [Bool](builtin-bool) val

 ### assert\_isnt[A: A]

 [[Source]](https://stdlib.ponylang.io/src/ponytest/test_helper/#L179)

 Assert that the 2 given expressions resolve to different instances.

 
```
fun box assert_isnt[A: A](
  not_expect: A,
  actual: A,
  msg: String val = "",
  loc: SourceLoc val = __loc)
: Bool val

```
 #### Parameters

 * not\_expect: A
* actual: A
* msg: [String](builtin-string) val = ""
* loc: [SourceLoc](builtin-sourceloc) val = \_\_loc

 #### Returns

 * [Bool](builtin-bool) val

 ### assert\_ne[A: ([Equatable](builtin-equatable)[A] #read & [Stringable](builtin-stringable) #read)]

 [[Source]](https://stdlib.ponylang.io/src/ponytest/test_helper/#L216)

 Assert that the 2 given expressions are not equal.

 
```
fun box assert_ne[A: (Equatable[A] #read & Stringable #read)](
  not_expect: A,
  actual: A,
  msg: String val = "",
  loc: SourceLoc val = __loc)
: Bool val

```
 #### Parameters

 * not\_expect: A
* actual: A
* msg: [String](builtin-string) val = ""
* loc: [SourceLoc](builtin-sourceloc) val = \_\_loc

 #### Returns

 * [Bool](builtin-bool) val

 ### assert\_array\_eq[A: ([Equatable](builtin-equatable)[A] #read & [Stringable](builtin-stringable) #read)]

 [[Source]](https://stdlib.ponylang.io/src/ponytest/test_helper/#L244)

 Assert that the contents of the 2 given ReadSeqs are equal.

 The type parameter of this function is the type parameter of the elements in both ReadSeqs. For instance, when comparing two `Array[U8]`, you should call this method as follows:

 
```
fun apply(h: TestHelper) =>
  let a: Array[U8] = [1; 2; 3]
  let b: Array[U8] = [1; 2; 3]
  h.assert_array_eq[U8](a, b)

```
 
```
fun box assert_array_eq[A: (Equatable[A] #read & Stringable #read)](
  expect: ReadSeq[A] box,
  actual: ReadSeq[A] box,
  msg: String val = "",
  loc: SourceLoc val = __loc)
: Bool val

```
 #### Parameters

 * expect: [ReadSeq](builtin-readseq)[A] box
* actual: [ReadSeq](builtin-readseq)[A] box
* msg: [String](builtin-string) val = ""
* loc: [SourceLoc](builtin-sourceloc) val = \_\_loc

 #### Returns

 * [Bool](builtin-bool) val

 ### assert\_array\_eq\_unordered[A: ([Equatable](builtin-equatable)[A] #read & [Stringable](builtin-stringable) #read)]

 [[Source]](https://stdlib.ponylang.io/src/ponytest/test_helper/#L297)

 Assert that the contents of the 2 given ReadSeqs are equal ignoring order.

 The type parameter of this function is the type parameter of the elements in both ReadSeqs. For instance, when comparing two `Array[U8]`, you should call this method as follows:

 
```
fun apply(h: TestHelper) =>
  let a: Array[U8] = [1; 2; 3]
  let b: Array[U8] = [1; 3; 2]
  h.assert_array_eq_unordered[U8](a, b)

```
 
```
fun box assert_array_eq_unordered[A: (Equatable[A] #read & Stringable #read)](
  expect: ReadSeq[A] box,
  actual: ReadSeq[A] box,
  msg: String val = "",
  loc: SourceLoc val = __loc)
: Bool val

```
 #### Parameters

 * expect: [ReadSeq](builtin-readseq)[A] box
* actual: [ReadSeq](builtin-readseq)[A] box
* msg: [String](builtin-string) val = ""
* loc: [SourceLoc](builtin-sourceloc) val = \_\_loc

 #### Returns

 * [Bool](builtin-bool) val

 ### long\_test

 [[Source]](https://stdlib.ponylang.io/src/ponytest/test_helper/#L375)

 Indicate that this is a long running test that may continue after the test function exits. Once this function is called, complete() must be called to finish the test, unless a timeout occurs. The timeout is specified in nanseconds.

 
```
fun box long_test(
  timeout: U64 val)
: None val

```
 #### Parameters

 * timeout: [U64](builtin-u64) val

 #### Returns

 * [None](builtin-none) val

 ### complete

 [[Source]](https://stdlib.ponylang.io/src/ponytest/test_helper/#L385)

 MUST be called by each long test to indicate the test has finished, unless a timeout occurs.

 The "success" parameter specifies whether the test succeeded. However if any asserts fail the test will be considered a failure, regardless of the value of this parameter.

 Once this is called tear\_down() may be called at any time.

 
```
fun box complete(
  success: Bool val)
: None val

```
 #### Parameters

 * success: [Bool](builtin-bool) val

 #### Returns

 * [None](builtin-none) val

 ### expect\_action

 [[Source]](https://stdlib.ponylang.io/src/ponytest/test_helper/#L398)

 Can be called in a long test to set up expectations for one or more actions that, when all completed, will complete the test.

 This pattern is useful for cases where you have multiple things that need to happen to complete your test, but don't want to have to collect them all yourself into a single actor that calls the complete method.

 The order of calls to expect\_action don't matter - the actions may be completed in any other order to complete the test.

 
```
fun box expect_action(
  name: String val)
: None val

```
 #### Parameters

 * name: [String](builtin-string) val

 #### Returns

 * [None](builtin-none) val

 ### complete\_action

 [[Source]](https://stdlib.ponylang.io/src/ponytest/test_helper/#L412)

 MUST be called for each action expectation that was set up in a long test to fulfill the expectations. Any expectations that are still outstanding when the long test timeout runs out will be printed by name when it fails.

 Completing all outstanding actions is enough to finish the test. There's no need to also call the complete method when the actions are finished.

 Calling the complete method will finish the test immediately, without waiting for any outstanding actions to be completed.

 
```
fun box complete_action(
  name: String val)
: None val

```
 #### Parameters

 * name: [String](builtin-string) val

 #### Returns

 * [None](builtin-none) val

 ### fail\_action

 [[Source]](https://stdlib.ponylang.io/src/ponytest/test_helper/#L426)

 Call to fail an action, which will also cause the entire test to fail immediately, without waiting the rest of the outstanding actions.

 The name of the failed action will be included in the failure output.

 Usually the action name should be an expected action set up by a call to expect\_action, but failing unexpected actions will also fail the test.

 
```
fun box fail_action(
  name: String val)
: None val

```
 #### Parameters

 * name: [String](builtin-string) val

 #### Returns

 * [None](builtin-none) val

 ### dispose\_when\_done

 [[Source]](https://stdlib.ponylang.io/src/ponytest/test_helper/#L438)

 Pass a disposable actor to be disposed of when the test is complete. The actor will be disposed no matter whether the test succeeds or fails.

 If the test is already tearing down, the actor will be disposed immediately.

 
```
fun box dispose_when_done(
  disposable: DisposableActor tag)
: None val

```
 #### Parameters

 * disposable: [DisposableActor](builtin-disposableactor) tag

 #### Returns

 * [None](builtin-none) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/ponytest-TestHelper>

PonyTest
========

 [[Source]](https://stdlib.ponylang.io/src/ponytest/pony_test/#L245)

 Main test framework actor that organises tests, collates information and prints results.

 
```
actor tag PonyTest

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/ponytest/pony_test/#L270)

 Create a PonyTest object and use it to run the tests from the given TestList

 
```
new tag create(
  env: Env val,
  list: TestList tag)
: PonyTest tag^

```
 #### Parameters

 * env: [Env](builtin-env) val
* list: [TestList](ponytest-testlist) tag

 #### Returns

 * [PonyTest](index) tag^

 Public Behaviours
-----------------

 ### apply

 [[Source]](https://stdlib.ponylang.io/src/ponytest/pony_test/#L282)

 Run the given test, subject to our filters and options.

 
```
be apply(
  test: UnitTest iso)

```
 #### Parameters

 * test: [UnitTest](ponytest-unittest) iso



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/ponytest-PonyTest>

ITest
=====

 [[Source]](https://stdlib.ponylang.io/src/ponytest/test_helper/#L1)

 
```
interface ref ITest

```
 Public Functions
----------------

 ### apply

 [[Source]](https://stdlib.ponylang.io/src/ponytest/test_helper/#L2)

 
```
fun box apply()
: None val ?

```
 #### Returns

 * [None](builtin-none) val ?



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/ponytest-ITest>

PonyBench
=========

 [[Source]](https://stdlib.ponylang.io/src/ponybench/pony_bench/#L108)

 
```
actor tag PonyBench

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/ponybench/pony_bench/#L114)

 
```
new tag create(
  env: Env val,
  list: BenchmarkList tag)
: PonyBench tag^

```
 #### Parameters

 * env: [Env](builtin-env) val
* list: [BenchmarkList](ponybench-benchmarklist) tag

 #### Returns

 * [PonyBench](index) tag^

 Public Behaviours
-----------------

 ### apply

 [[Source]](https://stdlib.ponylang.io/src/ponybench/pony_bench/#L128)

 
```
be apply(
  bench: (MicroBenchmark iso | AsyncMicroBenchmark iso))

```
 #### Parameters

 * bench: ([MicroBenchmark](ponybench-microbenchmark) iso | [AsyncMicroBenchmark](ponybench-asyncmicrobenchmark) iso)



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/ponybench-PonyBench>

MicroBenchmark
==============

 [[Source]](https://stdlib.ponylang.io/src/ponybench/benchmark/#L9)

 Synchronous benchmarks must provide this trait. The `apply` method defines a single iteration in a sample. Setup and Teardown are defined by the `before` and `after` methods respectively. The `before` method runs before a sample of benchmarks and `after` runs after the all iterations in the sample have completed. If your benchmark requires setup and/or teardown to occur beween each iteration of the benchmark, then you can use `before_iteration` and `after_iteration` methods respectively that run before/after each iteration.

 
```
trait iso MicroBenchmark

```
 Public Functions
----------------

 ### name

 [[Source]](https://stdlib.ponylang.io/src/ponybench/benchmark/#L19)

 
```
fun box name()
: String val

```
 #### Returns

 * [String](builtin-string) val

 ### config

 [[Source]](https://stdlib.ponylang.io/src/ponybench/benchmark/#L20)

 
```
fun box config()
: BenchConfig val

```
 #### Returns

 * [BenchConfig](ponybench-benchconfig) val

 ### overhead

 [[Source]](https://stdlib.ponylang.io/src/ponybench/benchmark/#L21)

 
```
fun box overhead()
: MicroBenchmark iso^

```
 #### Returns

 * [MicroBenchmark](index) iso^

 ### before

 [[Source]](https://stdlib.ponylang.io/src/ponybench/benchmark/#L22)

 
```
fun ref before()
: None val ?

```
 #### Returns

 * [None](builtin-none) val ?

 ### before\_iteration

 [[Source]](https://stdlib.ponylang.io/src/ponybench/benchmark/#L23)

 
```
fun ref before_iteration()
: None val ?

```
 #### Returns

 * [None](builtin-none) val ?

 ### apply

 [[Source]](https://stdlib.ponylang.io/src/ponybench/benchmark/#L24)

 
```
fun ref apply()
: None val ?

```
 #### Returns

 * [None](builtin-none) val ?

 ### after

 [[Source]](https://stdlib.ponylang.io/src/ponybench/benchmark/#L25)

 
```
fun ref after()
: None val ?

```
 #### Returns

 * [None](builtin-none) val ?

 ### after\_iteration

 [[Source]](https://stdlib.ponylang.io/src/ponybench/benchmark/#L26)

 
```
fun ref after_iteration()
: None val ?

```
 #### Returns

 * [None](builtin-none) val ?



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/ponybench-MicroBenchmark>

SignalNotify
============

 [[Source]](https://stdlib.ponylang.io/src/signals/signal_notify/#L1)

 Notifications for a signal.

 
```
interface ref SignalNotify

```
 Public Functions
----------------

 ### apply

 [[Source]](https://stdlib.ponylang.io/src/signals/signal_notify/#L5)

 Called with the the number of times the signal has fired since this was last called. Return false to stop listening for the signal.

 
```
fun ref apply(
  count: U32 val)
: Bool val

```
 #### Parameters

 * count: [U32](builtin-u32) val

 #### Returns

 * [Bool](builtin-bool) val

 ### dispose

 [[Source]](https://stdlib.ponylang.io/src/signals/signal_notify/#L12)

 Called if the signal is disposed. This is also called if the notifier returns false.

 
```
fun ref dispose()
: None val

```
 #### Returns

 * [None](builtin-none) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/signals-SignalNotify>

AsyncMicroBenchmark
===================

 [[Source]](https://stdlib.ponylang.io/src/ponybench/benchmark/#L28)

 Asynchronous benchmarks must provide this trait. The `apply` method defines a single iteration in a sample. Each phase of the sample completes when the given `AsyncBenchContinue` has its `complete` method invoked. Setup and Teardown are defined by the `before` and `after` methods respectively. The `before` method runs before a sample of benchmarks and `after` runs after the all iterations in the sample have completed. If your benchmark requires setup and/or teardown to occur beween each iteration of the benchmark, then you can use `before_iteration` and `after_iteration` methods respectively that run before/after each iteration.

 
```
trait iso AsyncMicroBenchmark

```
 Public Functions
----------------

 ### name

 [[Source]](https://stdlib.ponylang.io/src/ponybench/benchmark/#L40)

 
```
fun box name()
: String val

```
 #### Returns

 * [String](builtin-string) val

 ### config

 [[Source]](https://stdlib.ponylang.io/src/ponybench/benchmark/#L41)

 
```
fun box config()
: BenchConfig val

```
 #### Returns

 * [BenchConfig](ponybench-benchconfig) val

 ### overhead

 [[Source]](https://stdlib.ponylang.io/src/ponybench/benchmark/#L42)

 
```
fun box overhead()
: AsyncMicroBenchmark iso^

```
 #### Returns

 * [AsyncMicroBenchmark](index) iso^

 ### before

 [[Source]](https://stdlib.ponylang.io/src/ponybench/benchmark/#L43)

 
```
fun ref before(
  c: AsyncBenchContinue val)
: None val

```
 #### Parameters

 * c: [AsyncBenchContinue](ponybench-asyncbenchcontinue) val

 #### Returns

 * [None](builtin-none) val

 ### before\_iteration

 [[Source]](https://stdlib.ponylang.io/src/ponybench/benchmark/#L44)

 
```
fun ref before_iteration(
  c: AsyncBenchContinue val)
: None val

```
 #### Parameters

 * c: [AsyncBenchContinue](ponybench-asyncbenchcontinue) val

 #### Returns

 * [None](builtin-none) val

 ### apply

 [[Source]](https://stdlib.ponylang.io/src/ponybench/benchmark/#L45)

 
```
fun ref apply(
  c: AsyncBenchContinue val)
: None val ?

```
 #### Parameters

 * c: [AsyncBenchContinue](ponybench-asyncbenchcontinue) val

 #### Returns

 * [None](builtin-none) val ?

 ### after

 [[Source]](https://stdlib.ponylang.io/src/ponybench/benchmark/#L46)

 
```
fun ref after(
  c: AsyncBenchContinue val)
: None val

```
 #### Parameters

 * c: [AsyncBenchContinue](ponybench-asyncbenchcontinue) val

 #### Returns

 * [None](builtin-none) val

 ### after\_iteration

 [[Source]](https://stdlib.ponylang.io/src/ponybench/benchmark/#L47)

 
```
fun ref after_iteration(
  c: AsyncBenchContinue val)
: None val

```
 #### Parameters

 * c: [AsyncBenchContinue](ponybench-asyncbenchcontinue) val

 #### Returns

 * [None](builtin-none) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/ponybench-AsyncMicroBenchmark>

BenchmarkList
=============

 [[Source]](https://stdlib.ponylang.io/src/ponybench/benchmark/#L49)

 
```
interface tag BenchmarkList

```
 Public Functions
----------------

 ### benchmarks

 [[Source]](https://stdlib.ponylang.io/src/ponybench/benchmark/#L50)

 
```
fun tag benchmarks(
  bench: PonyBench tag)
: None val

```
 #### Parameters

 * bench: [PonyBench](ponybench-ponybench) tag

 #### Returns

 * [None](builtin-none) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/ponybench-BenchmarkList>

SignalRaise
===========

 [[Source]](https://stdlib.ponylang.io/src/signals/signal_notify/#L19)

 Raise a signal.

 
```
primitive val SignalRaise

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/signals/signal_notify/#L19)

 
```
new val create()
: SignalRaise val^

```
 #### Returns

 * [SignalRaise](index) val^

 Public Functions
----------------

 ### apply

 [[Source]](https://stdlib.ponylang.io/src/signals/signal_notify/#L23)

 
```
fun box apply(
  sig: U32 val)
: None val

```
 #### Parameters

 * sig: [U32](builtin-u32) val

 #### Returns

 * [None](builtin-none) val

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/signals/signal_notify/#L23)

 
```
fun box eq(
  that: SignalRaise val)
: Bool val

```
 #### Parameters

 * that: [SignalRaise](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/signals/signal_notify/#L23)

 
```
fun box ne(
  that: SignalRaise val)
: Bool val

```
 #### Parameters

 * that: [SignalRaise](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/signals-SignalRaise>

Benchmark
=========

 [[Source]](https://stdlib.ponylang.io/src/ponybench/benchmark/#L2)

 
```
type Benchmark is
  (MicroBenchmark iso | AsyncMicroBenchmark iso)

```
 #### Type Alias For

 * ([MicroBenchmark](ponybench-microbenchmark) iso | [AsyncMicroBenchmark](ponybench-asyncmicrobenchmark) iso)



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/ponybench-Benchmark>

OverheadBenchmark
=================

 [[Source]](https://stdlib.ponylang.io/src/ponybench/benchmark/#L79)

 Default benchmark for measuring synchronous overhead.

 
```
class iso OverheadBenchmark is
  MicroBenchmark iso

```
 #### Implements

 * [MicroBenchmark](ponybench-microbenchmark) iso

 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/ponybench/benchmark/#L79)

 
```
new iso create()
: OverheadBenchmark iso^

```
 #### Returns

 * [OverheadBenchmark](index) iso^

 Public Functions
----------------

 ### name

 [[Source]](https://stdlib.ponylang.io/src/ponybench/benchmark/#L83)

 
```
fun box name()
: String val

```
 #### Returns

 * [String](builtin-string) val

 ### apply

 [[Source]](https://stdlib.ponylang.io/src/ponybench/benchmark/#L86)

 
```
fun ref apply()
: None val

```
 #### Returns

 * [None](builtin-none) val

 ### config

 [[Source]](https://stdlib.ponylang.io/src/ponybench/benchmark/#L20)

 
```
fun box config()
: BenchConfig val

```
 #### Returns

 * [BenchConfig](ponybench-benchconfig) val

 ### overhead

 [[Source]](https://stdlib.ponylang.io/src/ponybench/benchmark/#L21)

 
```
fun box overhead()
: MicroBenchmark iso^

```
 #### Returns

 * [MicroBenchmark](ponybench-microbenchmark) iso^

 ### before

 [[Source]](https://stdlib.ponylang.io/src/ponybench/benchmark/#L22)

 
```
fun ref before()
: None val ?

```
 #### Returns

 * [None](builtin-none) val ?

 ### before\_iteration

 [[Source]](https://stdlib.ponylang.io/src/ponybench/benchmark/#L23)

 
```
fun ref before_iteration()
: None val ?

```
 #### Returns

 * [None](builtin-none) val ?

 ### after

 [[Source]](https://stdlib.ponylang.io/src/ponybench/benchmark/#L25)

 
```
fun ref after()
: None val ?

```
 #### Returns

 * [None](builtin-none) val ?

 ### after\_iteration

 [[Source]](https://stdlib.ponylang.io/src/ponybench/benchmark/#L26)

 
```
fun ref after_iteration()
: None val ?

```
 #### Returns

 * [None](builtin-none) val ?



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/ponybench-OverheadBenchmark>

AsyncOverheadBenchmark
======================

 [[Source]](https://stdlib.ponylang.io/src/ponybench/benchmark/#L90)

 Default benchmark for measuring asynchronous overhead.

 
```
class iso AsyncOverheadBenchmark is
  AsyncMicroBenchmark iso

```
 #### Implements

 * [AsyncMicroBenchmark](ponybench-asyncmicrobenchmark) iso

 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/ponybench/benchmark/#L90)

 
```
new iso create()
: AsyncOverheadBenchmark iso^

```
 #### Returns

 * [AsyncOverheadBenchmark](index) iso^

 Public Functions
----------------

 ### name

 [[Source]](https://stdlib.ponylang.io/src/ponybench/benchmark/#L94)

 
```
fun box name()
: String val

```
 #### Returns

 * [String](builtin-string) val

 ### apply

 [[Source]](https://stdlib.ponylang.io/src/ponybench/benchmark/#L97)

 
```
fun ref apply(
  c: AsyncBenchContinue val)
: None val

```
 #### Parameters

 * c: [AsyncBenchContinue](ponybench-asyncbenchcontinue) val

 #### Returns

 * [None](builtin-none) val

 ### config

 [[Source]](https://stdlib.ponylang.io/src/ponybench/benchmark/#L41)

 
```
fun box config()
: BenchConfig val

```
 #### Returns

 * [BenchConfig](ponybench-benchconfig) val

 ### overhead

 [[Source]](https://stdlib.ponylang.io/src/ponybench/benchmark/#L42)

 
```
fun box overhead()
: AsyncMicroBenchmark iso^

```
 #### Returns

 * [AsyncMicroBenchmark](ponybench-asyncmicrobenchmark) iso^

 ### before

 [[Source]](https://stdlib.ponylang.io/src/ponybench/benchmark/#L43)

 
```
fun ref before(
  c: AsyncBenchContinue val)
: None val

```
 #### Parameters

 * c: [AsyncBenchContinue](ponybench-asyncbenchcontinue) val

 #### Returns

 * [None](builtin-none) val

 ### before\_iteration

 [[Source]](https://stdlib.ponylang.io/src/ponybench/benchmark/#L44)

 
```
fun ref before_iteration(
  c: AsyncBenchContinue val)
: None val

```
 #### Parameters

 * c: [AsyncBenchContinue](ponybench-asyncbenchcontinue) val

 #### Returns

 * [None](builtin-none) val

 ### after

 [[Source]](https://stdlib.ponylang.io/src/ponybench/benchmark/#L46)

 
```
fun ref after(
  c: AsyncBenchContinue val)
: None val

```
 #### Parameters

 * c: [AsyncBenchContinue](ponybench-asyncbenchcontinue) val

 #### Returns

 * [None](builtin-none) val

 ### after\_iteration

 [[Source]](https://stdlib.ponylang.io/src/ponybench/benchmark/#L47)

 
```
fun ref after_iteration(
  c: AsyncBenchContinue val)
: None val

```
 #### Parameters

 * c: [AsyncBenchContinue](ponybench-asyncbenchcontinue) val

 #### Returns

 * [None](builtin-none) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/ponybench-AsyncOverheadBenchmark>

AsyncBenchContinue
==================

 [[Source]](https://stdlib.ponylang.io/src/ponybench/_runner/#L145)

 
```
class val AsyncBenchContinue

```
 Public Functions
----------------

 ### complete

 [[Source]](https://stdlib.ponylang.io/src/ponybench/_runner/#L153)

 
```
fun box complete()
: None val

```
 #### Returns

 * [None](builtin-none) val

 ### fail

 [[Source]](https://stdlib.ponylang.io/src/ponybench/_runner/#L157)

 
```
fun box fail()
: None val

```
 #### Returns

 * [None](builtin-none) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/ponybench-AsyncBenchContinue>

BenchConfig
===========

 [[Source]](https://stdlib.ponylang.io/src/ponybench/benchmark/#L53)

 Configuration of a benchmark.

 
```
class val BenchConfig

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/ponybench/benchmark/#L70)

 
```
new val create(
  samples': USize val = 20,
  max_iterations': U64 val = 1000000000,
  max_sample_time': U64 val = 100000000)
: BenchConfig val^

```
 #### Parameters

 * samples': [USize](builtin-usize) val = 20
* max\_iterations': [U64](builtin-u64) val = 1000000000
* max\_sample\_time': [U64](builtin-u64) val = 100000000

 #### Returns

 * [BenchConfig](index) val^

 Public fields
-------------

 ### let samples: [USize](builtin-usize) val

 [[Source]](https://stdlib.ponylang.io/src/ponybench/benchmark/#L57)

 Total number of samples to be measured. (Default: 20)

 ### let max\_iterations: [U64](builtin-u64) val

 [[Source]](https://stdlib.ponylang.io/src/ponybench/benchmark/#L61)

 Maximum number of iterations to execute per sample. (Default: 1\_000\_000\_000)

 ### let max\_sample\_time: [U64](builtin-u64) val

 [[Source]](https://stdlib.ponylang.io/src/ponybench/benchmark/#L65)

 Maximum time to execute a sample in Nanoseconds. (Default: 100\_000\_000)



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/ponybench-BenchConfig>

SignalHandler
=============

 [[Source]](https://stdlib.ponylang.io/src/signals/signal_handler/#L10)

 Listen for a specific signal. If the wait parameter is true, the program will not terminate until the SignalHandler's dispose method is called, or if the SignalNotify returns false, after handling the signal as this also disposes the SignalHandler and unsubscribes it.

 
```
actor tag SignalHandler

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/signals/signal_handler/#L20)

 Create a signal handler.

 
```
new tag create(
  notify: SignalNotify iso,
  sig: U32 val,
  wait: Bool val = false)
: SignalHandler tag^

```
 #### Parameters

 * notify: [SignalNotify](signals-signalnotify) iso
* sig: [U32](builtin-u32) val
* wait: [Bool](builtin-bool) val = false

 #### Returns

 * [SignalHandler](index) tag^

 Public Behaviours
-----------------

 ### raise

 [[Source]](https://stdlib.ponylang.io/src/signals/signal_handler/#L29)

 Raise the signal.

 
```
be raise()

```
 ### dispose

 [[Source]](https://stdlib.ponylang.io/src/signals/signal_handler/#L35)

 Dispose of the signal handler.

 
```
be dispose()

```


 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/signals-SignalHandler>

XorOshiro128StarStar
====================

 [[Source]](https://stdlib.ponylang.io/src/random/xoroshiro/#L44)

 This is an implementation of xoroshiro128\*\*, as detailed at:

 http://xoshiro.di.unimi.it/

 This Rand implementation is slightly slower than [XorOshiro128Plus](random-xoroshiro128plus) but does not exhibit "mild dependencies in Hamming weights" (the lower four bits might fail linearity tests).

 
```
class ref XorOshiro128StarStar is
  Random ref

```
 #### Implements

 * [Random](random-random) ref

 Constructors
------------

 ### from\_u64

 [[Source]](https://stdlib.ponylang.io/src/random/xoroshiro/#L57)

 Use seed x to seed a [SplitMix64](random-splitmix64) and use this to initialize the 128 bits of state.

 
```
new ref from_u64(
  x: U64 val = 5489)
: XorOshiro128StarStar ref^

```
 #### Parameters

 * x: [U64](builtin-u64) val = 5489

 #### Returns

 * [XorOshiro128StarStar](index) ref^

 ### create

 [[Source]](https://stdlib.ponylang.io/src/random/xoroshiro/#L66)

 
```
new ref create(
  x: U64 val = 5489,
  y: U64 val = 0)
: XorOshiro128StarStar ref^

```
 #### Parameters

 * x: [U64](builtin-u64) val = 5489
* y: [U64](builtin-u64) val = 0

 #### Returns

 * [XorOshiro128StarStar](index) ref^

 Public Functions
----------------

 ### next

 [[Source]](https://stdlib.ponylang.io/src/random/xoroshiro/#L71)

 
```
fun ref next()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### has\_next

 
```
fun tag has_next()
: Bool val

```
 #### Returns

 * [Bool](builtin-bool) val

 ### u8

 
```
fun ref u8()
: U8 val

```
 #### Returns

 * [U8](builtin-u8) val

 ### u16

 
```
fun ref u16()
: U16 val

```
 #### Returns

 * [U16](builtin-u16) val

 ### u32

 
```
fun ref u32()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### u64

 
```
fun ref u64()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### u128

 
```
fun ref u128()
: U128 val

```
 #### Returns

 * [U128](builtin-u128) val

 ### ulong

 
```
fun ref ulong()
: ULong val

```
 #### Returns

 * [ULong](builtin-ulong) val

 ### usize

 
```
fun ref usize()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### i8

 
```
fun ref i8()
: I8 val

```
 #### Returns

 * [I8](builtin-i8) val

 ### i16

 
```
fun ref i16()
: I16 val

```
 #### Returns

 * [I16](builtin-i16) val

 ### i32

 
```
fun ref i32()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### i64

 
```
fun ref i64()
: I64 val

```
 #### Returns

 * [I64](builtin-i64) val

 ### i128

 
```
fun ref i128()
: I128 val

```
 #### Returns

 * [I128](builtin-i128) val

 ### ilong

 
```
fun ref ilong()
: ILong val

```
 #### Returns

 * [ILong](builtin-ilong) val

 ### isize

 
```
fun ref isize()
: ISize val

```
 #### Returns

 * [ISize](builtin-isize) val

 ### int\_fp\_mult[optional N: (([U8](builtin-u8) val | [U16](builtin-u16) val | [U32](builtin-u32) val | [U64](builtin-u64) val | [U128](builtin-u128) val | [ULong](builtin-ulong) val | [USize](builtin-usize) val) & [Real](builtin-real)[N] val)]

 
```
fun ref int_fp_mult[optional N: ((U8 val | U16 val | U32 val | 
    U64 val | U128 val | ULong val | 
    USize val) & Real[N] val)](
  n: N)
: N

```
 #### Parameters

 * n: N

 #### Returns

 * N

 ### int[optional N: (([U8](builtin-u8) val | [U16](builtin-u16) val | [U32](builtin-u32) val | [U64](builtin-u64) val | [U128](builtin-u128) val | [ULong](builtin-ulong) val | [USize](builtin-usize) val) & [Real](builtin-real)[N] val)]

 
```
fun ref int[optional N: ((U8 val | U16 val | U32 val | 
    U64 val | U128 val | ULong val | 
    USize val) & Real[N] val)](
  n: N)
: N

```
 #### Parameters

 * n: N

 #### Returns

 * N

 ### int\_unbiased[optional N: (([U8](builtin-u8) val | [U16](builtin-u16) val | [U32](builtin-u32) val | [U64](builtin-u64) val | [U128](builtin-u128) val | [ULong](builtin-ulong) val | [USize](builtin-usize) val) & [Real](builtin-real)[N] val)]

 
```
fun ref int_unbiased[optional N: ((U8 val | U16 val | U32 val | 
    U64 val | U128 val | ULong val | 
    USize val) & Real[N] val)](
  n: N)
: N

```
 #### Parameters

 * n: N

 #### Returns

 * N

 ### real

 
```
fun ref real()
: F64 val

```
 #### Returns

 * [F64](builtin-f64) val

 ### shuffle[A: A]

 
```
fun ref shuffle[A: A](
  array: Array[A] ref)
: None val

```
 #### Parameters

 * array: [Array](builtin-array)[A] ref

 #### Returns

 * [None](builtin-none) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/random-XorOshiro128StarStar>

XorShift128Plus
===============

 [[Source]](https://stdlib.ponylang.io/src/random/xorshift/#L1)

 This is an implementation of xorshift+, as detailed at:

 http://xoroshiro.di.unimi.it

 This should only be used for legacy applications that specifically require XorShift128Plus, otherwise use Rand.

 
```
class ref XorShift128Plus is
  Random ref

```
 #### Implements

 * [Random](random-random) ref

 Constructors
------------

 ### from\_u64

 [[Source]](https://stdlib.ponylang.io/src/random/xorshift/#L13)

 Use seed x to seed a [SplitMix64](random-splitmix64) and use this to initialize the 128 bits of state.

 
```
new ref from_u64(
  x: U64 val = 5489)
: XorShift128Plus ref^

```
 #### Parameters

 * x: [U64](builtin-u64) val = 5489

 #### Returns

 * [XorShift128Plus](index) ref^

 ### create

 [[Source]](https://stdlib.ponylang.io/src/random/xorshift/#L22)

 Create with the specified seed. Returned values are deterministic for a given seed.

 
```
new ref create(
  x: U64 val = 5489,
  y: U64 val = 0)
: XorShift128Plus ref^

```
 #### Parameters

 * x: [U64](builtin-u64) val = 5489
* y: [U64](builtin-u64) val = 0

 #### Returns

 * [XorShift128Plus](index) ref^

 Public Functions
----------------

 ### next

 [[Source]](https://stdlib.ponylang.io/src/random/xorshift/#L31)

 A random integer in [0, 2^64)

 
```
fun ref next()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### has\_next

 
```
fun tag has_next()
: Bool val

```
 #### Returns

 * [Bool](builtin-bool) val

 ### u8

 
```
fun ref u8()
: U8 val

```
 #### Returns

 * [U8](builtin-u8) val

 ### u16

 
```
fun ref u16()
: U16 val

```
 #### Returns

 * [U16](builtin-u16) val

 ### u32

 
```
fun ref u32()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### u64

 
```
fun ref u64()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### u128

 
```
fun ref u128()
: U128 val

```
 #### Returns

 * [U128](builtin-u128) val

 ### ulong

 
```
fun ref ulong()
: ULong val

```
 #### Returns

 * [ULong](builtin-ulong) val

 ### usize

 
```
fun ref usize()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### i8

 
```
fun ref i8()
: I8 val

```
 #### Returns

 * [I8](builtin-i8) val

 ### i16

 
```
fun ref i16()
: I16 val

```
 #### Returns

 * [I16](builtin-i16) val

 ### i32

 
```
fun ref i32()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### i64

 
```
fun ref i64()
: I64 val

```
 #### Returns

 * [I64](builtin-i64) val

 ### i128

 
```
fun ref i128()
: I128 val

```
 #### Returns

 * [I128](builtin-i128) val

 ### ilong

 
```
fun ref ilong()
: ILong val

```
 #### Returns

 * [ILong](builtin-ilong) val

 ### isize

 
```
fun ref isize()
: ISize val

```
 #### Returns

 * [ISize](builtin-isize) val

 ### int\_fp\_mult[optional N: (([U8](builtin-u8) val | [U16](builtin-u16) val | [U32](builtin-u32) val | [U64](builtin-u64) val | [U128](builtin-u128) val | [ULong](builtin-ulong) val | [USize](builtin-usize) val) & [Real](builtin-real)[N] val)]

 
```
fun ref int_fp_mult[optional N: ((U8 val | U16 val | U32 val | 
    U64 val | U128 val | ULong val | 
    USize val) & Real[N] val)](
  n: N)
: N

```
 #### Parameters

 * n: N

 #### Returns

 * N

 ### int[optional N: (([U8](builtin-u8) val | [U16](builtin-u16) val | [U32](builtin-u32) val | [U64](builtin-u64) val | [U128](builtin-u128) val | [ULong](builtin-ulong) val | [USize](builtin-usize) val) & [Real](builtin-real)[N] val)]

 
```
fun ref int[optional N: ((U8 val | U16 val | U32 val | 
    U64 val | U128 val | ULong val | 
    USize val) & Real[N] val)](
  n: N)
: N

```
 #### Parameters

 * n: N

 #### Returns

 * N

 ### int\_unbiased[optional N: (([U8](builtin-u8) val | [U16](builtin-u16) val | [U32](builtin-u32) val | [U64](builtin-u64) val | [U128](builtin-u128) val | [ULong](builtin-ulong) val | [USize](builtin-usize) val) & [Real](builtin-real)[N] val)]

 
```
fun ref int_unbiased[optional N: ((U8 val | U16 val | U32 val | 
    U64 val | U128 val | ULong val | 
    USize val) & Real[N] val)](
  n: N)
: N

```
 #### Parameters

 * n: N

 #### Returns

 * N

 ### real

 
```
fun ref real()
: F64 val

```
 #### Returns

 * [F64](builtin-f64) val

 ### shuffle[A: A]

 
```
fun ref shuffle[A: A](
  array: Array[A] ref)
: None val

```
 #### Parameters

 * array: [Array](builtin-array)[A] ref

 #### Returns

 * [None](builtin-none) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/random-XorShift128Plus>

OSSockOpt
=========

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L4)

 Convenience functions to fetch the option level and option name constants (arguments #2 and #3) for the `getsockopt(2)` and `setsockopt(2)` operating system calls.

 The values of the option level and option name constants are typically C preprocessor macros, e.g., `#define SOMETHING 42`. These macro names are upper case and may contain multiple consecutive underscore characters (though this is rare, for example, `IP_NAT__XXX`). The function names in this primitive are derived by the C macro name and then:

 * converted to lower case
* any double underscore (`__`) is converted to a single underscore (`_`).

 These constants are *not* stable between Pony releases. Values returned by this function may be held by long-lived variables by the calling process: values cannot change while the process runs. Programmers must not cache any of these values for purposes of sharing them for use by any other Pony program (for example, sharing via serialization & deserialization or via direct shared memory).

 Many functions may return `-1`, which means that the constant's value could not be determined at the Pony runtime library compile time. One cause may be that the option truly isn't available, for example, the option level constant `IPPROTO_3PC` is available on MacOS 10.x but not on Linux 4.4. Another cause may be the Pony runtime library's compilation did not include the correct header file(s) for the target OS platform.

 A third cause of error is due to the regular expression-based approach used to harvest desirable constants. It is not fool-proof. The regexp used is too broad and finds some macros that are not supposed to be used with `getsockopt(2)` and `setsockopt(2)`. Please consult your platform's documentation to verify the names of the option level and option name macros.

 The following code fragments are equivalent: set the socket receive buffer size for the file descriptor `fd` to `4455`.

 
```
/* In C */
int option_value = 4455;
setsockopt(fd, SOL_SOCKET, SO_RCVBUF, &option_value, 4);

/* In Pony */
var option: I32 = 4455;
@pony_os_setsockopt[I32](fd, OSSockOpt.sol_socket(), OSSockOpt.so_rcvbuf(),
  addressof option, I32(4))

```
 
```
primitive val OSSockOpt

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L4)

 
```
new val create()
: OSSockOpt val^

```
 #### Returns

 * [OSSockOpt](index) val^

 Public Functions
----------------

 ### ipproto\_3pc

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L76)

 
```
fun box ipproto_3pc()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_adfs

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L77)

 
```
fun box ipproto_adfs()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_ah

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L78)

 
```
fun box ipproto_ah()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_ahip

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L79)

 
```
fun box ipproto_ahip()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_apes

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L80)

 
```
fun box ipproto_apes()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_argus

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L81)

 
```
fun box ipproto_argus()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_ax25

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L82)

 
```
fun box ipproto_ax25()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_beetph

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L83)

 
```
fun box ipproto_beetph()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_bha

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L84)

 
```
fun box ipproto_bha()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_blt

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L85)

 
```
fun box ipproto_blt()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_brsatmon

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L86)

 
```
fun box ipproto_brsatmon()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_carp

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L87)

 
```
fun box ipproto_carp()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_cftp

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L88)

 
```
fun box ipproto_cftp()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_chaos

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L89)

 
```
fun box ipproto_chaos()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_cmtp

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L90)

 
```
fun box ipproto_cmtp()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_comp

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L91)

 
```
fun box ipproto_comp()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_cphb

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L92)

 
```
fun box ipproto_cphb()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_cpnx

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L93)

 
```
fun box ipproto_cpnx()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_dccp

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L94)

 
```
fun box ipproto_dccp()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_ddp

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L95)

 
```
fun box ipproto_ddp()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_dgp

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L96)

 
```
fun box ipproto_dgp()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_divert

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L97)

 
```
fun box ipproto_divert()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_done

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L98)

 
```
fun box ipproto_done()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_dstopts

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L99)

 
```
fun box ipproto_dstopts()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_egp

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L100)

 
```
fun box ipproto_egp()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_emcon

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L101)

 
```
fun box ipproto_emcon()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_encap

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L102)

 
```
fun box ipproto_encap()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_eon

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L103)

 
```
fun box ipproto_eon()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_esp

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L104)

 
```
fun box ipproto_esp()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_etherip

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L105)

 
```
fun box ipproto_etherip()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_fragment

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L106)

 
```
fun box ipproto_fragment()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_ggp

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L107)

 
```
fun box ipproto_ggp()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_gmtp

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L108)

 
```
fun box ipproto_gmtp()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_gre

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L109)

 
```
fun box ipproto_gre()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_hello

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L110)

 
```
fun box ipproto_hello()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_hip

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L111)

 
```
fun box ipproto_hip()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_hmp

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L112)

 
```
fun box ipproto_hmp()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_hopopts

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L113)

 
```
fun box ipproto_hopopts()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_icmp

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L114)

 
```
fun box ipproto_icmp()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_icmpv6

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L115)

 
```
fun box ipproto_icmpv6()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_idp

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L116)

 
```
fun box ipproto_idp()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_idpr

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L117)

 
```
fun box ipproto_idpr()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_idrp

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L118)

 
```
fun box ipproto_idrp()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_igmp

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L119)

 
```
fun box ipproto_igmp()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_igp

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L120)

 
```
fun box ipproto_igp()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_igrp

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L121)

 
```
fun box ipproto_igrp()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_il

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L122)

 
```
fun box ipproto_il()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_inlsp

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L123)

 
```
fun box ipproto_inlsp()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_inp

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L124)

 
```
fun box ipproto_inp()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_ip

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L125)

 
```
fun box ipproto_ip()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_ipcomp

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L126)

 
```
fun box ipproto_ipcomp()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_ipcv

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L127)

 
```
fun box ipproto_ipcv()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_ipeip

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L128)

 
```
fun box ipproto_ipeip()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_ipip

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L129)

 
```
fun box ipproto_ipip()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_ippc

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L130)

 
```
fun box ipproto_ippc()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_ipv4

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L131)

 
```
fun box ipproto_ipv4()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_ipv6

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L132)

 
```
fun box ipproto_ipv6()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_irtp

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L133)

 
```
fun box ipproto_irtp()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_kryptolan

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L134)

 
```
fun box ipproto_kryptolan()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_larp

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L135)

 
```
fun box ipproto_larp()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_leaf1

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L136)

 
```
fun box ipproto_leaf1()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_leaf2

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L137)

 
```
fun box ipproto_leaf2()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_max

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L138)

 
```
fun box ipproto_max()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_maxid

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L139)

 
```
fun box ipproto_maxid()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_meas

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L140)

 
```
fun box ipproto_meas()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_mh

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L141)

 
```
fun box ipproto_mh()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_mhrp

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L142)

 
```
fun box ipproto_mhrp()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_micp

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L143)

 
```
fun box ipproto_micp()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_mobile

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L144)

 
```
fun box ipproto_mobile()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_mpls

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L145)

 
```
fun box ipproto_mpls()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_mtp

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L146)

 
```
fun box ipproto_mtp()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_mux

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L147)

 
```
fun box ipproto_mux()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_nd

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L148)

 
```
fun box ipproto_nd()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_nhrp

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L149)

 
```
fun box ipproto_nhrp()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_none

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L150)

 
```
fun box ipproto_none()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_nsp

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L151)

 
```
fun box ipproto_nsp()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_nvpii

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L152)

 
```
fun box ipproto_nvpii()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_old\_divert

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L153)

 
```
fun box ipproto_old_divert()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_ospfigp

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L154)

 
```
fun box ipproto_ospfigp()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_pfsync

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L155)

 
```
fun box ipproto_pfsync()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_pgm

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L156)

 
```
fun box ipproto_pgm()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_pigp

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L157)

 
```
fun box ipproto_pigp()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_pim

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L158)

 
```
fun box ipproto_pim()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_prm

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L159)

 
```
fun box ipproto_prm()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_pup

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L160)

 
```
fun box ipproto_pup()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_pvp

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L161)

 
```
fun box ipproto_pvp()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_raw

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L162)

 
```
fun box ipproto_raw()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_rccmon

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L163)

 
```
fun box ipproto_rccmon()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_rdp

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L164)

 
```
fun box ipproto_rdp()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_reserved\_253

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L165)

 
```
fun box ipproto_reserved_253()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_reserved\_254

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L166)

 
```
fun box ipproto_reserved_254()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_routing

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L167)

 
```
fun box ipproto_routing()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_rsvp

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L168)

 
```
fun box ipproto_rsvp()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_rvd

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L169)

 
```
fun box ipproto_rvd()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_satexpak

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L170)

 
```
fun box ipproto_satexpak()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_satmon

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L171)

 
```
fun box ipproto_satmon()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_sccsp

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L172)

 
```
fun box ipproto_sccsp()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_sctp

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L173)

 
```
fun box ipproto_sctp()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_sdrp

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L174)

 
```
fun box ipproto_sdrp()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_send

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L175)

 
```
fun box ipproto_send()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_sep

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L176)

 
```
fun box ipproto_sep()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_shim6

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L177)

 
```
fun box ipproto_shim6()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_skip

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L178)

 
```
fun box ipproto_skip()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_spacer

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L179)

 
```
fun box ipproto_spacer()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_srpc

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L180)

 
```
fun box ipproto_srpc()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_st

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L181)

 
```
fun box ipproto_st()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_svmtp

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L182)

 
```
fun box ipproto_svmtp()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_swipe

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L183)

 
```
fun box ipproto_swipe()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_tcf

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L184)

 
```
fun box ipproto_tcf()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_tcp

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L185)

 
```
fun box ipproto_tcp()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_tlsp

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L186)

 
```
fun box ipproto_tlsp()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_tp

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L187)

 
```
fun box ipproto_tp()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_tpxx

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L188)

 
```
fun box ipproto_tpxx()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_trunk1

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L189)

 
```
fun box ipproto_trunk1()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_trunk2

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L190)

 
```
fun box ipproto_trunk2()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_ttp

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L191)

 
```
fun box ipproto_ttp()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_udp

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L192)

 
```
fun box ipproto_udp()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_udplite

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L193)

 
```
fun box ipproto_udplite()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_vines

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L194)

 
```
fun box ipproto_vines()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_visa

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L195)

 
```
fun box ipproto_visa()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_vmtp

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L196)

 
```
fun box ipproto_vmtp()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_wbexpak

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L197)

 
```
fun box ipproto_wbexpak()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_wbmon

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L198)

 
```
fun box ipproto_wbmon()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_wsn

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L199)

 
```
fun box ipproto_wsn()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_xnet

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L200)

 
```
fun box ipproto_xnet()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipproto\_xtp

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L201)

 
```
fun box ipproto_xtp()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sol\_atalk

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L202)

 
```
fun box sol_atalk()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sol\_ax25

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L203)

 
```
fun box sol_ax25()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sol\_hci\_raw

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L204)

 
```
fun box sol_hci_raw()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sol\_ipx

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L205)

 
```
fun box sol_ipx()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sol\_l2cap

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L206)

 
```
fun box sol_l2cap()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sol\_local

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L207)

 
```
fun box sol_local()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sol\_ndrvproto

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L208)

 
```
fun box sol_ndrvproto()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sol\_netrom

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L209)

 
```
fun box sol_netrom()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sol\_rds

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L210)

 
```
fun box sol_rds()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sol\_rfcomm

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L211)

 
```
fun box sol_rfcomm()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sol\_rose

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L212)

 
```
fun box sol_rose()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sol\_sco

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L213)

 
```
fun box sol_sco()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sol\_socket

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L214)

 
```
fun box sol_socket()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sol\_tipc

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L215)

 
```
fun box sol_tipc()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sol\_udp

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L216)

 
```
fun box sol_udp()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### af\_coip

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L225)

 
```
fun box af_coip()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### af\_inet

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L226)

 
```
fun box af_inet()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### af\_inet6

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L227)

 
```
fun box af_inet6()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### bluetooth\_proto\_sco

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L228)

 
```
fun box bluetooth_proto_sco()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### dccp\_nr\_pkt\_types

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L229)

 
```
fun box dccp_nr_pkt_types()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### dccp\_service\_list\_max\_len

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L230)

 
```
fun box dccp_service_list_max_len()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### dccp\_single\_opt\_maxlen

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L231)

 
```
fun box dccp_single_opt_maxlen()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### dccp\_sockopt\_available\_ccids

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L232)

 
```
fun box dccp_sockopt_available_ccids()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### dccp\_sockopt\_ccid

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L233)

 
```
fun box dccp_sockopt_ccid()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### dccp\_sockopt\_ccid\_rx\_info

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L234)

 
```
fun box dccp_sockopt_ccid_rx_info()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### dccp\_sockopt\_ccid\_tx\_info

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L235)

 
```
fun box dccp_sockopt_ccid_tx_info()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### dccp\_sockopt\_change\_l

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L236)

 
```
fun box dccp_sockopt_change_l()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### dccp\_sockopt\_change\_r

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L237)

 
```
fun box dccp_sockopt_change_r()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### dccp\_sockopt\_get\_cur\_mps

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L238)

 
```
fun box dccp_sockopt_get_cur_mps()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### dccp\_sockopt\_packet\_size

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L239)

 
```
fun box dccp_sockopt_packet_size()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### dccp\_sockopt\_qpolicy\_id

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L240)

 
```
fun box dccp_sockopt_qpolicy_id()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### dccp\_sockopt\_qpolicy\_txqlen

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L241)

 
```
fun box dccp_sockopt_qpolicy_txqlen()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### dccp\_sockopt\_recv\_cscov

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L242)

 
```
fun box dccp_sockopt_recv_cscov()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### dccp\_sockopt\_rx\_ccid

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L243)

 
```
fun box dccp_sockopt_rx_ccid()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### dccp\_sockopt\_send\_cscov

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L244)

 
```
fun box dccp_sockopt_send_cscov()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### dccp\_sockopt\_server\_timewait

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L245)

 
```
fun box dccp_sockopt_server_timewait()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### dccp\_sockopt\_service

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L246)

 
```
fun box dccp_sockopt_service()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### dccp\_sockopt\_tx\_ccid

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L247)

 
```
fun box dccp_sockopt_tx_ccid()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### dso\_acceptmode

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L248)

 
```
fun box dso_acceptmode()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### dso\_conaccept

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L249)

 
```
fun box dso_conaccept()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### dso\_conaccess

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L250)

 
```
fun box dso_conaccess()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### dso\_condata

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L251)

 
```
fun box dso_condata()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### dso\_conreject

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L252)

 
```
fun box dso_conreject()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### dso\_cork

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L253)

 
```
fun box dso_cork()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### dso\_disdata

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L254)

 
```
fun box dso_disdata()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### dso\_info

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L255)

 
```
fun box dso_info()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### dso\_linkinfo

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L256)

 
```
fun box dso_linkinfo()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### dso\_max

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L257)

 
```
fun box dso_max()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### dso\_maxwindow

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L258)

 
```
fun box dso_maxwindow()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### dso\_nodelay

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L259)

 
```
fun box dso_nodelay()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### dso\_seqpacket

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L260)

 
```
fun box dso_seqpacket()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### dso\_services

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L261)

 
```
fun box dso_services()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### dso\_stream

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L262)

 
```
fun box dso_stream()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### icmp\_address

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L263)

 
```
fun box icmp_address()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### icmp\_addressreply

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L264)

 
```
fun box icmp_addressreply()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### icmp\_dest\_unreach

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L265)

 
```
fun box icmp_dest_unreach()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### icmp\_echo

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L266)

 
```
fun box icmp_echo()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### icmp\_echoreply

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L267)

 
```
fun box icmp_echoreply()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### icmp\_exc\_fragtime

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L268)

 
```
fun box icmp_exc_fragtime()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### icmp\_exc\_ttl

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L269)

 
```
fun box icmp_exc_ttl()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### icmp\_filter

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L270)

 
```
fun box icmp_filter()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### icmp\_frag\_needed

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L271)

 
```
fun box icmp_frag_needed()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### icmp\_host\_ano

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L272)

 
```
fun box icmp_host_ano()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### icmp\_host\_isolated

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L273)

 
```
fun box icmp_host_isolated()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### icmp\_host\_unknown

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L274)

 
```
fun box icmp_host_unknown()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### icmp\_host\_unreach

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L275)

 
```
fun box icmp_host_unreach()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### icmp\_host\_unr\_tos

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L276)

 
```
fun box icmp_host_unr_tos()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### icmp\_info\_reply

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L277)

 
```
fun box icmp_info_reply()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### icmp\_info\_request

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L278)

 
```
fun box icmp_info_request()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### icmp\_net\_ano

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L279)

 
```
fun box icmp_net_ano()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### icmp\_net\_unknown

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L280)

 
```
fun box icmp_net_unknown()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### icmp\_net\_unreach

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L281)

 
```
fun box icmp_net_unreach()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### icmp\_net\_unr\_tos

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L282)

 
```
fun box icmp_net_unr_tos()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### icmp\_parameterprob

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L283)

 
```
fun box icmp_parameterprob()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### icmp\_pkt\_filtered

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L284)

 
```
fun box icmp_pkt_filtered()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### icmp\_port\_unreach

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L285)

 
```
fun box icmp_port_unreach()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### icmp\_prec\_cutoff

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L286)

 
```
fun box icmp_prec_cutoff()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### icmp\_prec\_violation

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L287)

 
```
fun box icmp_prec_violation()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### icmp\_prot\_unreach

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L288)

 
```
fun box icmp_prot_unreach()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### icmp\_redirect

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L289)

 
```
fun box icmp_redirect()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### icmp\_redir\_host

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L290)

 
```
fun box icmp_redir_host()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### icmp\_redir\_hosttos

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L291)

 
```
fun box icmp_redir_hosttos()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### icmp\_redir\_net

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L292)

 
```
fun box icmp_redir_net()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### icmp\_redir\_nettos

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L293)

 
```
fun box icmp_redir_nettos()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### icmp\_source\_quench

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L294)

 
```
fun box icmp_source_quench()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### icmp\_sr\_failed

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L295)

 
```
fun box icmp_sr_failed()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### icmp\_timestamp

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L296)

 
```
fun box icmp_timestamp()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### icmp\_timestampreply

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L297)

 
```
fun box icmp_timestampreply()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### icmp\_time\_exceeded

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L298)

 
```
fun box icmp_time_exceeded()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipctl\_acceptsourceroute

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L299)

 
```
fun box ipctl_acceptsourceroute()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipctl\_defmtu

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L300)

 
```
fun box ipctl_defmtu()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipctl\_defttl

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L301)

 
```
fun box ipctl_defttl()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipctl\_directedbroadcast

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L302)

 
```
fun box ipctl_directedbroadcast()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipctl\_fastforwarding

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L303)

 
```
fun box ipctl_fastforwarding()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipctl\_forwarding

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L304)

 
```
fun box ipctl_forwarding()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipctl\_gif\_ttl

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L305)

 
```
fun box ipctl_gif_ttl()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipctl\_intrdqdrops

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L306)

 
```
fun box ipctl_intrdqdrops()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipctl\_intrdqmaxlen

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L307)

 
```
fun box ipctl_intrdqmaxlen()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipctl\_intrqdrops

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L308)

 
```
fun box ipctl_intrqdrops()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipctl\_intrqmaxlen

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L309)

 
```
fun box ipctl_intrqmaxlen()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipctl\_keepfaith

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L310)

 
```
fun box ipctl_keepfaith()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipctl\_maxid

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L311)

 
```
fun box ipctl_maxid()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipctl\_rtexpire

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L312)

 
```
fun box ipctl_rtexpire()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipctl\_rtmaxcache

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L313)

 
```
fun box ipctl_rtmaxcache()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipctl\_rtminexpire

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L314)

 
```
fun box ipctl_rtminexpire()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipctl\_sendredirects

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L315)

 
```
fun box ipctl_sendredirects()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipctl\_sourceroute

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L316)

 
```
fun box ipctl_sourceroute()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipctl\_stats

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L317)

 
```
fun box ipctl_stats()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipport\_ephemeralfirst

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L318)

 
```
fun box ipport_ephemeralfirst()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipport\_ephemerallast

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L319)

 
```
fun box ipport_ephemerallast()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipport\_hifirstauto

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L320)

 
```
fun box ipport_hifirstauto()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipport\_hilastauto

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L321)

 
```
fun box ipport_hilastauto()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipport\_max

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L322)

 
```
fun box ipport_max()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipport\_reserved

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L323)

 
```
fun box ipport_reserved()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipport\_reservedstart

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L324)

 
```
fun box ipport_reservedstart()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipport\_userreserved

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L325)

 
```
fun box ipport_userreserved()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_2292dstopts

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L326)

 
```
fun box ipv6_2292dstopts()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_2292hoplimit

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L327)

 
```
fun box ipv6_2292hoplimit()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_2292hopopts

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L328)

 
```
fun box ipv6_2292hopopts()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_2292pktinfo

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L329)

 
```
fun box ipv6_2292pktinfo()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_2292pktoptions

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L330)

 
```
fun box ipv6_2292pktoptions()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_2292rthdr

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L331)

 
```
fun box ipv6_2292rthdr()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_addrform

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L332)

 
```
fun box ipv6_addrform()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_addr\_preferences

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L333)

 
```
fun box ipv6_addr_preferences()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_add\_membership

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L334)

 
```
fun box ipv6_add_membership()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_authhdr

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L335)

 
```
fun box ipv6_authhdr()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_autoflowlabel

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L336)

 
```
fun box ipv6_autoflowlabel()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_checksum

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L337)

 
```
fun box ipv6_checksum()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_dontfrag

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L338)

 
```
fun box ipv6_dontfrag()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_drop\_membership

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L339)

 
```
fun box ipv6_drop_membership()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_dstopts

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L340)

 
```
fun box ipv6_dstopts()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_flowinfo

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L341)

 
```
fun box ipv6_flowinfo()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_flowinfo\_flowlabel

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L342)

 
```
fun box ipv6_flowinfo_flowlabel()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_flowinfo\_priority

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L343)

 
```
fun box ipv6_flowinfo_priority()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_flowinfo\_send

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L344)

 
```
fun box ipv6_flowinfo_send()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_flowlabel\_mgr

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L345)

 
```
fun box ipv6_flowlabel_mgr()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_fl\_a\_get

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L346)

 
```
fun box ipv6_fl_a_get()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_fl\_a\_put

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L347)

 
```
fun box ipv6_fl_a_put()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_fl\_a\_renew

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L348)

 
```
fun box ipv6_fl_a_renew()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_fl\_f\_create

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L349)

 
```
fun box ipv6_fl_f_create()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_fl\_f\_excl

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L350)

 
```
fun box ipv6_fl_f_excl()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_fl\_f\_reflect

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L351)

 
```
fun box ipv6_fl_f_reflect()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_fl\_f\_remote

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L352)

 
```
fun box ipv6_fl_f_remote()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_fl\_s\_any

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L353)

 
```
fun box ipv6_fl_s_any()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_fl\_s\_excl

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L354)

 
```
fun box ipv6_fl_s_excl()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_fl\_s\_none

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L355)

 
```
fun box ipv6_fl_s_none()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_fl\_s\_process

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L356)

 
```
fun box ipv6_fl_s_process()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_fl\_s\_user

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L357)

 
```
fun box ipv6_fl_s_user()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_hoplimit

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L358)

 
```
fun box ipv6_hoplimit()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_hopopts

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L359)

 
```
fun box ipv6_hopopts()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_ipsec\_policy

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L360)

 
```
fun box ipv6_ipsec_policy()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_join\_anycast

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L361)

 
```
fun box ipv6_join_anycast()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_leave\_anycast

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L362)

 
```
fun box ipv6_leave_anycast()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_minhopcount

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L363)

 
```
fun box ipv6_minhopcount()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_mtu

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L364)

 
```
fun box ipv6_mtu()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_mtu\_discover

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L365)

 
```
fun box ipv6_mtu_discover()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_multicast\_hops

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L366)

 
```
fun box ipv6_multicast_hops()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_multicast\_if

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L367)

 
```
fun box ipv6_multicast_if()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_multicast\_loop

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L368)

 
```
fun box ipv6_multicast_loop()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_nexthop

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L369)

 
```
fun box ipv6_nexthop()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_origdstaddr

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L370)

 
```
fun box ipv6_origdstaddr()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_pathmtu

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L371)

 
```
fun box ipv6_pathmtu()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_pktinfo

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L372)

 
```
fun box ipv6_pktinfo()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_pmtudisc\_do

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L373)

 
```
fun box ipv6_pmtudisc_do()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_pmtudisc\_dont

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L374)

 
```
fun box ipv6_pmtudisc_dont()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_pmtudisc\_interface

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L375)

 
```
fun box ipv6_pmtudisc_interface()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_pmtudisc\_omit

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L376)

 
```
fun box ipv6_pmtudisc_omit()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_pmtudisc\_probe

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L377)

 
```
fun box ipv6_pmtudisc_probe()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_pmtudisc\_want

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L378)

 
```
fun box ipv6_pmtudisc_want()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_prefer\_src\_cga

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L379)

 
```
fun box ipv6_prefer_src_cga()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_prefer\_src\_coa

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L380)

 
```
fun box ipv6_prefer_src_coa()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_prefer\_src\_home

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L381)

 
```
fun box ipv6_prefer_src_home()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_prefer\_src\_noncga

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L382)

 
```
fun box ipv6_prefer_src_noncga()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_prefer\_src\_public

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L383)

 
```
fun box ipv6_prefer_src_public()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_prefer\_src\_pubtmp\_default

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L384)

 
```
fun box ipv6_prefer_src_pubtmp_default()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_prefer\_src\_tmp

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L385)

 
```
fun box ipv6_prefer_src_tmp()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_priority\_10

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L386)

 
```
fun box ipv6_priority_10()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_priority\_11

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L387)

 
```
fun box ipv6_priority_11()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_priority\_12

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L388)

 
```
fun box ipv6_priority_12()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_priority\_13

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L389)

 
```
fun box ipv6_priority_13()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_priority\_14

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L390)

 
```
fun box ipv6_priority_14()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_priority\_15

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L391)

 
```
fun box ipv6_priority_15()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_priority\_8

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L392)

 
```
fun box ipv6_priority_8()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_priority\_9

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L393)

 
```
fun box ipv6_priority_9()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_priority\_bulk

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L394)

 
```
fun box ipv6_priority_bulk()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_priority\_control

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L395)

 
```
fun box ipv6_priority_control()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_priority\_filler

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L396)

 
```
fun box ipv6_priority_filler()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_priority\_interactive

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L397)

 
```
fun box ipv6_priority_interactive()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_priority\_reserved1

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L398)

 
```
fun box ipv6_priority_reserved1()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_priority\_reserved2

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L399)

 
```
fun box ipv6_priority_reserved2()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_priority\_unattended

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L400)

 
```
fun box ipv6_priority_unattended()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_priority\_uncharacterized

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L401)

 
```
fun box ipv6_priority_uncharacterized()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_recvdstopts

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L402)

 
```
fun box ipv6_recvdstopts()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_recverr

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L403)

 
```
fun box ipv6_recverr()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_recvhoplimit

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L404)

 
```
fun box ipv6_recvhoplimit()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_recvhopopts

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L405)

 
```
fun box ipv6_recvhopopts()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_recvorigdstaddr

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L406)

 
```
fun box ipv6_recvorigdstaddr()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_recvpathmtu

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L407)

 
```
fun box ipv6_recvpathmtu()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_recvpktinfo

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L408)

 
```
fun box ipv6_recvpktinfo()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_recvrthdr

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L409)

 
```
fun box ipv6_recvrthdr()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_recvtclass

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L410)

 
```
fun box ipv6_recvtclass()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_router\_alert

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L411)

 
```
fun box ipv6_router_alert()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_rthdr

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L412)

 
```
fun box ipv6_rthdr()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_rthdrdstopts

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L413)

 
```
fun box ipv6_rthdrdstopts()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_tclass

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L414)

 
```
fun box ipv6_tclass()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_tlv\_hao

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L415)

 
```
fun box ipv6_tlv_hao()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_tlv\_jumbo

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L416)

 
```
fun box ipv6_tlv_jumbo()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_tlv\_pad1

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L417)

 
```
fun box ipv6_tlv_pad1()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_tlv\_padn

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L418)

 
```
fun box ipv6_tlv_padn()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_tlv\_routeralert

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L419)

 
```
fun box ipv6_tlv_routeralert()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_transparent

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L420)

 
```
fun box ipv6_transparent()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_unicast\_hops

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L421)

 
```
fun box ipv6_unicast_hops()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_unicast\_if

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L422)

 
```
fun box ipv6_unicast_if()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_use\_min\_mtu

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L423)

 
```
fun box ipv6_use_min_mtu()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_v6only

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L424)

 
```
fun box ipv6_v6only()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipv6\_xfrm\_policy

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L425)

 
```
fun box ipv6_xfrm_policy()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipx\_address

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L426)

 
```
fun box ipx_address()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipx\_address\_notify

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L427)

 
```
fun box ipx_address_notify()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipx\_crtitf

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L428)

 
```
fun box ipx_crtitf()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipx\_dltitf

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L429)

 
```
fun box ipx_dltitf()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipx\_dstype

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L430)

 
```
fun box ipx_dstype()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipx\_extended\_address

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L431)

 
```
fun box ipx_extended_address()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipx\_filterptype

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L432)

 
```
fun box ipx_filterptype()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipx\_frame\_8022

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L433)

 
```
fun box ipx_frame_8022()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipx\_frame\_8023

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L434)

 
```
fun box ipx_frame_8023()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipx\_frame\_etherii

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L435)

 
```
fun box ipx_frame_etherii()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipx\_frame\_none

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L436)

 
```
fun box ipx_frame_none()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipx\_frame\_snap

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L437)

 
```
fun box ipx_frame_snap()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipx\_frame\_tr\_8022

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L438)

 
```
fun box ipx_frame_tr_8022()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipx\_getnetinfo

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L439)

 
```
fun box ipx_getnetinfo()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipx\_getnetinfo\_norip

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L440)

 
```
fun box ipx_getnetinfo_norip()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipx\_immediatespxack

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L441)

 
```
fun box ipx_immediatespxack()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipx\_internal

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L442)

 
```
fun box ipx_internal()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipx\_maxsize

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L443)

 
```
fun box ipx_maxsize()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipx\_max\_adapter\_num

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L444)

 
```
fun box ipx_max_adapter_num()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipx\_mtu

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L445)

 
```
fun box ipx_mtu()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipx\_node\_len

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L446)

 
```
fun box ipx_node_len()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipx\_primary

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L447)

 
```
fun box ipx_primary()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipx\_ptype

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L448)

 
```
fun box ipx_ptype()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipx\_receive\_broadcast

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L449)

 
```
fun box ipx_receive_broadcast()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipx\_recvhdr

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L450)

 
```
fun box ipx_recvhdr()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipx\_reripnetnumber

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L451)

 
```
fun box ipx_reripnetnumber()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipx\_route\_no\_router

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L452)

 
```
fun box ipx_route_no_router()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipx\_rt\_8022

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L453)

 
```
fun box ipx_rt_8022()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipx\_rt\_bluebook

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L454)

 
```
fun box ipx_rt_bluebook()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipx\_rt\_routed

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L455)

 
```
fun box ipx_rt_routed()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipx\_rt\_snap

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L456)

 
```
fun box ipx_rt_snap()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipx\_special\_none

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L457)

 
```
fun box ipx_special_none()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipx\_spxgetconnectionstatus

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L458)

 
```
fun box ipx_spxgetconnectionstatus()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipx\_stopfilterptype

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L459)

 
```
fun box ipx_stopfilterptype()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ipx\_type

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L460)

 
```
fun box ipx_type()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_add\_membership

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L461)

 
```
fun box ip_add_membership()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_add\_source\_membership

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L462)

 
```
fun box ip_add_source_membership()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_bindany

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L463)

 
```
fun box ip_bindany()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_bindmulti

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L464)

 
```
fun box ip_bindmulti()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_bind\_address\_no\_port

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L465)

 
```
fun box ip_bind_address_no_port()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_block\_source

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L466)

 
```
fun box ip_block_source()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_bound\_if

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L467)

 
```
fun box ip_bound_if()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_checksum

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L468)

 
```
fun box ip_checksum()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_default\_multicast\_loop

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L469)

 
```
fun box ip_default_multicast_loop()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_default\_multicast\_ttl

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L470)

 
```
fun box ip_default_multicast_ttl()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_dontfrag

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L471)

 
```
fun box ip_dontfrag()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_drop\_membership

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L472)

 
```
fun box ip_drop_membership()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_drop\_source\_membership

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L473)

 
```
fun box ip_drop_source_membership()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_dummynet3

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L474)

 
```
fun box ip_dummynet3()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_dummynet\_configure

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L475)

 
```
fun box ip_dummynet_configure()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_dummynet\_del

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L476)

 
```
fun box ip_dummynet_del()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_dummynet\_flush

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L477)

 
```
fun box ip_dummynet_flush()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_dummynet\_get

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L478)

 
```
fun box ip_dummynet_get()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_faith

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L479)

 
```
fun box ip_faith()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_flowid

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L480)

 
```
fun box ip_flowid()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_flowtype

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L481)

 
```
fun box ip_flowtype()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_freebind

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L482)

 
```
fun box ip_freebind()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_fw3

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L483)

 
```
fun box ip_fw3()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_fw\_add

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L484)

 
```
fun box ip_fw_add()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_fw\_del

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L485)

 
```
fun box ip_fw_del()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_fw\_flush

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L486)

 
```
fun box ip_fw_flush()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_fw\_get

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L487)

 
```
fun box ip_fw_get()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_fw\_nat\_cfg

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L488)

 
```
fun box ip_fw_nat_cfg()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_fw\_nat\_del

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L489)

 
```
fun box ip_fw_nat_del()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_fw\_nat\_get\_config

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L490)

 
```
fun box ip_fw_nat_get_config()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_fw\_nat\_get\_log

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L491)

 
```
fun box ip_fw_nat_get_log()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_fw\_resetlog

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L492)

 
```
fun box ip_fw_resetlog()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_fw\_table\_add

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L493)

 
```
fun box ip_fw_table_add()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_fw\_table\_del

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L494)

 
```
fun box ip_fw_table_del()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_fw\_table\_flush

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L495)

 
```
fun box ip_fw_table_flush()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_fw\_table\_getsize

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L496)

 
```
fun box ip_fw_table_getsize()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_fw\_table\_list

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L497)

 
```
fun box ip_fw_table_list()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_fw\_zero

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L498)

 
```
fun box ip_fw_zero()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_hdrincl

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L499)

 
```
fun box ip_hdrincl()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_ipsec\_policy

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L500)

 
```
fun box ip_ipsec_policy()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_max\_group\_src\_filter

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L501)

 
```
fun box ip_max_group_src_filter()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_max\_memberships

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L502)

 
```
fun box ip_max_memberships()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_max\_sock\_mute\_filter

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L503)

 
```
fun box ip_max_sock_mute_filter()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_max\_sock\_src\_filter

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L504)

 
```
fun box ip_max_sock_src_filter()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_max\_source\_filter

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L505)

 
```
fun box ip_max_source_filter()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_minttl

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L506)

 
```
fun box ip_minttl()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_min\_memberships

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L507)

 
```
fun box ip_min_memberships()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_msfilter

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L508)

 
```
fun box ip_msfilter()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_mtu

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L509)

 
```
fun box ip_mtu()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_mtu\_discover

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L510)

 
```
fun box ip_mtu_discover()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_multicast\_all

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L511)

 
```
fun box ip_multicast_all()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_multicast\_if

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L512)

 
```
fun box ip_multicast_if()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_multicast\_ifindex

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L513)

 
```
fun box ip_multicast_ifindex()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_multicast\_loop

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L514)

 
```
fun box ip_multicast_loop()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_multicast\_ttl

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L515)

 
```
fun box ip_multicast_ttl()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_multicast\_vif

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L516)

 
```
fun box ip_multicast_vif()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_nat\_xxx

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L517)

 
```
fun box ip_nat_xxx()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_nodefrag

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L518)

 
```
fun box ip_nodefrag()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_old\_fw\_add

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L519)

 
```
fun box ip_old_fw_add()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_old\_fw\_del

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L520)

 
```
fun box ip_old_fw_del()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_old\_fw\_flush

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L521)

 
```
fun box ip_old_fw_flush()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_old\_fw\_get

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L522)

 
```
fun box ip_old_fw_get()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_old\_fw\_resetlog

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L523)

 
```
fun box ip_old_fw_resetlog()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_old\_fw\_zero

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L524)

 
```
fun box ip_old_fw_zero()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_onesbcast

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L525)

 
```
fun box ip_onesbcast()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_options

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L526)

 
```
fun box ip_options()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_origdstaddr

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L527)

 
```
fun box ip_origdstaddr()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_passsec

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L528)

 
```
fun box ip_passsec()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_pktinfo

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L529)

 
```
fun box ip_pktinfo()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_pktoptions

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L530)

 
```
fun box ip_pktoptions()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_pmtudisc\_do

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L531)

 
```
fun box ip_pmtudisc_do()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_pmtudisc\_dont

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L532)

 
```
fun box ip_pmtudisc_dont()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_pmtudisc\_interface

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L533)

 
```
fun box ip_pmtudisc_interface()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_pmtudisc\_omit

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L534)

 
```
fun box ip_pmtudisc_omit()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_pmtudisc\_probe

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L535)

 
```
fun box ip_pmtudisc_probe()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_pmtudisc\_want

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L536)

 
```
fun box ip_pmtudisc_want()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_portrange

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L537)

 
```
fun box ip_portrange()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_portrange\_default

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L538)

 
```
fun box ip_portrange_default()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_portrange\_high

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L539)

 
```
fun box ip_portrange_high()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_portrange\_low

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L540)

 
```
fun box ip_portrange_low()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_recvdstaddr

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L541)

 
```
fun box ip_recvdstaddr()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_recverr

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L542)

 
```
fun box ip_recverr()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_recvflowid

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L543)

 
```
fun box ip_recvflowid()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_recvif

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L544)

 
```
fun box ip_recvif()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_recvopts

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L545)

 
```
fun box ip_recvopts()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_recvorigdstaddr

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L546)

 
```
fun box ip_recvorigdstaddr()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_recvpktinfo

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L547)

 
```
fun box ip_recvpktinfo()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_recvretopts

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L548)

 
```
fun box ip_recvretopts()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_recvrssbucketid

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L549)

 
```
fun box ip_recvrssbucketid()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_recvtos

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L550)

 
```
fun box ip_recvtos()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_recvttl

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L551)

 
```
fun box ip_recvttl()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_retopts

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L552)

 
```
fun box ip_retopts()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_router\_alert

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L553)

 
```
fun box ip_router_alert()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_rssbucketid

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L554)

 
```
fun box ip_rssbucketid()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_rss\_listen\_bucket

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L555)

 
```
fun box ip_rss_listen_bucket()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_rsvp\_off

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L556)

 
```
fun box ip_rsvp_off()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_rsvp\_on

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L557)

 
```
fun box ip_rsvp_on()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_rsvp\_vif\_off

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L558)

 
```
fun box ip_rsvp_vif_off()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_rsvp\_vif\_on

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L559)

 
```
fun box ip_rsvp_vif_on()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_sendsrcaddr

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L560)

 
```
fun box ip_sendsrcaddr()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_striphdr

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L561)

 
```
fun box ip_striphdr()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_tos

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L562)

 
```
fun box ip_tos()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_traffic\_mgt\_background

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L563)

 
```
fun box ip_traffic_mgt_background()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_transparent

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L564)

 
```
fun box ip_transparent()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_ttl

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L565)

 
```
fun box ip_ttl()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_unblock\_source

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L566)

 
```
fun box ip_unblock_source()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_unicast\_if

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L567)

 
```
fun box ip_unicast_if()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ip\_xfrm\_policy

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L568)

 
```
fun box ip_xfrm_policy()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### local\_connwait

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L569)

 
```
fun box local_connwait()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### local\_creds

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L570)

 
```
fun box local_creds()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### local\_peercred

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L571)

 
```
fun box local_peercred()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### local\_peerepid

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L572)

 
```
fun box local_peerepid()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### local\_peereuuid

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L573)

 
```
fun box local_peereuuid()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### local\_peerpid

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L574)

 
```
fun box local_peerpid()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### local\_peeruuid

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L575)

 
```
fun box local_peeruuid()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### local\_vendor

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L576)

 
```
fun box local_vendor()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### max\_tcpoptlen

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L577)

 
```
fun box max_tcpoptlen()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### mcast\_block\_source

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L578)

 
```
fun box mcast_block_source()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### mcast\_exclude

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L579)

 
```
fun box mcast_exclude()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### mcast\_include

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L580)

 
```
fun box mcast_include()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### mcast\_join\_group

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L581)

 
```
fun box mcast_join_group()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### mcast\_join\_source\_group

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L582)

 
```
fun box mcast_join_source_group()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### mcast\_leave\_group

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L583)

 
```
fun box mcast_leave_group()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### mcast\_leave\_source\_group

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L584)

 
```
fun box mcast_leave_source_group()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### mcast\_msfilter

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L585)

 
```
fun box mcast_msfilter()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### mcast\_unblock\_source

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L586)

 
```
fun box mcast_unblock_source()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### mcast\_undefined

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L587)

 
```
fun box mcast_undefined()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### mrt\_add\_bw\_upcall

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L588)

 
```
fun box mrt_add_bw_upcall()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### mrt\_add\_mfc

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L589)

 
```
fun box mrt_add_mfc()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### mrt\_add\_vif

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L590)

 
```
fun box mrt_add_vif()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### mrt\_api\_config

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L591)

 
```
fun box mrt_api_config()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### mrt\_api\_flags\_all

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L592)

 
```
fun box mrt_api_flags_all()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### mrt\_api\_support

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L593)

 
```
fun box mrt_api_support()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### mrt\_assert

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L594)

 
```
fun box mrt_assert()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### mrt\_del\_bw\_upcall

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L595)

 
```
fun box mrt_del_bw_upcall()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### mrt\_del\_mfc

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L596)

 
```
fun box mrt_del_mfc()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### mrt\_del\_vif

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L597)

 
```
fun box mrt_del_vif()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### mrt\_done

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L598)

 
```
fun box mrt_done()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### mrt\_init

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L599)

 
```
fun box mrt_init()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### mrt\_mfc\_bw\_upcall

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L600)

 
```
fun box mrt_mfc_bw_upcall()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### mrt\_mfc\_flags\_all

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L601)

 
```
fun box mrt_mfc_flags_all()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### mrt\_mfc\_flags\_border\_vif

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L602)

 
```
fun box mrt_mfc_flags_border_vif()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### mrt\_mfc\_flags\_disable\_wrongvif

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L603)

 
```
fun box mrt_mfc_flags_disable_wrongvif()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### mrt\_mfc\_rp

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L604)

 
```
fun box mrt_mfc_rp()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### mrt\_pim

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L605)

 
```
fun box mrt_pim()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### mrt\_version

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L606)

 
```
fun box mrt_version()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### msg\_notification

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L607)

 
```
fun box msg_notification()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### msg\_socallbck

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L608)

 
```
fun box msg_socallbck()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ndrvproto\_ndrv

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L609)

 
```
fun box ndrvproto_ndrv()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ndrv\_addmulticast

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L610)

 
```
fun box ndrv_addmulticast()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ndrv\_deldmxspec

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L611)

 
```
fun box ndrv_deldmxspec()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ndrv\_delmulticast

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L612)

 
```
fun box ndrv_delmulticast()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ndrv\_demuxtype\_ethertype

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L613)

 
```
fun box ndrv_demuxtype_ethertype()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ndrv\_demuxtype\_sap

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L614)

 
```
fun box ndrv_demuxtype_sap()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ndrv\_demuxtype\_snap

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L615)

 
```
fun box ndrv_demuxtype_snap()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ndrv\_dmux\_max\_descr

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L616)

 
```
fun box ndrv_dmux_max_descr()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ndrv\_protocol\_desc\_vers

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L617)

 
```
fun box ndrv_protocol_desc_vers()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ndrv\_setdmxspec

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L618)

 
```
fun box ndrv_setdmxspec()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### netlink\_add\_membership

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L619)

 
```
fun box netlink_add_membership()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### netlink\_audit

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L620)

 
```
fun box netlink_audit()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### netlink\_broadcast\_error

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L621)

 
```
fun box netlink_broadcast_error()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### netlink\_cap\_ack

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L622)

 
```
fun box netlink_cap_ack()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### netlink\_connector

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L623)

 
```
fun box netlink_connector()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### netlink\_crypto

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L624)

 
```
fun box netlink_crypto()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### netlink\_dnrtmsg

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L625)

 
```
fun box netlink_dnrtmsg()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### netlink\_drop\_membership

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L626)

 
```
fun box netlink_drop_membership()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### netlink\_ecryptfs

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L627)

 
```
fun box netlink_ecryptfs()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### netlink\_fib\_lookup

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L628)

 
```
fun box netlink_fib_lookup()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### netlink\_firewall

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L629)

 
```
fun box netlink_firewall()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### netlink\_generic

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L630)

 
```
fun box netlink_generic()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### netlink\_inet\_diag

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L631)

 
```
fun box netlink_inet_diag()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### netlink\_ip6\_fw

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L632)

 
```
fun box netlink_ip6_fw()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### netlink\_iscsi

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L633)

 
```
fun box netlink_iscsi()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### netlink\_kobject\_uevent

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L634)

 
```
fun box netlink_kobject_uevent()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### netlink\_listen\_all\_nsid

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L635)

 
```
fun box netlink_listen_all_nsid()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### netlink\_list\_memberships

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L636)

 
```
fun box netlink_list_memberships()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### netlink\_netfilter

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L637)

 
```
fun box netlink_netfilter()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### netlink\_nflog

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L638)

 
```
fun box netlink_nflog()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### netlink\_no\_enobufs

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L639)

 
```
fun box netlink_no_enobufs()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### netlink\_pktinfo

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L640)

 
```
fun box netlink_pktinfo()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### netlink\_rdma

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L641)

 
```
fun box netlink_rdma()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### netlink\_route

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L642)

 
```
fun box netlink_route()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### netlink\_rx\_ring

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L643)

 
```
fun box netlink_rx_ring()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### netlink\_scsitransport

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L644)

 
```
fun box netlink_scsitransport()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### netlink\_selinux

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L645)

 
```
fun box netlink_selinux()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### netlink\_sock\_diag

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L646)

 
```
fun box netlink_sock_diag()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### netlink\_tx\_ring

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L647)

 
```
fun box netlink_tx_ring()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### netlink\_unused

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L648)

 
```
fun box netlink_unused()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### netlink\_usersock

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L649)

 
```
fun box netlink_usersock()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### netlink\_xfrm

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L650)

 
```
fun box netlink_xfrm()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### netrom\_idle

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L651)

 
```
fun box netrom_idle()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### netrom\_kill

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L652)

 
```
fun box netrom_kill()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### netrom\_n2

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L653)

 
```
fun box netrom_n2()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### netrom\_neigh

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L654)

 
```
fun box netrom_neigh()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### netrom\_node

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L655)

 
```
fun box netrom_node()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### netrom\_paclen

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L656)

 
```
fun box netrom_paclen()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### netrom\_t1

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L657)

 
```
fun box netrom_t1()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### netrom\_t2

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L658)

 
```
fun box netrom_t2()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### netrom\_t4

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L659)

 
```
fun box netrom_t4()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### nrdv\_multicast\_addrs\_per\_sock

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L660)

 
```
fun box nrdv_multicast_addrs_per_sock()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### pvd\_config

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L661)

 
```
fun box pvd_config()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### rds\_cancel\_sent\_to

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L662)

 
```
fun box rds_cancel_sent_to()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### rds\_cmsg\_atomic\_cswp

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L663)

 
```
fun box rds_cmsg_atomic_cswp()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### rds\_cmsg\_atomic\_fadd

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L664)

 
```
fun box rds_cmsg_atomic_fadd()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### rds\_cmsg\_cong\_update

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L665)

 
```
fun box rds_cmsg_cong_update()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### rds\_cmsg\_masked\_atomic\_cswp

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L666)

 
```
fun box rds_cmsg_masked_atomic_cswp()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### rds\_cmsg\_masked\_atomic\_fadd

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L667)

 
```
fun box rds_cmsg_masked_atomic_fadd()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### rds\_cmsg\_rdma\_args

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L668)

 
```
fun box rds_cmsg_rdma_args()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### rds\_cmsg\_rdma\_dest

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L669)

 
```
fun box rds_cmsg_rdma_dest()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### rds\_cmsg\_rdma\_map

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L670)

 
```
fun box rds_cmsg_rdma_map()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### rds\_cmsg\_rdma\_status

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L671)

 
```
fun box rds_cmsg_rdma_status()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### rds\_cong\_monitor

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L672)

 
```
fun box rds_cong_monitor()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### rds\_cong\_monitor\_size

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L673)

 
```
fun box rds_cong_monitor_size()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### rds\_free\_mr

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L674)

 
```
fun box rds_free_mr()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### rds\_get\_mr

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L675)

 
```
fun box rds_get_mr()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### rds\_get\_mr\_for\_dest

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L676)

 
```
fun box rds_get_mr_for_dest()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### rds\_ib\_abi\_version

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L677)

 
```
fun box rds_ib_abi_version()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### rds\_ib\_gid\_len

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L678)

 
```
fun box rds_ib_gid_len()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### rds\_info\_connections

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L679)

 
```
fun box rds_info_connections()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### rds\_info\_connection\_flag\_connected

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L680)

 
```
fun box rds_info_connection_flag_connected()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### rds\_info\_connection\_flag\_connecting

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L681)

 
```
fun box rds_info_connection_flag_connecting()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### rds\_info\_connection\_flag\_sending

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L682)

 
```
fun box rds_info_connection_flag_sending()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### rds\_info\_connection\_stats

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L683)

 
```
fun box rds_info_connection_stats()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### rds\_info\_counters

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L684)

 
```
fun box rds_info_counters()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### rds\_info\_first

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L685)

 
```
fun box rds_info_first()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### rds\_info\_ib\_connections

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L686)

 
```
fun box rds_info_ib_connections()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### rds\_info\_iwarp\_connections

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L687)

 
```
fun box rds_info_iwarp_connections()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### rds\_info\_last

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L688)

 
```
fun box rds_info_last()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### rds\_info\_message\_flag\_ack

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L689)

 
```
fun box rds_info_message_flag_ack()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### rds\_info\_message\_flag\_fast\_ack

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L690)

 
```
fun box rds_info_message_flag_fast_ack()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### rds\_info\_recv\_messages

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L691)

 
```
fun box rds_info_recv_messages()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### rds\_info\_retrans\_messages

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L692)

 
```
fun box rds_info_retrans_messages()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### rds\_info\_send\_messages

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L693)

 
```
fun box rds_info_send_messages()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### rds\_info\_sockets

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L694)

 
```
fun box rds_info_sockets()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### rds\_info\_tcp\_sockets

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L695)

 
```
fun box rds_info_tcp_sockets()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### rds\_rdma\_canceled

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L696)

 
```
fun box rds_rdma_canceled()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### rds\_rdma\_dontwait

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L697)

 
```
fun box rds_rdma_dontwait()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### rds\_rdma\_dropped

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L698)

 
```
fun box rds_rdma_dropped()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### rds\_rdma\_fence

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L699)

 
```
fun box rds_rdma_fence()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### rds\_rdma\_invalidate

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L700)

 
```
fun box rds_rdma_invalidate()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### rds\_rdma\_notify\_me

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L701)

 
```
fun box rds_rdma_notify_me()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### rds\_rdma\_other\_error

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L702)

 
```
fun box rds_rdma_other_error()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### rds\_rdma\_readwrite

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L703)

 
```
fun box rds_rdma_readwrite()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### rds\_rdma\_remote\_error

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L704)

 
```
fun box rds_rdma_remote_error()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### rds\_rdma\_silent

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L705)

 
```
fun box rds_rdma_silent()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### rds\_rdma\_success

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L706)

 
```
fun box rds_rdma_success()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### rds\_rdma\_use\_once

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L707)

 
```
fun box rds_rdma_use_once()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### rds\_recverr

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L708)

 
```
fun box rds_recverr()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### rds\_trans\_count

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L709)

 
```
fun box rds_trans_count()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### rds\_trans\_ib

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L710)

 
```
fun box rds_trans_ib()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### rds\_trans\_iwarp

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L711)

 
```
fun box rds_trans_iwarp()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### rds\_trans\_none

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L712)

 
```
fun box rds_trans_none()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### rds\_trans\_tcp

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L713)

 
```
fun box rds_trans_tcp()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### rose\_access\_barred

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L714)

 
```
fun box rose_access_barred()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### rose\_defer

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L715)

 
```
fun box rose_defer()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### rose\_dte\_originated

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L716)

 
```
fun box rose_dte_originated()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### rose\_holdback

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L717)

 
```
fun box rose_holdback()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### rose\_idle

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L718)

 
```
fun box rose_idle()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### rose\_invalid\_facility

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L719)

 
```
fun box rose_invalid_facility()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### rose\_local\_procedure

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L720)

 
```
fun box rose_local_procedure()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### rose\_max\_digis

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L721)

 
```
fun box rose_max_digis()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### rose\_mtu

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L722)

 
```
fun box rose_mtu()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### rose\_network\_congestion

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L723)

 
```
fun box rose_network_congestion()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### rose\_not\_obtainable

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L724)

 
```
fun box rose_not_obtainable()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### rose\_number\_busy

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L725)

 
```
fun box rose_number_busy()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### rose\_out\_of\_order

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L726)

 
```
fun box rose_out_of_order()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### rose\_qbitincl

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L727)

 
```
fun box rose_qbitincl()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### rose\_remote\_procedure

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L728)

 
```
fun box rose_remote_procedure()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### rose\_ship\_absent

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L729)

 
```
fun box rose_ship_absent()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### rose\_t1

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L730)

 
```
fun box rose_t1()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### rose\_t2

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L731)

 
```
fun box rose_t2()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### rose\_t3

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L732)

 
```
fun box rose_t3()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### scm\_hci\_raw\_direction

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L733)

 
```
fun box scm_hci_raw_direction()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### scm\_timestamp

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L734)

 
```
fun box scm_timestamp()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### scm\_timestamping

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L735)

 
```
fun box scm_timestamping()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### scm\_timestampns

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L736)

 
```
fun box scm_timestampns()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### scm\_wifi\_status

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L737)

 
```
fun box scm_wifi_status()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_abort\_association

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L738)

 
```
fun box sctp_abort_association()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_adaptation\_layer

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L739)

 
```
fun box sctp_adaptation_layer()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_adaption\_layer

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L740)

 
```
fun box sctp_adaption_layer()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_add\_streams

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L741)

 
```
fun box sctp_add_streams()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_add\_vrf\_id

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L742)

 
```
fun box sctp_add_vrf_id()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_asconf

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L743)

 
```
fun box sctp_asconf()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_asconf\_ack

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L744)

 
```
fun box sctp_asconf_ack()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_asconf\_supported

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L745)

 
```
fun box sctp_asconf_supported()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_associnfo

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L746)

 
```
fun box sctp_associnfo()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_authentication

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L747)

 
```
fun box sctp_authentication()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_auth\_active\_key

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L748)

 
```
fun box sctp_auth_active_key()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_auth\_chunk

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L749)

 
```
fun box sctp_auth_chunk()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_auth\_deactivate\_key

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L750)

 
```
fun box sctp_auth_deactivate_key()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_auth\_delete\_key

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L751)

 
```
fun box sctp_auth_delete_key()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_auth\_key

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L752)

 
```
fun box sctp_auth_key()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_auth\_supported

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L753)

 
```
fun box sctp_auth_supported()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_autoclose

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L754)

 
```
fun box sctp_autoclose()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_auto\_asconf

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L755)

 
```
fun box sctp_auto_asconf()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_badcrc

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L756)

 
```
fun box sctp_badcrc()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_bindx\_add\_addr

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L757)

 
```
fun box sctp_bindx_add_addr()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_bindx\_rem\_addr

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L758)

 
```
fun box sctp_bindx_rem_addr()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_blk\_logging\_enable

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L759)

 
```
fun box sctp_blk_logging_enable()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_bound

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L760)

 
```
fun box sctp_bound()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_cause\_cookie\_in\_shutdown

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L761)

 
```
fun box sctp_cause_cookie_in_shutdown()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_cause\_deleting\_last\_addr

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L762)

 
```
fun box sctp_cause_deleting_last_addr()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_cause\_deleting\_src\_addr

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L763)

 
```
fun box sctp_cause_deleting_src_addr()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_cause\_illegal\_asconf\_ack

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L764)

 
```
fun box sctp_cause_illegal_asconf_ack()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_cause\_invalid\_param

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L765)

 
```
fun box sctp_cause_invalid_param()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_cause\_invalid\_stream

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L766)

 
```
fun box sctp_cause_invalid_stream()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_cause\_missing\_param

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L767)

 
```
fun box sctp_cause_missing_param()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_cause\_nat\_colliding\_state

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L768)

 
```
fun box sctp_cause_nat_colliding_state()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_cause\_nat\_missing\_state

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L769)

 
```
fun box sctp_cause_nat_missing_state()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_cause\_no\_error

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L770)

 
```
fun box sctp_cause_no_error()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_cause\_no\_user\_data

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L771)

 
```
fun box sctp_cause_no_user_data()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_cause\_out\_of\_resc

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L772)

 
```
fun box sctp_cause_out_of_resc()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_cause\_protocol\_violation

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L773)

 
```
fun box sctp_cause_protocol_violation()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_cause\_request\_refused

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L774)

 
```
fun box sctp_cause_request_refused()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_cause\_resource\_shortage

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L775)

 
```
fun box sctp_cause_resource_shortage()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_cause\_restart\_w\_newaddr

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L776)

 
```
fun box sctp_cause_restart_w_newaddr()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_cause\_stale\_cookie

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L777)

 
```
fun box sctp_cause_stale_cookie()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_cause\_unrecog\_chunk

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L778)

 
```
fun box sctp_cause_unrecog_chunk()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_cause\_unrecog\_param

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L779)

 
```
fun box sctp_cause_unrecog_param()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_cause\_unresolvable\_addr

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L780)

 
```
fun box sctp_cause_unresolvable_addr()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_cause\_unsupported\_hmacid

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L781)

 
```
fun box sctp_cause_unsupported_hmacid()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_cause\_user\_initiated\_abt

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L782)

 
```
fun box sctp_cause_user_initiated_abt()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_cc\_hstcp

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L783)

 
```
fun box sctp_cc_hstcp()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_cc\_htcp

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L784)

 
```
fun box sctp_cc_htcp()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_cc\_option

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L785)

 
```
fun box sctp_cc_option()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_cc\_opt\_rtcc\_setmode

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L786)

 
```
fun box sctp_cc_opt_rtcc_setmode()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_cc\_opt\_steady\_step

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L787)

 
```
fun box sctp_cc_opt_steady_step()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_cc\_opt\_use\_dccc\_ecn

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L788)

 
```
fun box sctp_cc_opt_use_dccc_ecn()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_cc\_rfc2581

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L789)

 
```
fun box sctp_cc_rfc2581()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_cc\_rtcc

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L790)

 
```
fun box sctp_cc_rtcc()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_closed

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L791)

 
```
fun box sctp_closed()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_clr\_stat\_log

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L792)

 
```
fun box sctp_clr_stat_log()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_cmt\_base

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L793)

 
```
fun box sctp_cmt_base()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_cmt\_max

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L794)

 
```
fun box sctp_cmt_max()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_cmt\_mptcp

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L795)

 
```
fun box sctp_cmt_mptcp()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_cmt\_off

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L796)

 
```
fun box sctp_cmt_off()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_cmt\_on\_off

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L797)

 
```
fun box sctp_cmt_on_off()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_cmt\_rpv1

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L798)

 
```
fun box sctp_cmt_rpv1()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_cmt\_rpv2

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L799)

 
```
fun box sctp_cmt_rpv2()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_cmt\_use\_dac

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L800)

 
```
fun box sctp_cmt_use_dac()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_connect\_x

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L801)

 
```
fun box sctp_connect_x()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_connect\_x\_complete

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L802)

 
```
fun box sctp_connect_x_complete()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_connect\_x\_delayed

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L803)

 
```
fun box sctp_connect_x_delayed()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_context

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L804)

 
```
fun box sctp_context()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_cookie\_ack

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L805)

 
```
fun box sctp_cookie_ack()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_cookie\_echo

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L806)

 
```
fun box sctp_cookie_echo()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_cookie\_echoed

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L807)

 
```
fun box sctp_cookie_echoed()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_cookie\_wait

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L808)

 
```
fun box sctp_cookie_wait()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_cwnd\_logging\_enable

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L809)

 
```
fun box sctp_cwnd_logging_enable()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_cwnd\_monitor\_enable

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L810)

 
```
fun box sctp_cwnd_monitor_enable()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_cwr\_in\_same\_window

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L811)

 
```
fun box sctp_cwr_in_same_window()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_cwr\_reduce\_override

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L812)

 
```
fun box sctp_cwr_reduce_override()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_data

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L813)

 
```
fun box sctp_data()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_data\_first\_frag

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L814)

 
```
fun box sctp_data_first_frag()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_data\_frag\_mask

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L815)

 
```
fun box sctp_data_frag_mask()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_data\_last\_frag

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L816)

 
```
fun box sctp_data_last_frag()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_data\_middle\_frag

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L817)

 
```
fun box sctp_data_middle_frag()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_data\_not\_frag

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L818)

 
```
fun box sctp_data_not_frag()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_data\_sack\_immediately

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L819)

 
```
fun box sctp_data_sack_immediately()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_data\_unordered

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L820)

 
```
fun box sctp_data_unordered()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_default\_prinfo

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L821)

 
```
fun box sctp_default_prinfo()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_default\_send\_param

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L822)

 
```
fun box sctp_default_send_param()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_default\_sndinfo

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L823)

 
```
fun box sctp_default_sndinfo()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_delayed\_sack

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L824)

 
```
fun box sctp_delayed_sack()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_del\_vrf\_id

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L825)

 
```
fun box sctp_del_vrf_id()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_disable\_fragments

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L826)

 
```
fun box sctp_disable_fragments()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_ecn\_cwr

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L827)

 
```
fun box sctp_ecn_cwr()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_ecn\_echo

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L828)

 
```
fun box sctp_ecn_echo()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_ecn\_supported

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L829)

 
```
fun box sctp_ecn_supported()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_enable\_change\_assoc\_req

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L830)

 
```
fun box sctp_enable_change_assoc_req()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_enable\_reset\_assoc\_req

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L831)

 
```
fun box sctp_enable_reset_assoc_req()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_enable\_reset\_stream\_req

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L832)

 
```
fun box sctp_enable_reset_stream_req()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_enable\_stream\_reset

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L833)

 
```
fun box sctp_enable_stream_reset()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_enable\_value\_mask

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L834)

 
```
fun box sctp_enable_value_mask()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_established

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L835)

 
```
fun box sctp_established()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_event

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L836)

 
```
fun box sctp_event()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_events

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L837)

 
```
fun box sctp_events()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_explicit\_eor

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L838)

 
```
fun box sctp_explicit_eor()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_flight\_logging\_enable

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L839)

 
```
fun box sctp_flight_logging_enable()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_forward\_cum\_tsn

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L840)

 
```
fun box sctp_forward_cum_tsn()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_fragment\_interleave

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L841)

 
```
fun box sctp_fragment_interleave()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_frag\_level\_0

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L842)

 
```
fun box sctp_frag_level_0()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_frag\_level\_1

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L843)

 
```
fun box sctp_frag_level_1()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_frag\_level\_2

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L844)

 
```
fun box sctp_frag_level_2()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_from\_middle\_box

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L845)

 
```
fun box sctp_from_middle_box()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_fr\_logging\_enable

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L846)

 
```
fun box sctp_fr_logging_enable()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_get\_addr\_len

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L847)

 
```
fun box sctp_get_addr_len()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_get\_asoc\_vrf

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L848)

 
```
fun box sctp_get_asoc_vrf()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_get\_assoc\_id\_list

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L849)

 
```
fun box sctp_get_assoc_id_list()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_get\_assoc\_number

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L850)

 
```
fun box sctp_get_assoc_number()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_get\_local\_addresses

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L851)

 
```
fun box sctp_get_local_addresses()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_get\_local\_addr\_size

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L852)

 
```
fun box sctp_get_local_addr_size()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_get\_nonce\_values

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L853)

 
```
fun box sctp_get_nonce_values()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_get\_packet\_log

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L854)

 
```
fun box sctp_get_packet_log()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_get\_peer\_addresses

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L855)

 
```
fun box sctp_get_peer_addresses()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_get\_peer\_addr\_info

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L856)

 
```
fun box sctp_get_peer_addr_info()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_get\_remote\_addr\_size

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L857)

 
```
fun box sctp_get_remote_addr_size()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_get\_sndbuf\_use

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L858)

 
```
fun box sctp_get_sndbuf_use()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_get\_stat\_log

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L859)

 
```
fun box sctp_get_stat_log()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_get\_vrf\_ids

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L860)

 
```
fun box sctp_get_vrf_ids()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_had\_no\_tcb

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L861)

 
```
fun box sctp_had_no_tcb()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_heartbeat\_ack

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L862)

 
```
fun box sctp_heartbeat_ack()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_heartbeat\_request

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L863)

 
```
fun box sctp_heartbeat_request()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_hmac\_ident

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L864)

 
```
fun box sctp_hmac_ident()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_idata

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L865)

 
```
fun box sctp_idata()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_iforward\_cum\_tsn

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L866)

 
```
fun box sctp_iforward_cum_tsn()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_initiation

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L867)

 
```
fun box sctp_initiation()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_initiation\_ack

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L868)

 
```
fun box sctp_initiation_ack()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_initmsg

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L869)

 
```
fun box sctp_initmsg()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_interleaving\_supported

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L870)

 
```
fun box sctp_interleaving_supported()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_i\_want\_mapped\_v4\_addr

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L871)

 
```
fun box sctp_i_want_mapped_v4_addr()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_last\_packet\_tracing

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L872)

 
```
fun box sctp_last_packet_tracing()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_listen

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L873)

 
```
fun box sctp_listen()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_local\_auth\_chunks

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L874)

 
```
fun box sctp_local_auth_chunks()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_lock\_logging\_enable

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L875)

 
```
fun box sctp_lock_logging_enable()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_log\_at\_send\_2\_outq

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L876)

 
```
fun box sctp_log_at_send_2_outq()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_log\_at\_send\_2\_sctp

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L877)

 
```
fun box sctp_log_at_send_2_sctp()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_log\_maxburst\_enable

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L878)

 
```
fun box sctp_log_maxburst_enable()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_log\_rwnd\_enable

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L879)

 
```
fun box sctp_log_rwnd_enable()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_log\_sack\_arrivals\_enable

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L880)

 
```
fun box sctp_log_sack_arrivals_enable()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_log\_try\_advance

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L881)

 
```
fun box sctp_log_try_advance()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_ltrace\_chunk\_enable

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L882)

 
```
fun box sctp_ltrace_chunk_enable()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_ltrace\_error\_enable

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L883)

 
```
fun box sctp_ltrace_error_enable()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_map\_logging\_enable

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L884)

 
```
fun box sctp_map_logging_enable()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_maxburst

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L885)

 
```
fun box sctp_maxburst()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_maxseg

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L886)

 
```
fun box sctp_maxseg()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_max\_burst

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L887)

 
```
fun box sctp_max_burst()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_max\_cookie\_life

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L888)

 
```
fun box sctp_max_cookie_life()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_max\_cwnd

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L889)

 
```
fun box sctp_max_cwnd()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_max\_hb\_interval

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L890)

 
```
fun box sctp_max_hb_interval()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_max\_sack\_delay

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L891)

 
```
fun box sctp_max_sack_delay()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_mbcnt\_logging\_enable

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L892)

 
```
fun box sctp_mbcnt_logging_enable()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_mbuf\_logging\_enable

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L893)

 
```
fun box sctp_mbuf_logging_enable()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_mobility\_base

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L894)

 
```
fun box sctp_mobility_base()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_mobility\_fasthandoff

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L895)

 
```
fun box sctp_mobility_fasthandoff()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_mobility\_prim\_deleted

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L896)

 
```
fun box sctp_mobility_prim_deleted()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_nagle\_logging\_enable

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L897)

 
```
fun box sctp_nagle_logging_enable()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_nodelay

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L898)

 
```
fun box sctp_nodelay()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_nrsack\_supported

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L899)

 
```
fun box sctp_nrsack_supported()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_nr\_selective\_ack

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L900)

 
```
fun box sctp_nr_selective_ack()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_operation\_error

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L901)

 
```
fun box sctp_operation_error()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_packed

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L902)

 
```
fun box sctp_packed()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_packet\_dropped

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L903)

 
```
fun box sctp_packet_dropped()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_packet\_log\_size

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L904)

 
```
fun box sctp_packet_log_size()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_packet\_truncated

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L905)

 
```
fun box sctp_packet_truncated()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_pad\_chunk

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L906)

 
```
fun box sctp_pad_chunk()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_partial\_delivery\_point

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L907)

 
```
fun box sctp_partial_delivery_point()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_pcb\_copy\_flags

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L908)

 
```
fun box sctp_pcb_copy_flags()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_pcb\_flags\_accepting

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L909)

 
```
fun box sctp_pcb_flags_accepting()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_pcb\_flags\_adaptationevnt

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L910)

 
```
fun box sctp_pcb_flags_adaptationevnt()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_pcb\_flags\_assoc\_resetevnt

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L911)

 
```
fun box sctp_pcb_flags_assoc_resetevnt()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_pcb\_flags\_authevnt

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L912)

 
```
fun box sctp_pcb_flags_authevnt()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_pcb\_flags\_autoclose

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L913)

 
```
fun box sctp_pcb_flags_autoclose()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_pcb\_flags\_auto\_asconf

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L914)

 
```
fun box sctp_pcb_flags_auto_asconf()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_pcb\_flags\_blocking\_io

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L915)

 
```
fun box sctp_pcb_flags_blocking_io()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_pcb\_flags\_boundall

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L916)

 
```
fun box sctp_pcb_flags_boundall()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_pcb\_flags\_bound\_v6

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L917)

 
```
fun box sctp_pcb_flags_bound_v6()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_pcb\_flags\_close\_ip

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L918)

 
```
fun box sctp_pcb_flags_close_ip()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_pcb\_flags\_connected

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L919)

 
```
fun box sctp_pcb_flags_connected()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_pcb\_flags\_donot\_heartbeat

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L920)

 
```
fun box sctp_pcb_flags_donot_heartbeat()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_pcb\_flags\_dont\_wake

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L921)

 
```
fun box sctp_pcb_flags_dont_wake()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_pcb\_flags\_do\_asconf

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L922)

 
```
fun box sctp_pcb_flags_do_asconf()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_pcb\_flags\_do\_not\_pmtud

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L923)

 
```
fun box sctp_pcb_flags_do_not_pmtud()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_pcb\_flags\_dryevnt

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L924)

 
```
fun box sctp_pcb_flags_dryevnt()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_pcb\_flags\_explicit\_eor

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L925)

 
```
fun box sctp_pcb_flags_explicit_eor()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_pcb\_flags\_ext\_rcvinfo

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L926)

 
```
fun box sctp_pcb_flags_ext_rcvinfo()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_pcb\_flags\_frag\_interleave

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L927)

 
```
fun box sctp_pcb_flags_frag_interleave()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_pcb\_flags\_interleave\_strms

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L928)

 
```
fun box sctp_pcb_flags_interleave_strms()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_pcb\_flags\_in\_tcppool

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L929)

 
```
fun box sctp_pcb_flags_in_tcppool()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_pcb\_flags\_multiple\_asconfs

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L930)

 
```
fun box sctp_pcb_flags_multiple_asconfs()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_pcb\_flags\_needs\_mapped\_v4

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L931)

 
```
fun box sctp_pcb_flags_needs_mapped_v4()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_pcb\_flags\_nodelay

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L932)

 
```
fun box sctp_pcb_flags_nodelay()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_pcb\_flags\_no\_fragment

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L933)

 
```
fun box sctp_pcb_flags_no_fragment()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_pcb\_flags\_pdapievnt

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L934)

 
```
fun box sctp_pcb_flags_pdapievnt()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_pcb\_flags\_portreuse

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L935)

 
```
fun box sctp_pcb_flags_portreuse()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_pcb\_flags\_recvassocevnt

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L936)

 
```
fun box sctp_pcb_flags_recvassocevnt()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_pcb\_flags\_recvdataioevnt

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L937)

 
```
fun box sctp_pcb_flags_recvdataioevnt()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_pcb\_flags\_recvnsendfailevnt

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L938)

 
```
fun box sctp_pcb_flags_recvnsendfailevnt()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_pcb\_flags\_recvnxtinfo

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L939)

 
```
fun box sctp_pcb_flags_recvnxtinfo()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_pcb\_flags\_recvpaddrevnt

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L940)

 
```
fun box sctp_pcb_flags_recvpaddrevnt()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_pcb\_flags\_recvpeererr

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L941)

 
```
fun box sctp_pcb_flags_recvpeererr()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_pcb\_flags\_recvrcvinfo

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L942)

 
```
fun box sctp_pcb_flags_recvrcvinfo()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_pcb\_flags\_recvsendfailevnt

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L943)

 
```
fun box sctp_pcb_flags_recvsendfailevnt()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_pcb\_flags\_recvshutdownevnt

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L944)

 
```
fun box sctp_pcb_flags_recvshutdownevnt()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_pcb\_flags\_socket\_allgone

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L945)

 
```
fun box sctp_pcb_flags_socket_allgone()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_pcb\_flags\_socket\_cant\_read

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L946)

 
```
fun box sctp_pcb_flags_socket_cant_read()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_pcb\_flags\_socket\_gone

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L947)

 
```
fun box sctp_pcb_flags_socket_gone()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_pcb\_flags\_stream\_changeevnt

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L948)

 
```
fun box sctp_pcb_flags_stream_changeevnt()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_pcb\_flags\_stream\_resetevnt

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L949)

 
```
fun box sctp_pcb_flags_stream_resetevnt()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_pcb\_flags\_tcptype

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L950)

 
```
fun box sctp_pcb_flags_tcptype()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_pcb\_flags\_udptype

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L951)

 
```
fun box sctp_pcb_flags_udptype()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_pcb\_flags\_unbound

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L952)

 
```
fun box sctp_pcb_flags_unbound()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_pcb\_flags\_wakeinput

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L953)

 
```
fun box sctp_pcb_flags_wakeinput()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_pcb\_flags\_wakeoutput

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L954)

 
```
fun box sctp_pcb_flags_wakeoutput()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_pcb\_flags\_was\_aborted

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L955)

 
```
fun box sctp_pcb_flags_was_aborted()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_pcb\_flags\_was\_connected

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L956)

 
```
fun box sctp_pcb_flags_was_connected()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_pcb\_flags\_zero\_copy\_active

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L957)

 
```
fun box sctp_pcb_flags_zero_copy_active()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_pcb\_status

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L958)

 
```
fun box sctp_pcb_status()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_peeloff

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L959)

 
```
fun box sctp_peeloff()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_peer\_addr\_params

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L960)

 
```
fun box sctp_peer_addr_params()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_peer\_addr\_thlds

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L961)

 
```
fun box sctp_peer_addr_thlds()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_peer\_auth\_chunks

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L962)

 
```
fun box sctp_peer_auth_chunks()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_pktdrop\_supported

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L963)

 
```
fun box sctp_pktdrop_supported()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_pluggable\_cc

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L964)

 
```
fun box sctp_pluggable_cc()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_pluggable\_ss

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L965)

 
```
fun box sctp_pluggable_ss()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_primary\_addr

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L966)

 
```
fun box sctp_primary_addr()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_pr\_assoc\_status

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L967)

 
```
fun box sctp_pr_assoc_status()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_pr\_stream\_status

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L968)

 
```
fun box sctp_pr_stream_status()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_pr\_supported

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L969)

 
```
fun box sctp_pr_supported()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_reconfig\_supported

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L970)

 
```
fun box sctp_reconfig_supported()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_recvnxtinfo

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L971)

 
```
fun box sctp_recvnxtinfo()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_recvrcvinfo

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L972)

 
```
fun box sctp_recvrcvinfo()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_recv\_rwnd\_logging\_enable

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L973)

 
```
fun box sctp_recv_rwnd_logging_enable()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_remote\_udp\_encaps\_port

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L974)

 
```
fun box sctp_remote_udp_encaps_port()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_reset\_assoc

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L975)

 
```
fun box sctp_reset_assoc()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_reset\_streams

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L976)

 
```
fun box sctp_reset_streams()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_reuse\_port

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L977)

 
```
fun box sctp_reuse_port()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_rtoinfo

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L978)

 
```
fun box sctp_rtoinfo()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_rttvar\_logging\_enable

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L979)

 
```
fun box sctp_rttvar_logging_enable()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_sack\_cmt\_dac

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L980)

 
```
fun box sctp_sack_cmt_dac()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_sack\_logging\_enable

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L981)

 
```
fun box sctp_sack_logging_enable()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_sack\_nonce\_sum

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L982)

 
```
fun box sctp_sack_nonce_sum()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_sack\_rwnd\_logging\_enable

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L983)

 
```
fun box sctp_sack_rwnd_logging_enable()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_sat\_network\_burst\_incr

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L984)

 
```
fun box sctp_sat_network_burst_incr()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_sat\_network\_min

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L985)

 
```
fun box sctp_sat_network_min()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_sb\_logging\_enable

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L986)

 
```
fun box sctp_sb_logging_enable()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_selective\_ack

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L987)

 
```
fun box sctp_selective_ack()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_set\_debug\_level

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L988)

 
```
fun box sctp_set_debug_level()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_set\_dynamic\_primary

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L989)

 
```
fun box sctp_set_dynamic_primary()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_set\_initial\_dbg\_seq

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L990)

 
```
fun box sctp_set_initial_dbg_seq()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_set\_peer\_primary\_addr

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L991)

 
```
fun box sctp_set_peer_primary_addr()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_shutdown

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L992)

 
```
fun box sctp_shutdown()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_shutdown\_ack

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L993)

 
```
fun box sctp_shutdown_ack()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_shutdown\_ack\_sent

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L994)

 
```
fun box sctp_shutdown_ack_sent()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_shutdown\_complete

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L995)

 
```
fun box sctp_shutdown_complete()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_shutdown\_pending

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L996)

 
```
fun box sctp_shutdown_pending()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_shutdown\_received

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L997)

 
```
fun box sctp_shutdown_received()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_shutdown\_sent

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L998)

 
```
fun box sctp_shutdown_sent()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_smallest\_pmtu

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L999)

 
```
fun box sctp_smallest_pmtu()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_ss\_default

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1000)

 
```
fun box sctp_ss_default()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_ss\_fair\_bandwith

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1001)

 
```
fun box sctp_ss_fair_bandwith()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_ss\_first\_come

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1002)

 
```
fun box sctp_ss_first_come()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_ss\_priority

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1003)

 
```
fun box sctp_ss_priority()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_ss\_round\_robin

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1004)

 
```
fun box sctp_ss_round_robin()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_ss\_round\_robin\_packet

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1005)

 
```
fun box sctp_ss_round_robin_packet()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_ss\_value

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1006)

 
```
fun box sctp_ss_value()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_status

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1007)

 
```
fun box sctp_status()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_stream\_reset

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1008)

 
```
fun box sctp_stream_reset()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_stream\_reset\_incoming

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1009)

 
```
fun box sctp_stream_reset_incoming()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_stream\_reset\_outgoing

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1010)

 
```
fun box sctp_stream_reset_outgoing()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_str\_logging\_enable

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1011)

 
```
fun box sctp_str_logging_enable()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_threshold\_logging

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1012)

 
```
fun box sctp_threshold_logging()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_timeouts

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1013)

 
```
fun box sctp_timeouts()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_use\_ext\_rcvinfo

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1014)

 
```
fun box sctp_use_ext_rcvinfo()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_vrf\_id

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1015)

 
```
fun box sctp_vrf_id()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sctp\_wake\_logging\_enable

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1016)

 
```
fun box sctp_wake_logging_enable()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sock\_cloexec

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1017)

 
```
fun box sock_cloexec()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sock\_dgram

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1018)

 
```
fun box sock_dgram()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sock\_maxaddrlen

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1019)

 
```
fun box sock_maxaddrlen()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sock\_nonblock

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1020)

 
```
fun box sock_nonblock()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sock\_raw

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1021)

 
```
fun box sock_raw()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sock\_rdm

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1022)

 
```
fun box sock_rdm()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sock\_seqpacket

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1023)

 
```
fun box sock_seqpacket()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sock\_stream

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1024)

 
```
fun box sock_stream()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### somaxconn

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1025)

 
```
fun box somaxconn()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### sonpx\_setoptshut

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1026)

 
```
fun box sonpx_setoptshut()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_acceptconn

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1027)

 
```
fun box so_acceptconn()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_acceptfilter

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1028)

 
```
fun box so_acceptfilter()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_atmpvc

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1029)

 
```
fun box so_atmpvc()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_atmqos

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1030)

 
```
fun box so_atmqos()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_atmsap

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1031)

 
```
fun box so_atmsap()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_attach\_bpf

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1032)

 
```
fun box so_attach_bpf()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_attach\_filter

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1033)

 
```
fun box so_attach_filter()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_bindtodevice

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1034)

 
```
fun box so_bindtodevice()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_bintime

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1035)

 
```
fun box so_bintime()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_bpf\_extensions

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1036)

 
```
fun box so_bpf_extensions()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_broadcast

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1037)

 
```
fun box so_broadcast()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_bsdcompat

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1038)

 
```
fun box so_bsdcompat()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_bsp\_state

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1039)

 
```
fun box so_bsp_state()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_busy\_poll

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1040)

 
```
fun box so_busy_poll()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_conaccess

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1041)

 
```
fun box so_conaccess()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_condata

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1042)

 
```
fun box so_condata()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_conditional\_accept

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1043)

 
```
fun box so_conditional_accept()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_connect\_time

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1044)

 
```
fun box so_connect_time()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_debug

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1045)

 
```
fun box so_debug()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_detach\_bpf

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1046)

 
```
fun box so_detach_bpf()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_detach\_filter

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1047)

 
```
fun box so_detach_filter()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_domain

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1048)

 
```
fun box so_domain()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_dontlinger

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1049)

 
```
fun box so_dontlinger()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_dontroute

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1050)

 
```
fun box so_dontroute()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_donttrunc

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1051)

 
```
fun box so_donttrunc()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_error

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1052)

 
```
fun box so_error()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_exclusiveaddruse

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1053)

 
```
fun box so_exclusiveaddruse()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_get\_filter

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1054)

 
```
fun box so_get_filter()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_group\_id

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1055)

 
```
fun box so_group_id()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_group\_priority

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1056)

 
```
fun box so_group_priority()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_hci\_raw\_direction

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1057)

 
```
fun box so_hci_raw_direction()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_hci\_raw\_filter

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1058)

 
```
fun box so_hci_raw_filter()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_incoming\_cpu

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1059)

 
```
fun box so_incoming_cpu()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_keepalive

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1060)

 
```
fun box so_keepalive()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_l2cap\_encrypted

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1061)

 
```
fun box so_l2cap_encrypted()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_l2cap\_flush

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1062)

 
```
fun box so_l2cap_flush()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_l2cap\_iflow

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1063)

 
```
fun box so_l2cap_iflow()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_l2cap\_imtu

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1064)

 
```
fun box so_l2cap_imtu()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_l2cap\_oflow

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1065)

 
```
fun box so_l2cap_oflow()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_l2cap\_omtu

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1066)

 
```
fun box so_l2cap_omtu()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_label

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1067)

 
```
fun box so_label()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_linger

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1068)

 
```
fun box so_linger()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_linger\_sec

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1069)

 
```
fun box so_linger_sec()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_linkinfo

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1070)

 
```
fun box so_linkinfo()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_listenincqlen

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1071)

 
```
fun box so_listenincqlen()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_listenqlen

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1072)

 
```
fun box so_listenqlen()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_listenqlimit

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1073)

 
```
fun box so_listenqlimit()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_lock\_filter

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1074)

 
```
fun box so_lock_filter()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_mark

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1075)

 
```
fun box so_mark()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_max\_msg\_size

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1076)

 
```
fun box so_max_msg_size()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_max\_pacing\_rate

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1077)

 
```
fun box so_max_pacing_rate()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_multipoint

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1078)

 
```
fun box so_multipoint()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_netsvc\_marking\_level

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1079)

 
```
fun box so_netsvc_marking_level()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_net\_service\_type

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1080)

 
```
fun box so_net_service_type()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_nke

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1081)

 
```
fun box so_nke()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_noaddrerr

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1082)

 
```
fun box so_noaddrerr()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_nofcs

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1083)

 
```
fun box so_nofcs()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_nosigpipe

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1084)

 
```
fun box so_nosigpipe()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_notifyconflict

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1085)

 
```
fun box so_notifyconflict()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_no\_check

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1086)

 
```
fun box so_no_check()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_no\_ddp

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1087)

 
```
fun box so_no_ddp()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_no\_offload

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1088)

 
```
fun box so_no_offload()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_np\_extensions

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1089)

 
```
fun box so_np_extensions()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_nread

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1090)

 
```
fun box so_nread()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_numrcvpkt

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1091)

 
```
fun box so_numrcvpkt()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_nwrite

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1092)

 
```
fun box so_nwrite()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_oobinline

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1093)

 
```
fun box so_oobinline()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_original\_dst

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1094)

 
```
fun box so_original_dst()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_passcred

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1095)

 
```
fun box so_passcred()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_passsec

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1096)

 
```
fun box so_passsec()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_peek\_off

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1097)

 
```
fun box so_peek_off()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_peercred

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1098)

 
```
fun box so_peercred()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_peerlabel

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1099)

 
```
fun box so_peerlabel()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_peername

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1100)

 
```
fun box so_peername()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_peersec

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1101)

 
```
fun box so_peersec()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_port\_scalability

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1102)

 
```
fun box so_port_scalability()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_priority

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1103)

 
```
fun box so_priority()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_protocol

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1104)

 
```
fun box so_protocol()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_protocol\_info

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1105)

 
```
fun box so_protocol_info()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_prototype

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1106)

 
```
fun box so_prototype()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_proxyusr

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1107)

 
```
fun box so_proxyusr()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_randomport

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1108)

 
```
fun box so_randomport()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_rcvbuf

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1109)

 
```
fun box so_rcvbuf()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_rcvbufforce

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1110)

 
```
fun box so_rcvbufforce()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_rcvlowat

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1111)

 
```
fun box so_rcvlowat()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_rcvtimeo

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1112)

 
```
fun box so_rcvtimeo()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_rds\_transport

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1113)

 
```
fun box so_rds_transport()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_reuseaddr

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1114)

 
```
fun box so_reuseaddr()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_reuseport

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1115)

 
```
fun box so_reuseport()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_reuseshareuid

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1116)

 
```
fun box so_reuseshareuid()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_rfcomm\_fc\_info

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1117)

 
```
fun box so_rfcomm_fc_info()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_rfcomm\_mtu

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1118)

 
```
fun box so_rfcomm_mtu()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_rxq\_ovfl

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1119)

 
```
fun box so_rxq_ovfl()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_sco\_conninfo

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1120)

 
```
fun box so_sco_conninfo()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_sco\_mtu

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1121)

 
```
fun box so_sco_mtu()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_security\_authentication

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1122)

 
```
fun box so_security_authentication()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_security\_encryption\_network

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1123)

 
```
fun box so_security_encryption_network()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_security\_encryption\_transport

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1124)

 
```
fun box so_security_encryption_transport()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_select\_err\_queue

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1125)

 
```
fun box so_select_err_queue()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_setclp

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1126)

 
```
fun box so_setclp()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_setfib

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1127)

 
```
fun box so_setfib()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_sndbuf

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1128)

 
```
fun box so_sndbuf()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_sndbufforce

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1129)

 
```
fun box so_sndbufforce()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_sndlowat

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1130)

 
```
fun box so_sndlowat()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_sndtimeo

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1131)

 
```
fun box so_sndtimeo()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_timestamp

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1132)

 
```
fun box so_timestamp()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_timestamping

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1133)

 
```
fun box so_timestamping()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_timestampns

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1134)

 
```
fun box so_timestampns()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_timestamp\_monotonic

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1135)

 
```
fun box so_timestamp_monotonic()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_type

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1136)

 
```
fun box so_type()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_upcallclosewait

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1137)

 
```
fun box so_upcallclosewait()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_update\_accept\_context

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1138)

 
```
fun box so_update_accept_context()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_useloopback

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1139)

 
```
fun box so_useloopback()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_user\_cookie

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1140)

 
```
fun box so_user_cookie()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_vendor

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1141)

 
```
fun box so_vendor()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_vm\_sockets\_buffer\_max\_size

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1142)

 
```
fun box so_vm_sockets_buffer_max_size()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_vm\_sockets\_buffer\_min\_size

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1143)

 
```
fun box so_vm_sockets_buffer_min_size()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_vm\_sockets\_buffer\_size

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1144)

 
```
fun box so_vm_sockets_buffer_size()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_vm\_sockets\_connect\_timeout

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1145)

 
```
fun box so_vm_sockets_connect_timeout()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_vm\_sockets\_nonblock\_txrx

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1146)

 
```
fun box so_vm_sockets_nonblock_txrx()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_vm\_sockets\_peer\_host\_vm\_id

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1147)

 
```
fun box so_vm_sockets_peer_host_vm_id()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_vm\_sockets\_trusted

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1148)

 
```
fun box so_vm_sockets_trusted()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_wantmore

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1149)

 
```
fun box so_wantmore()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_wantoobflag

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1150)

 
```
fun box so_wantoobflag()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_wifi\_status

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1151)

 
```
fun box so_wifi_status()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcp6\_mss

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1152)

 
```
fun box tcp6_mss()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcpci\_flag\_lossrecovery

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1153)

 
```
fun box tcpci_flag_lossrecovery()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcpci\_flag\_reordering\_detected

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1154)

 
```
fun box tcpci_flag_reordering_detected()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcpci\_opt\_ecn

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1155)

 
```
fun box tcpci_opt_ecn()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcpci\_opt\_sack

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1156)

 
```
fun box tcpci_opt_sack()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcpci\_opt\_timestamps

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1157)

 
```
fun box tcpci_opt_timestamps()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcpci\_opt\_wscale

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1158)

 
```
fun box tcpci_opt_wscale()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcpf\_ca\_cwr

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1159)

 
```
fun box tcpf_ca_cwr()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcpf\_ca\_disorder

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1160)

 
```
fun box tcpf_ca_disorder()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcpf\_ca\_loss

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1161)

 
```
fun box tcpf_ca_loss()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcpf\_ca\_open

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1162)

 
```
fun box tcpf_ca_open()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcpf\_ca\_recovery

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1163)

 
```
fun box tcpf_ca_recovery()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcpi\_opt\_ecn

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1164)

 
```
fun box tcpi_opt_ecn()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcpi\_opt\_ecn\_seen

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1165)

 
```
fun box tcpi_opt_ecn_seen()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcpi\_opt\_sack

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1166)

 
```
fun box tcpi_opt_sack()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcpi\_opt\_syn\_data

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1167)

 
```
fun box tcpi_opt_syn_data()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcpi\_opt\_timestamps

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1168)

 
```
fun box tcpi_opt_timestamps()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcpi\_opt\_toe

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1169)

 
```
fun box tcpi_opt_toe()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcpi\_opt\_wscale

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1170)

 
```
fun box tcpi_opt_wscale()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcpolen\_cc

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1171)

 
```
fun box tcpolen_cc()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcpolen\_cc\_appa

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1172)

 
```
fun box tcpolen_cc_appa()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcpolen\_eol

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1173)

 
```
fun box tcpolen_eol()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcpolen\_fastopen\_req

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1174)

 
```
fun box tcpolen_fastopen_req()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcpolen\_fast\_open\_empty

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1175)

 
```
fun box tcpolen_fast_open_empty()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcpolen\_fast\_open\_max

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1176)

 
```
fun box tcpolen_fast_open_max()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcpolen\_fast\_open\_min

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1177)

 
```
fun box tcpolen_fast_open_min()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcpolen\_maxseg

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1178)

 
```
fun box tcpolen_maxseg()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcpolen\_nop

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1179)

 
```
fun box tcpolen_nop()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcpolen\_pad

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1180)

 
```
fun box tcpolen_pad()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcpolen\_sack

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1181)

 
```
fun box tcpolen_sack()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcpolen\_sackhdr

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1182)

 
```
fun box tcpolen_sackhdr()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcpolen\_sack\_permitted

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1183)

 
```
fun box tcpolen_sack_permitted()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcpolen\_signature

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1184)

 
```
fun box tcpolen_signature()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcpolen\_timestamp

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1185)

 
```
fun box tcpolen_timestamp()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcpolen\_tstamp\_appa

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1186)

 
```
fun box tcpolen_tstamp_appa()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcpolen\_window

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1187)

 
```
fun box tcpolen_window()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcpopt\_cc

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1188)

 
```
fun box tcpopt_cc()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcpopt\_ccecho

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1189)

 
```
fun box tcpopt_ccecho()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcpopt\_ccnew

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1190)

 
```
fun box tcpopt_ccnew()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcpopt\_eol

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1191)

 
```
fun box tcpopt_eol()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcpopt\_fastopen

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1192)

 
```
fun box tcpopt_fastopen()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcpopt\_fast\_open

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1193)

 
```
fun box tcpopt_fast_open()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcpopt\_maxseg

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1194)

 
```
fun box tcpopt_maxseg()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcpopt\_multipath

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1195)

 
```
fun box tcpopt_multipath()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcpopt\_nop

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1196)

 
```
fun box tcpopt_nop()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcpopt\_pad

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1197)

 
```
fun box tcpopt_pad()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcpopt\_sack

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1198)

 
```
fun box tcpopt_sack()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcpopt\_sack\_hdr

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1199)

 
```
fun box tcpopt_sack_hdr()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcpopt\_sack\_permitted

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1200)

 
```
fun box tcpopt_sack_permitted()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcpopt\_sack\_permit\_hdr

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1201)

 
```
fun box tcpopt_sack_permit_hdr()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcpopt\_signature

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1202)

 
```
fun box tcpopt_signature()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcpopt\_timestamp

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1203)

 
```
fun box tcpopt_timestamp()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcpopt\_tstamp\_hdr

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1204)

 
```
fun box tcpopt_tstamp_hdr()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcpopt\_window

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1205)

 
```
fun box tcpopt_window()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcp\_ca\_name\_max

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1206)

 
```
fun box tcp_ca_name_max()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcp\_ccalgoopt

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1207)

 
```
fun box tcp_ccalgoopt()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcp\_cc\_info

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1208)

 
```
fun box tcp_cc_info()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcp\_congestion

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1209)

 
```
fun box tcp_congestion()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcp\_connectiontimeout

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1210)

 
```
fun box tcp_connectiontimeout()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcp\_connection\_info

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1211)

 
```
fun box tcp_connection_info()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcp\_cookie\_in\_always

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1212)

 
```
fun box tcp_cookie_in_always()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcp\_cookie\_max

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1213)

 
```
fun box tcp_cookie_max()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcp\_cookie\_min

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1214)

 
```
fun box tcp_cookie_min()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcp\_cookie\_out\_never

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1215)

 
```
fun box tcp_cookie_out_never()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcp\_cookie\_pair\_size

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1216)

 
```
fun box tcp_cookie_pair_size()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcp\_cookie\_transactions

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1217)

 
```
fun box tcp_cookie_transactions()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcp\_cork

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1218)

 
```
fun box tcp_cork()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcp\_defer\_accept

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1219)

 
```
fun box tcp_defer_accept()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcp\_enable\_ecn

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1220)

 
```
fun box tcp_enable_ecn()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcp\_fastopen

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1221)

 
```
fun box tcp_fastopen()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcp\_function\_blk

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1222)

 
```
fun box tcp_function_blk()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcp\_function\_name\_len\_max

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1223)

 
```
fun box tcp_function_name_len_max()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcp\_info

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1224)

 
```
fun box tcp_info()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcp\_keepalive

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1225)

 
```
fun box tcp_keepalive()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcp\_keepcnt

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1226)

 
```
fun box tcp_keepcnt()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcp\_keepidle

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1227)

 
```
fun box tcp_keepidle()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcp\_keepinit

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1228)

 
```
fun box tcp_keepinit()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcp\_keepintvl

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1229)

 
```
fun box tcp_keepintvl()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcp\_linger2

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1230)

 
```
fun box tcp_linger2()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcp\_maxburst

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1231)

 
```
fun box tcp_maxburst()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcp\_maxhlen

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1232)

 
```
fun box tcp_maxhlen()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcp\_maxolen

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1233)

 
```
fun box tcp_maxolen()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcp\_maxseg

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1234)

 
```
fun box tcp_maxseg()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcp\_maxwin

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1235)

 
```
fun box tcp_maxwin()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcp\_max\_sack

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1236)

 
```
fun box tcp_max_sack()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcp\_max\_winshift

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1237)

 
```
fun box tcp_max_winshift()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcp\_md5sig

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1238)

 
```
fun box tcp_md5sig()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcp\_md5sig\_maxkeylen

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1239)

 
```
fun box tcp_md5sig_maxkeylen()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcp\_minmss

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1240)

 
```
fun box tcp_minmss()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcp\_mss

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1241)

 
```
fun box tcp_mss()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcp\_mss\_default

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1242)

 
```
fun box tcp_mss_default()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcp\_mss\_desired

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1243)

 
```
fun box tcp_mss_desired()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcp\_nodelay

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1244)

 
```
fun box tcp_nodelay()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcp\_noopt

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1245)

 
```
fun box tcp_noopt()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcp\_nopush

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1246)

 
```
fun box tcp_nopush()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcp\_notsent\_lowat

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1247)

 
```
fun box tcp_notsent_lowat()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcp\_pcap\_in

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1248)

 
```
fun box tcp_pcap_in()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcp\_pcap\_out

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1249)

 
```
fun box tcp_pcap_out()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcp\_queue\_seq

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1250)

 
```
fun box tcp_queue_seq()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcp\_quickack

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1251)

 
```
fun box tcp_quickack()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcp\_repair

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1252)

 
```
fun box tcp_repair()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcp\_repair\_options

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1253)

 
```
fun box tcp_repair_options()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcp\_repair\_queue

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1254)

 
```
fun box tcp_repair_queue()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcp\_rxt\_conndroptime

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1255)

 
```
fun box tcp_rxt_conndroptime()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcp\_rxt\_findrop

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1256)

 
```
fun box tcp_rxt_findrop()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcp\_saved\_syn

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1257)

 
```
fun box tcp_saved_syn()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcp\_save\_syn

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1258)

 
```
fun box tcp_save_syn()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcp\_sendmoreacks

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1259)

 
```
fun box tcp_sendmoreacks()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcp\_syncnt

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1260)

 
```
fun box tcp_syncnt()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcp\_s\_data\_in

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1261)

 
```
fun box tcp_s_data_in()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcp\_s\_data\_out

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1262)

 
```
fun box tcp_s_data_out()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcp\_thin\_dupack

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1263)

 
```
fun box tcp_thin_dupack()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcp\_thin\_linear\_timeouts

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1264)

 
```
fun box tcp_thin_linear_timeouts()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcp\_timestamp

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1265)

 
```
fun box tcp_timestamp()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcp\_user\_timeout

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1266)

 
```
fun box tcp_user_timeout()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcp\_vendor

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1267)

 
```
fun box tcp_vendor()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tcp\_window\_clamp

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1268)

 
```
fun box tcp_window_clamp()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tipc\_addr\_id

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1269)

 
```
fun box tipc_addr_id()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tipc\_addr\_mcast

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1270)

 
```
fun box tipc_addr_mcast()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tipc\_addr\_name

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1271)

 
```
fun box tipc_addr_name()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tipc\_addr\_nameseq

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1272)

 
```
fun box tipc_addr_nameseq()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tipc\_cfg\_srv

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1273)

 
```
fun box tipc_cfg_srv()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tipc\_cluster\_scope

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1274)

 
```
fun box tipc_cluster_scope()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tipc\_conn\_shutdown

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1275)

 
```
fun box tipc_conn_shutdown()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tipc\_conn\_timeout

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1276)

 
```
fun box tipc_conn_timeout()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tipc\_critical\_importance

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1277)

 
```
fun box tipc_critical_importance()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tipc\_destname

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1278)

 
```
fun box tipc_destname()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tipc\_dest\_droppable

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1279)

 
```
fun box tipc_dest_droppable()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tipc\_errinfo

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1280)

 
```
fun box tipc_errinfo()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tipc\_err\_no\_name

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1281)

 
```
fun box tipc_err_no_name()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tipc\_err\_no\_node

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1282)

 
```
fun box tipc_err_no_node()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tipc\_err\_no\_port

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1283)

 
```
fun box tipc_err_no_port()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tipc\_err\_overload

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1284)

 
```
fun box tipc_err_overload()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tipc\_high\_importance

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1285)

 
```
fun box tipc_high_importance()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tipc\_importance

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1286)

 
```
fun box tipc_importance()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tipc\_link\_state

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1287)

 
```
fun box tipc_link_state()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tipc\_low\_importance

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1288)

 
```
fun box tipc_low_importance()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tipc\_max\_bearer\_name

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1289)

 
```
fun box tipc_max_bearer_name()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tipc\_max\_if\_name

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1290)

 
```
fun box tipc_max_if_name()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tipc\_max\_link\_name

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1291)

 
```
fun box tipc_max_link_name()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tipc\_max\_media\_name

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1292)

 
```
fun box tipc_max_media_name()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tipc\_max\_user\_msg\_size

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1293)

 
```
fun box tipc_max_user_msg_size()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tipc\_medium\_importance

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1294)

 
```
fun box tipc_medium_importance()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tipc\_node\_recvq\_depth

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1295)

 
```
fun box tipc_node_recvq_depth()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tipc\_node\_scope

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1296)

 
```
fun box tipc_node_scope()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tipc\_ok

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1297)

 
```
fun box tipc_ok()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tipc\_published

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1298)

 
```
fun box tipc_published()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tipc\_reserved\_types

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1299)

 
```
fun box tipc_reserved_types()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tipc\_retdata

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1300)

 
```
fun box tipc_retdata()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tipc\_sock\_recvq\_depth

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1301)

 
```
fun box tipc_sock_recvq_depth()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tipc\_src\_droppable

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1302)

 
```
fun box tipc_src_droppable()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tipc\_subscr\_timeout

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1303)

 
```
fun box tipc_subscr_timeout()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tipc\_sub\_cancel

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1304)

 
```
fun box tipc_sub_cancel()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tipc\_sub\_ports

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1305)

 
```
fun box tipc_sub_ports()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tipc\_sub\_service

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1306)

 
```
fun box tipc_sub_service()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tipc\_top\_srv

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1307)

 
```
fun box tipc_top_srv()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tipc\_wait\_forever

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1308)

 
```
fun box tipc_wait_forever()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tipc\_withdrawn

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1309)

 
```
fun box tipc_withdrawn()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### tipc\_zone\_scope

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1310)

 
```
fun box tipc_zone_scope()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### ttcp\_client\_snd\_wnd

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1311)

 
```
fun box ttcp_client_snd_wnd()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### udp\_cork

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1312)

 
```
fun box udp_cork()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### udp\_encap

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1313)

 
```
fun box udp_encap()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### udp\_encap\_espinudp

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1314)

 
```
fun box udp_encap_espinudp()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### udp\_encap\_espinudp\_maxfraglen

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1315)

 
```
fun box udp_encap_espinudp_maxfraglen()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### udp\_encap\_espinudp\_non\_ike

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1316)

 
```
fun box udp_encap_espinudp_non_ike()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### udp\_encap\_espinudp\_port

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1317)

 
```
fun box udp_encap_espinudp_port()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### udp\_encap\_l2tpinudp

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1318)

 
```
fun box udp_encap_l2tpinudp()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### udp\_nocksum

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1319)

 
```
fun box udp_nocksum()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### udp\_no\_check6\_rx

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1320)

 
```
fun box udp_no_check6_rx()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### udp\_no\_check6\_tx

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1321)

 
```
fun box udp_no_check6_tx()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### udp\_vendor

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1322)

 
```
fun box udp_vendor()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_rcvtimeo\_old

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1323)

 
```
fun box so_rcvtimeo_old()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_rcvtimeo\_new

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1324)

 
```
fun box so_rcvtimeo_new()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_sndtimeo\_old

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1325)

 
```
fun box so_sndtimeo_old()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### so\_sndtimeo\_new

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L1326)

 
```
fun box so_sndtimeo_new()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L76)

 
```
fun box eq(
  that: OSSockOpt val)
: Bool val

```
 #### Parameters

 * that: [OSSockOpt](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/net/ossockopt/#L76)

 
```
fun box ne(
  that: OSSockOpt val)
: Bool val

```
 #### Parameters

 * that: [OSSockOpt](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/net-OSSockOpt>

XorOshiro128Plus
================

 [[Source]](https://stdlib.ponylang.io/src/random/xoroshiro/#L1)

 This is an implementation of xoroshiro128+, as detailed at:

 http://xoroshiro.di.unimi.it

 This is currently the default Rand implementation.

 
```
class ref XorOshiro128Plus is
  Random ref

```
 #### Implements

 * [Random](random-random) ref

 Constructors
------------

 ### from\_u64

 [[Source]](https://stdlib.ponylang.io/src/random/xoroshiro/#L13)

 Use seed x to seed a [SplitMix64](random-splitmix64) and use this to initialize the 128 bits of state.

 
```
new ref from_u64(
  x: U64 val = 5489)
: XorOshiro128Plus ref^

```
 #### Parameters

 * x: [U64](builtin-u64) val = 5489

 #### Returns

 * [XorOshiro128Plus](index) ref^

 ### create

 [[Source]](https://stdlib.ponylang.io/src/random/xoroshiro/#L22)

 Create with the specified seed. Returned values are deterministic for a given seed.

 
```
new ref create(
  x: U64 val = 5489,
  y: U64 val = 0)
: XorOshiro128Plus ref^

```
 #### Parameters

 * x: [U64](builtin-u64) val = 5489
* y: [U64](builtin-u64) val = 0

 #### Returns

 * [XorOshiro128Plus](index) ref^

 Public Functions
----------------

 ### next

 [[Source]](https://stdlib.ponylang.io/src/random/xoroshiro/#L31)

 A random integer in [0, 2^64)

 
```
fun ref next()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### has\_next

 
```
fun tag has_next()
: Bool val

```
 #### Returns

 * [Bool](builtin-bool) val

 ### u8

 
```
fun ref u8()
: U8 val

```
 #### Returns

 * [U8](builtin-u8) val

 ### u16

 
```
fun ref u16()
: U16 val

```
 #### Returns

 * [U16](builtin-u16) val

 ### u32

 
```
fun ref u32()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### u64

 
```
fun ref u64()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### u128

 
```
fun ref u128()
: U128 val

```
 #### Returns

 * [U128](builtin-u128) val

 ### ulong

 
```
fun ref ulong()
: ULong val

```
 #### Returns

 * [ULong](builtin-ulong) val

 ### usize

 
```
fun ref usize()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### i8

 
```
fun ref i8()
: I8 val

```
 #### Returns

 * [I8](builtin-i8) val

 ### i16

 
```
fun ref i16()
: I16 val

```
 #### Returns

 * [I16](builtin-i16) val

 ### i32

 
```
fun ref i32()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### i64

 
```
fun ref i64()
: I64 val

```
 #### Returns

 * [I64](builtin-i64) val

 ### i128

 
```
fun ref i128()
: I128 val

```
 #### Returns

 * [I128](builtin-i128) val

 ### ilong

 
```
fun ref ilong()
: ILong val

```
 #### Returns

 * [ILong](builtin-ilong) val

 ### isize

 
```
fun ref isize()
: ISize val

```
 #### Returns

 * [ISize](builtin-isize) val

 ### int\_fp\_mult[optional N: (([U8](builtin-u8) val | [U16](builtin-u16) val | [U32](builtin-u32) val | [U64](builtin-u64) val | [U128](builtin-u128) val | [ULong](builtin-ulong) val | [USize](builtin-usize) val) & [Real](builtin-real)[N] val)]

 
```
fun ref int_fp_mult[optional N: ((U8 val | U16 val | U32 val | 
    U64 val | U128 val | ULong val | 
    USize val) & Real[N] val)](
  n: N)
: N

```
 #### Parameters

 * n: N

 #### Returns

 * N

 ### int[optional N: (([U8](builtin-u8) val | [U16](builtin-u16) val | [U32](builtin-u32) val | [U64](builtin-u64) val | [U128](builtin-u128) val | [ULong](builtin-ulong) val | [USize](builtin-usize) val) & [Real](builtin-real)[N] val)]

 
```
fun ref int[optional N: ((U8 val | U16 val | U32 val | 
    U64 val | U128 val | ULong val | 
    USize val) & Real[N] val)](
  n: N)
: N

```
 #### Parameters

 * n: N

 #### Returns

 * N

 ### int\_unbiased[optional N: (([U8](builtin-u8) val | [U16](builtin-u16) val | [U32](builtin-u32) val | [U64](builtin-u64) val | [U128](builtin-u128) val | [ULong](builtin-ulong) val | [USize](builtin-usize) val) & [Real](builtin-real)[N] val)]

 
```
fun ref int_unbiased[optional N: ((U8 val | U16 val | U32 val | 
    U64 val | U128 val | ULong val | 
    USize val) & Real[N] val)](
  n: N)
: N

```
 #### Parameters

 * n: N

 #### Returns

 * N

 ### real

 
```
fun ref real()
: F64 val

```
 #### Returns

 * [F64](builtin-f64) val

 ### shuffle[A: A]

 
```
fun ref shuffle[A: A](
  array: Array[A] ref)
: None val

```
 #### Parameters

 * array: [Array](builtin-array)[A] ref

 #### Returns

 * [None](builtin-none) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/random-XorOshiro128Plus>

SplitMix64
==========

 [[Source]](https://stdlib.ponylang.io/src/random/splitmix64/#L1)

 Very fast Pseudo-Random-Number-Generator using only 64 bit of state, as detailed at:

 http://xoshiro.di.unimi.it/ and http://gee.cs.oswego.edu/dl/papers/oopsla14.pdf

 Using [XorOshiro128StarStar](random-xoroshiro128starstar) or [XorOshiro128Plus](random-xoroshiro128plus) should be prefered unless using only 64 bit of state is a requirement.

 
```
class ref SplitMix64 is
  Random ref

```
 #### Implements

 * [Random](random-random) ref

 Constructors
------------

 ### from\_u64

 [[Source]](https://stdlib.ponylang.io/src/random/splitmix64/#L14)

 
```
new ref from_u64(
  x: U64 val = 5489)
: SplitMix64 ref^

```
 #### Parameters

 * x: [U64](builtin-u64) val = 5489

 #### Returns

 * [SplitMix64](index) ref^

 ### create

 [[Source]](https://stdlib.ponylang.io/src/random/splitmix64/#L17)

 Only x is used, y is discarded.

 
```
new ref create(
  x: U64 val = 5489,
  y: U64 val = 0)
: SplitMix64 ref^

```
 #### Parameters

 * x: [U64](builtin-u64) val = 5489
* y: [U64](builtin-u64) val = 0

 #### Returns

 * [SplitMix64](index) ref^

 Public Functions
----------------

 ### next

 [[Source]](https://stdlib.ponylang.io/src/random/splitmix64/#L23)

 
```
fun ref next()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### has\_next

 
```
fun tag has_next()
: Bool val

```
 #### Returns

 * [Bool](builtin-bool) val

 ### u8

 
```
fun ref u8()
: U8 val

```
 #### Returns

 * [U8](builtin-u8) val

 ### u16

 
```
fun ref u16()
: U16 val

```
 #### Returns

 * [U16](builtin-u16) val

 ### u32

 
```
fun ref u32()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### u64

 
```
fun ref u64()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### u128

 
```
fun ref u128()
: U128 val

```
 #### Returns

 * [U128](builtin-u128) val

 ### ulong

 
```
fun ref ulong()
: ULong val

```
 #### Returns

 * [ULong](builtin-ulong) val

 ### usize

 
```
fun ref usize()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### i8

 
```
fun ref i8()
: I8 val

```
 #### Returns

 * [I8](builtin-i8) val

 ### i16

 
```
fun ref i16()
: I16 val

```
 #### Returns

 * [I16](builtin-i16) val

 ### i32

 
```
fun ref i32()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### i64

 
```
fun ref i64()
: I64 val

```
 #### Returns

 * [I64](builtin-i64) val

 ### i128

 
```
fun ref i128()
: I128 val

```
 #### Returns

 * [I128](builtin-i128) val

 ### ilong

 
```
fun ref ilong()
: ILong val

```
 #### Returns

 * [ILong](builtin-ilong) val

 ### isize

 
```
fun ref isize()
: ISize val

```
 #### Returns

 * [ISize](builtin-isize) val

 ### int\_fp\_mult[optional N: (([U8](builtin-u8) val | [U16](builtin-u16) val | [U32](builtin-u32) val | [U64](builtin-u64) val | [U128](builtin-u128) val | [ULong](builtin-ulong) val | [USize](builtin-usize) val) & [Real](builtin-real)[N] val)]

 
```
fun ref int_fp_mult[optional N: ((U8 val | U16 val | U32 val | 
    U64 val | U128 val | ULong val | 
    USize val) & Real[N] val)](
  n: N)
: N

```
 #### Parameters

 * n: N

 #### Returns

 * N

 ### int[optional N: (([U8](builtin-u8) val | [U16](builtin-u16) val | [U32](builtin-u32) val | [U64](builtin-u64) val | [U128](builtin-u128) val | [ULong](builtin-ulong) val | [USize](builtin-usize) val) & [Real](builtin-real)[N] val)]

 
```
fun ref int[optional N: ((U8 val | U16 val | U32 val | 
    U64 val | U128 val | ULong val | 
    USize val) & Real[N] val)](
  n: N)
: N

```
 #### Parameters

 * n: N

 #### Returns

 * N

 ### int\_unbiased[optional N: (([U8](builtin-u8) val | [U16](builtin-u16) val | [U32](builtin-u32) val | [U64](builtin-u64) val | [U128](builtin-u128) val | [ULong](builtin-ulong) val | [USize](builtin-usize) val) & [Real](builtin-real)[N] val)]

 
```
fun ref int_unbiased[optional N: ((U8 val | U16 val | U32 val | 
    U64 val | U128 val | ULong val | 
    USize val) & Real[N] val)](
  n: N)
: N

```
 #### Parameters

 * n: N

 #### Returns

 * N

 ### real

 
```
fun ref real()
: F64 val

```
 #### Returns

 * [F64](builtin-f64) val

 ### shuffle[A: A]

 
```
fun ref shuffle[A: A](
  array: Array[A] ref)
: None val

```
 #### Parameters

 * array: [Array](builtin-array)[A] ref

 #### Returns

 * [None](builtin-none) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/random-SplitMix64>

Rand
====

 [[Source]](https://stdlib.ponylang.io/src/random/random/#L19)

 
```
type Rand is
  XorOshiro128Plus ref

```
 #### Type Alias For

 * [XorOshiro128Plus](random-xoroshiro128plus) ref



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/random-Rand>

Sig
===

 [[Source]](https://stdlib.ponylang.io/src/signals/sig/#L51)

 Define the portable signal numbers. Other signals can be used, but they are not guaranteed to be portable.

 
```
primitive val Sig

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/signals/sig/#L51)

 
```
new val create()
: Sig val^

```
 #### Returns

 * [Sig](index) val^

 Public Functions
----------------

 ### hup

 [[Source]](https://stdlib.ponylang.io/src/signals/sig/#L56)

 
```
fun box hup()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### int

 [[Source]](https://stdlib.ponylang.io/src/signals/sig/#L57)

 
```
fun box int()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### quit

 [[Source]](https://stdlib.ponylang.io/src/signals/sig/#L58)

 
```
fun box quit()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### ill

 [[Source]](https://stdlib.ponylang.io/src/signals/sig/#L60)

 
```
fun box ill()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### trap

 [[Source]](https://stdlib.ponylang.io/src/signals/sig/#L65)

 
```
fun box trap()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### abrt

 [[Source]](https://stdlib.ponylang.io/src/signals/sig/#L70)

 
```
fun box abrt()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### emt

 [[Source]](https://stdlib.ponylang.io/src/signals/sig/#L72)

 
```
fun box emt()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### fpe

 [[Source]](https://stdlib.ponylang.io/src/signals/sig/#L77)

 
```
fun box fpe()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### kill

 [[Source]](https://stdlib.ponylang.io/src/signals/sig/#L82)

 
```
fun box kill()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### bus

 [[Source]](https://stdlib.ponylang.io/src/signals/sig/#L84)

 
```
fun box bus()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### segv

 [[Source]](https://stdlib.ponylang.io/src/signals/sig/#L90)

 
```
fun box segv()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### sys

 [[Source]](https://stdlib.ponylang.io/src/signals/sig/#L95)

 
```
fun box sys()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### pipe

 [[Source]](https://stdlib.ponylang.io/src/signals/sig/#L101)

 
```
fun box pipe()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### alrm

 [[Source]](https://stdlib.ponylang.io/src/signals/sig/#L106)

 
```
fun box alrm()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### term

 [[Source]](https://stdlib.ponylang.io/src/signals/sig/#L107)

 
```
fun box term()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### urg

 [[Source]](https://stdlib.ponylang.io/src/signals/sig/#L109)

 
```
fun box urg()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### stkflt

 [[Source]](https://stdlib.ponylang.io/src/signals/sig/#L115)

 
```
fun box stkflt()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### stop

 [[Source]](https://stdlib.ponylang.io/src/signals/sig/#L120)

 
```
fun box stop()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### tstp

 [[Source]](https://stdlib.ponylang.io/src/signals/sig/#L126)

 
```
fun box tstp()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### cont

 [[Source]](https://stdlib.ponylang.io/src/signals/sig/#L132)

 
```
fun box cont()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### chld

 [[Source]](https://stdlib.ponylang.io/src/signals/sig/#L138)

 
```
fun box chld()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### ttin

 [[Source]](https://stdlib.ponylang.io/src/signals/sig/#L144)

 
```
fun box ttin()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### ttou

 [[Source]](https://stdlib.ponylang.io/src/signals/sig/#L149)

 
```
fun box ttou()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### io

 [[Source]](https://stdlib.ponylang.io/src/signals/sig/#L154)

 
```
fun box io()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### xcpu

 [[Source]](https://stdlib.ponylang.io/src/signals/sig/#L160)

 
```
fun box xcpu()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### xfsz

 [[Source]](https://stdlib.ponylang.io/src/signals/sig/#L165)

 
```
fun box xfsz()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### vtalrm

 [[Source]](https://stdlib.ponylang.io/src/signals/sig/#L170)

 
```
fun box vtalrm()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### prof

 [[Source]](https://stdlib.ponylang.io/src/signals/sig/#L175)

 
```
fun box prof()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### winch

 [[Source]](https://stdlib.ponylang.io/src/signals/sig/#L180)

 
```
fun box winch()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### info

 [[Source]](https://stdlib.ponylang.io/src/signals/sig/#L185)

 
```
fun box info()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### pwr

 [[Source]](https://stdlib.ponylang.io/src/signals/sig/#L190)

 
```
fun box pwr()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### usr1

 [[Source]](https://stdlib.ponylang.io/src/signals/sig/#L195)

 
```
fun box usr1()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### usr2

 [[Source]](https://stdlib.ponylang.io/src/signals/sig/#L201)

 
```
fun box usr2()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### rt

 [[Source]](https://stdlib.ponylang.io/src/signals/sig/#L215)

 
```
fun box rt(
  n: U32 val)
: U32 val ?

```
 #### Parameters

 * n: [U32](builtin-u32) val

 #### Returns

 * [U32](builtin-u32) val ?

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/signals/sig/#L56)

 
```
fun box eq(
  that: Sig val)
: Bool val

```
 #### Parameters

 * that: [Sig](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/signals/sig/#L56)

 
```
fun box ne(
  that: Sig val)
: Bool val

```
 #### Parameters

 * that: [Sig](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/signals-Sig>

Random
======

 [[Source]](https://stdlib.ponylang.io/src/random/random/#L21)

 The `Random` trait should be implemented by all random number generators. The only method you need to implement is `fun ref next(): 64`. Once that method has been implemented, the `Random` trait provides default implementations of conversions to other number types.

 
```
trait ref Random

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/random/random/#L28)

 Create with the specified seed. Returned values are deterministic for a given seed.

 
```
new ref create(
  x: U64 val = 5489,
  y: U64 val = 0)
: Random ref^

```
 #### Parameters

 * x: [U64](builtin-u64) val = 5489
* y: [U64](builtin-u64) val = 0

 #### Returns

 * [Random](index) ref^

 Public Functions
----------------

 ### has\_next

 [[Source]](https://stdlib.ponylang.io/src/random/random/#L34)

 If used as an iterator, this always has another value.

 
```
fun tag has_next()
: Bool val

```
 #### Returns

 * [Bool](builtin-bool) val

 ### next

 [[Source]](https://stdlib.ponylang.io/src/random/random/#L40)

 A random integer in [0, 2^64)

 
```
fun ref next()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### u8

 [[Source]](https://stdlib.ponylang.io/src/random/random/#L45)

 A random integer in [0, 2^8)

 
```
fun ref u8()
: U8 val

```
 #### Returns

 * [U8](builtin-u8) val

 ### u16

 [[Source]](https://stdlib.ponylang.io/src/random/random/#L51)

 A random integer in [0, 2^16)

 
```
fun ref u16()
: U16 val

```
 #### Returns

 * [U16](builtin-u16) val

 ### u32

 [[Source]](https://stdlib.ponylang.io/src/random/random/#L57)

 A random integer in [0, 2^32)

 
```
fun ref u32()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### u64

 [[Source]](https://stdlib.ponylang.io/src/random/random/#L63)

 A random integer in [0, 2^64)

 
```
fun ref u64()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### u128

 [[Source]](https://stdlib.ponylang.io/src/random/random/#L69)

 A random integer in [0, 2^128)

 
```
fun ref u128()
: U128 val

```
 #### Returns

 * [U128](builtin-u128) val

 ### ulong

 [[Source]](https://stdlib.ponylang.io/src/random/random/#L75)

 A random integer in [0, ULong.max\_value()]

 
```
fun ref ulong()
: ULong val

```
 #### Returns

 * [ULong](builtin-ulong) val

 ### usize

 [[Source]](https://stdlib.ponylang.io/src/random/random/#L85)

 A random integer in [0, USize.max\_value()]

 
```
fun ref usize()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### i8

 [[Source]](https://stdlib.ponylang.io/src/random/random/#L95)

 A random integer in [-2^7, 2^7)

 
```
fun ref i8()
: I8 val

```
 #### Returns

 * [I8](builtin-i8) val

 ### i16

 [[Source]](https://stdlib.ponylang.io/src/random/random/#L101)

 A random integer in [-2^15, 2^15)

 
```
fun ref i16()
: I16 val

```
 #### Returns

 * [I16](builtin-i16) val

 ### i32

 [[Source]](https://stdlib.ponylang.io/src/random/random/#L107)

 A random integer in [-2^31, 2^31)

 
```
fun ref i32()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### i64

 [[Source]](https://stdlib.ponylang.io/src/random/random/#L113)

 A random integer in [-2^63, 2^63)

 
```
fun ref i64()
: I64 val

```
 #### Returns

 * [I64](builtin-i64) val

 ### i128

 [[Source]](https://stdlib.ponylang.io/src/random/random/#L119)

 A random integer in [-2^127, 2^127)

 
```
fun ref i128()
: I128 val

```
 #### Returns

 * [I128](builtin-i128) val

 ### ilong

 [[Source]](https://stdlib.ponylang.io/src/random/random/#L125)

 A random integer in [ILong.min\_value(), ILong.max\_value()]

 
```
fun ref ilong()
: ILong val

```
 #### Returns

 * [ILong](builtin-ilong) val

 ### isize

 [[Source]](https://stdlib.ponylang.io/src/random/random/#L131)

 A random integer in [ISize.min\_value(), ISize.max\_value()]

 
```
fun ref isize()
: ISize val

```
 #### Returns

 * [ISize](builtin-isize) val

 ### int\_fp\_mult[optional N: (([U8](builtin-u8) val | [U16](builtin-u16) val | [U32](builtin-u32) val | [U64](builtin-u64) val | [U128](builtin-u128) val | [ULong](builtin-ulong) val | [USize](builtin-usize) val) & [Real](builtin-real)[N] val)]

 [[Source]](https://stdlib.ponylang.io/src/random/random/#L137)

 A random integer in [0, n)

 
```
fun ref int_fp_mult[optional N: ((U8 val | U16 val | U32 val | 
    U64 val | U128 val | ULong val | 
    USize val) & Real[N] val)](
  n: N)
: N

```
 #### Parameters

 * n: N

 #### Returns

 * N

 ### int[optional N: (([U8](builtin-u8) val | [U16](builtin-u16) val | [U32](builtin-u32) val | [U64](builtin-u64) val | [U128](builtin-u128) val | [ULong](builtin-ulong) val | [USize](builtin-usize) val) & [Real](builtin-real)[N] val)]

 [[Source]](https://stdlib.ponylang.io/src/random/random/#L143)

 A random integer in [0, n)

 Uses fixed-point inversion if platform supports native 128 bit operations otherwise uses floating-point multiplication.

 
```
fun ref int[optional N: ((U8 val | U16 val | U32 val | 
    U64 val | U128 val | ULong val | 
    USize val) & Real[N] val)](
  n: N)
: N

```
 #### Parameters

 * n: N

 #### Returns

 * N

 ### int\_unbiased[optional N: (([U8](builtin-u8) val | [U16](builtin-u16) val | [U32](builtin-u32) val | [U64](builtin-u64) val | [U128](builtin-u128) val | [ULong](builtin-ulong) val | [USize](builtin-usize) val) & [Real](builtin-real)[N] val)]

 [[Source]](https://stdlib.ponylang.io/src/random/random/#L159)

 A random integer in [0, n)

 Not biased with small values of `n` like `int`.

 
```
fun ref int_unbiased[optional N: ((U8 val | U16 val | U32 val | 
    U64 val | U128 val | ULong val | 
    USize val) & Real[N] val)](
  n: N)
: N

```
 #### Parameters

 * n: N

 #### Returns

 * N

 ### real

 [[Source]](https://stdlib.ponylang.io/src/random/random/#L195)

 A random number in [0, 1)

 
```
fun ref real()
: F64 val

```
 #### Returns

 * [F64](builtin-f64) val

 ### shuffle[A: A]

 [[Source]](https://stdlib.ponylang.io/src/random/random/#L201)

 Shuffle the elements of the array into a random order, mutating the array.

 
```
fun ref shuffle[A: A](
  array: Array[A] ref)
: None val

```
 #### Parameters

 * array: [Array](builtin-array)[A] ref

 #### Returns

 * [None](builtin-none) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/random-Random>

MT
==

 [[Source]](https://stdlib.ponylang.io/src/random/mt/#L1)

 A Mersenne Twister. This is a non-cryptographic random number generator. This should only be used for legacy applications that require a Mersenne Twister, otherwise use Rand.

 
```
class ref MT is
  Random ref

```
 #### Implements

 * [Random](random-random) ref

 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/random/mt/#L10)

 Create with the specified seed. Returned values are deterministic for a given seed.

 
```
new ref create(
  x: U64 val = 5489,
  y: U64 val = 0)
: MT ref^

```
 #### Parameters

 * x: [U64](builtin-u64) val = 5489
* y: [U64](builtin-u64) val = 0

 #### Returns

 * [MT](index) ref^

 Public Functions
----------------

 ### next

 [[Source]](https://stdlib.ponylang.io/src/random/mt/#L29)

 A random integer in [0, 2^64)

 
```
fun ref next()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### has\_next

 [[Source]](https://stdlib.ponylang.io/src/random/random/#L34)

 
```
fun tag has_next()
: Bool val

```
 #### Returns

 * [Bool](builtin-bool) val

 ### u8

 [[Source]](https://stdlib.ponylang.io/src/random/random/#L45)

 
```
fun ref u8()
: U8 val

```
 #### Returns

 * [U8](builtin-u8) val

 ### u16

 [[Source]](https://stdlib.ponylang.io/src/random/random/#L51)

 
```
fun ref u16()
: U16 val

```
 #### Returns

 * [U16](builtin-u16) val

 ### u32

 [[Source]](https://stdlib.ponylang.io/src/random/random/#L57)

 
```
fun ref u32()
: U32 val

```
 #### Returns

 * [U32](builtin-u32) val

 ### u64

 [[Source]](https://stdlib.ponylang.io/src/random/random/#L63)

 
```
fun ref u64()
: U64 val

```
 #### Returns

 * [U64](builtin-u64) val

 ### u128

 [[Source]](https://stdlib.ponylang.io/src/random/random/#L69)

 
```
fun ref u128()
: U128 val

```
 #### Returns

 * [U128](builtin-u128) val

 ### ulong

 [[Source]](https://stdlib.ponylang.io/src/random/random/#L75)

 
```
fun ref ulong()
: ULong val

```
 #### Returns

 * [ULong](builtin-ulong) val

 ### usize

 [[Source]](https://stdlib.ponylang.io/src/random/random/#L85)

 
```
fun ref usize()
: USize val

```
 #### Returns

 * [USize](builtin-usize) val

 ### i8

 [[Source]](https://stdlib.ponylang.io/src/random/random/#L95)

 
```
fun ref i8()
: I8 val

```
 #### Returns

 * [I8](builtin-i8) val

 ### i16

 [[Source]](https://stdlib.ponylang.io/src/random/random/#L101)

 
```
fun ref i16()
: I16 val

```
 #### Returns

 * [I16](builtin-i16) val

 ### i32

 [[Source]](https://stdlib.ponylang.io/src/random/random/#L107)

 
```
fun ref i32()
: I32 val

```
 #### Returns

 * [I32](builtin-i32) val

 ### i64

 [[Source]](https://stdlib.ponylang.io/src/random/random/#L113)

 
```
fun ref i64()
: I64 val

```
 #### Returns

 * [I64](builtin-i64) val

 ### i128

 [[Source]](https://stdlib.ponylang.io/src/random/random/#L119)

 
```
fun ref i128()
: I128 val

```
 #### Returns

 * [I128](builtin-i128) val

 ### ilong

 [[Source]](https://stdlib.ponylang.io/src/random/random/#L125)

 
```
fun ref ilong()
: ILong val

```
 #### Returns

 * [ILong](builtin-ilong) val

 ### isize

 [[Source]](https://stdlib.ponylang.io/src/random/random/#L131)

 
```
fun ref isize()
: ISize val

```
 #### Returns

 * [ISize](builtin-isize) val

 ### int\_fp\_mult[optional N: (([U8](builtin-u8) val | [U16](builtin-u16) val | [U32](builtin-u32) val | [U64](builtin-u64) val | [U128](builtin-u128) val | [ULong](builtin-ulong) val | [USize](builtin-usize) val) & [Real](builtin-real)[N] val)]

 [[Source]](https://stdlib.ponylang.io/src/random/random/#L137)

 
```
fun ref int_fp_mult[optional N: ((U8 val | U16 val | U32 val | 
    U64 val | U128 val | ULong val | 
    USize val) & Real[N] val)](
  n: N)
: N

```
 #### Parameters

 * n: N

 #### Returns

 * N

 ### int[optional N: (([U8](builtin-u8) val | [U16](builtin-u16) val | [U32](builtin-u32) val | [U64](builtin-u64) val | [U128](builtin-u128) val | [ULong](builtin-ulong) val | [USize](builtin-usize) val) & [Real](builtin-real)[N] val)]

 [[Source]](https://stdlib.ponylang.io/src/random/random/#L143)

 
```
fun ref int[optional N: ((U8 val | U16 val | U32 val | 
    U64 val | U128 val | ULong val | 
    USize val) & Real[N] val)](
  n: N)
: N

```
 #### Parameters

 * n: N

 #### Returns

 * N

 ### int\_unbiased[optional N: (([U8](builtin-u8) val | [U16](builtin-u16) val | [U32](builtin-u32) val | [U64](builtin-u64) val | [U128](builtin-u128) val | [ULong](builtin-ulong) val | [USize](builtin-usize) val) & [Real](builtin-real)[N] val)]

 [[Source]](https://stdlib.ponylang.io/src/random/random/#L159)

 
```
fun ref int_unbiased[optional N: ((U8 val | U16 val | U32 val | 
    U64 val | U128 val | ULong val | 
    USize val) & Real[N] val)](
  n: N)
: N

```
 #### Parameters

 * n: N

 #### Returns

 * N

 ### real

 [[Source]](https://stdlib.ponylang.io/src/random/random/#L195)

 
```
fun ref real()
: F64 val

```
 #### Returns

 * [F64](builtin-f64) val

 ### shuffle[A: A]

 [[Source]](https://stdlib.ponylang.io/src/random/random/#L201)

 
```
fun ref shuffle[A: A](
  array: Array[A] ref)
: None val

```
 #### Parameters

 * array: [Array](builtin-array)[A] ref

 #### Returns

 * [None](builtin-none) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/random-MT>

ANSITerm
========

 [[Source]](https://stdlib.ponylang.io/src/term/ansi_term/#L45)

 Handles ANSI escape codes from stdin.

 
```
actor tag ANSITerm

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/term/ansi_term/#L59)

 Create a new ANSI term.

 
```
new tag create(
  notify: ANSINotify iso,
  source: DisposableActor tag,
  timers: Timers tag = reference)
: ANSITerm tag^

```
 #### Parameters

 * notify: [ANSINotify](term-ansinotify) iso
* source: [DisposableActor](builtin-disposableactor) tag
* timers: [Timers](time-timers) tag = reference

 #### Returns

 * [ANSITerm](index) tag^

 Public Behaviours
-----------------

 ### apply

 [[Source]](https://stdlib.ponylang.io/src/term/ansi_term/#L77)

 Receives input from stdin.

 
```
be apply(
  data: Array[U8 val] iso)

```
 #### Parameters

 * data: [Array](builtin-array)[[U8](builtin-u8) val] iso

 ### prompt

 [[Source]](https://stdlib.ponylang.io/src/term/ansi_term/#L187)

 Pass a prompt along to the notifier.

 
```
be prompt(
  value: String val)

```
 #### Parameters

 * value: [String](builtin-string) val

 ### size

 [[Source]](https://stdlib.ponylang.io/src/term/ansi_term/#L193)

 
```
be size()

```
 ### dispose

 [[Source]](https://stdlib.ponylang.io/src/term/ansi_term/#L206)

 Stop accepting input, inform the notifier we have closed, and dispose of our source.

 
```
be dispose()

```


 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/term-ANSITerm>

Dice
====

 [[Source]](https://stdlib.ponylang.io/src/random/dice/#L1)

 A simple dice roller.

 
```
class ref Dice

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/random/dice/#L7)

 Initialise with a random number generator.

 
```
new ref create(
  from: Random ref)
: Dice ref^

```
 #### Parameters

 * from: [Random](random-random) ref

 #### Returns

 * [Dice](index) ref^

 Public fields
-------------

 ### var r: [Random](random-random) ref

 [[Source]](https://stdlib.ponylang.io/src/random/dice/#L5)

 Public Functions
----------------

 ### apply

 [[Source]](https://stdlib.ponylang.io/src/random/dice/#L13)

 Return the sum of `count` rolls of a die with the given number of `sides`. The die is numbered from 1 to `sides`. For example, count = 2 and sides = 6 will return a value between 2 and 12.

 
```
fun ref apply(
  count: U64 val,
  sides: U64 val)
: U64 val

```
 #### Parameters

 * count: [U64](builtin-u64) val
* sides: [U64](builtin-u64) val

 #### Returns

 * [U64](builtin-u64) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/random-Dice>

ReadlineNotify
==============

 [[Source]](https://stdlib.ponylang.io/src/term/readline_notify/#L3)

 Notifier for readline.

 
```
interface ref ReadlineNotify

```
 Public Functions
----------------

 ### apply

 [[Source]](https://stdlib.ponylang.io/src/term/readline_notify/#L7)

 Receives finished lines. The next prompt is set by fulfilling the promise. If the promise is rejected, readline will stop handling input.

 
```
fun ref apply(
  line: String val,
  prompt: Promise[String val] tag)
: None val

```
 #### Parameters

 * line: [String](builtin-string) val
* prompt: [Promise](promises-promise)[[String](builtin-string) val] tag

 #### Returns

 * [None](builtin-none) val

 ### tab

 [[Source]](https://stdlib.ponylang.io/src/term/readline_notify/#L14)

 Return tab completion possibilities.

 
```
fun ref tab(
  line: String val)
: Seq[String val] box

```
 #### Parameters

 * line: [String](builtin-string) val

 #### Returns

 * [Seq](builtin-seq)[[String](builtin-string) val] box



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/term-ReadlineNotify>

Readline
========

 [[Source]](https://stdlib.ponylang.io/src/term/readline/#L6)

 Line editing, history, and tab completion.

 
```
class ref Readline is
  ANSINotify ref

```
 #### Implements

 * [ANSINotify](term-ansinotify) ref

 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/term/readline/#L23)

 Create a readline handler to be passed to stdin. It begins blocked. Set an initial prompt on the ANSITerm to begin processing.

 
```
new iso create(
  notify: ReadlineNotify iso,
  out: OutStream tag,
  path: (FilePath val | None val) = reference,
  maxlen: USize val = 0)
: Readline iso^

```
 #### Parameters

 * notify: [ReadlineNotify](term-readlinenotify) iso
* out: [OutStream](builtin-outstream) tag
* path: ([FilePath](files-filepath) val | [None](builtin-none) val) = reference
* maxlen: [USize](builtin-usize) val = 0

 #### Returns

 * [Readline](index) iso^

 Public Functions
----------------

 ### apply

 [[Source]](https://stdlib.ponylang.io/src/term/readline/#L41)

 Receives input.

 
```
fun ref apply(
  term: ANSITerm ref,
  input: U8 val)
: None val

```
 #### Parameters

 * term: [ANSITerm](term-ansiterm) ref
* input: [U8](builtin-u8) val

 #### Returns

 * [None](builtin-none) val

 ### prompt

 [[Source]](https://stdlib.ponylang.io/src/term/readline/#L83)

 Set a new prompt, unblock, and handle the pending queue.

 
```
fun ref prompt(
  term: ANSITerm ref,
  value: String val)
: None val

```
 #### Parameters

 * term: [ANSITerm](term-ansiterm) ref
* value: [String](builtin-string) val

 #### Returns

 * [None](builtin-none) val

 ### closed

 [[Source]](https://stdlib.ponylang.io/src/term/readline/#L99)

 No more input is available.

 
```
fun ref closed()
: None val

```
 #### Returns

 * [None](builtin-none) val

 ### up

 [[Source]](https://stdlib.ponylang.io/src/term/readline/#L105)

 Previous line.

 
```
fun ref up(
  ctrl: Bool val = false,
  alt: Bool val = false,
  shift: Bool val = false)
: None val

```
 #### Parameters

 * ctrl: [Bool](builtin-bool) val = false
* alt: [Bool](builtin-bool) val = false
* shift: [Bool](builtin-bool) val = false

 #### Returns

 * [None](builtin-none) val

 ### down

 [[Source]](https://stdlib.ponylang.io/src/term/readline/#L117)

 Next line.

 
```
fun ref down(
  ctrl: Bool val = false,
  alt: Bool val = false,
  shift: Bool val = false)
: None val

```
 #### Parameters

 * ctrl: [Bool](builtin-bool) val = false
* alt: [Bool](builtin-bool) val = false
* shift: [Bool](builtin-bool) val = false

 #### Returns

 * [None](builtin-none) val

 ### left

 [[Source]](https://stdlib.ponylang.io/src/term/readline/#L133)

 Move left.

 
```
fun ref left(
  ctrl: Bool val = false,
  alt: Bool val = false,
  shift: Bool val = false)
: None val

```
 #### Parameters

 * ctrl: [Bool](builtin-bool) val = false
* alt: [Bool](builtin-bool) val = false
* shift: [Bool](builtin-bool) val = false

 #### Returns

 * [None](builtin-none) val

 ### right

 [[Source]](https://stdlib.ponylang.io/src/term/readline/#L152)

 Move right.

 
```
fun ref right(
  ctrl: Bool val = false,
  alt: Bool val = false,
  shift: Bool val = false)
: None val

```
 #### Parameters

 * ctrl: [Bool](builtin-bool) val = false
* alt: [Bool](builtin-bool) val = false
* shift: [Bool](builtin-bool) val = false

 #### Returns

 * [None](builtin-none) val

 ### home

 [[Source]](https://stdlib.ponylang.io/src/term/readline/#L171)

 Beginning of the line.

 
```
fun ref home(
  ctrl: Bool val = false,
  alt: Bool val = false,
  shift: Bool val = false)
: None val

```
 #### Parameters

 * ctrl: [Bool](builtin-bool) val = false
* alt: [Bool](builtin-bool) val = false
* shift: [Bool](builtin-bool) val = false

 #### Returns

 * [None](builtin-none) val

 ### end\_key

 [[Source]](https://stdlib.ponylang.io/src/term/readline/#L178)

 End of the line.

 
```
fun ref end_key(
  ctrl: Bool val = false,
  alt: Bool val = false,
  shift: Bool val = false)
: None val

```
 #### Parameters

 * ctrl: [Bool](builtin-bool) val = false
* alt: [Bool](builtin-bool) val = false
* shift: [Bool](builtin-bool) val = false

 #### Returns

 * [None](builtin-none) val

 ### delete

 [[Source]](https://stdlib.ponylang.io/src/term/readline/#L211)

 Forward delete.

 
```
fun ref delete(
  ctrl: Bool val = false,
  alt: Bool val = false,
  shift: Bool val = false)
: None val

```
 #### Parameters

 * ctrl: [Bool](builtin-bool) val = false
* alt: [Bool](builtin-bool) val = false
* shift: [Bool](builtin-bool) val = false

 #### Returns

 * [None](builtin-none) val

 ### insert

 
```
fun ref insert(
  ctrl: Bool val,
  alt: Bool val,
  shift: Bool val)
: None val

```
 #### Parameters

 * ctrl: [Bool](builtin-bool) val
* alt: [Bool](builtin-bool) val
* shift: [Bool](builtin-bool) val

 #### Returns

 * [None](builtin-none) val

 ### page\_up

 
```
fun ref page_up(
  ctrl: Bool val,
  alt: Bool val,
  shift: Bool val)
: None val

```
 #### Parameters

 * ctrl: [Bool](builtin-bool) val
* alt: [Bool](builtin-bool) val
* shift: [Bool](builtin-bool) val

 #### Returns

 * [None](builtin-none) val

 ### page\_down

 
```
fun ref page_down(
  ctrl: Bool val,
  alt: Bool val,
  shift: Bool val)
: None val

```
 #### Parameters

 * ctrl: [Bool](builtin-bool) val
* alt: [Bool](builtin-bool) val
* shift: [Bool](builtin-bool) val

 #### Returns

 * [None](builtin-none) val

 ### fn\_key

 
```
fun ref fn_key(
  i: U8 val,
  ctrl: Bool val,
  alt: Bool val,
  shift: Bool val)
: None val

```
 #### Parameters

 * i: [U8](builtin-u8) val
* ctrl: [Bool](builtin-bool) val
* alt: [Bool](builtin-bool) val
* shift: [Bool](builtin-bool) val

 #### Returns

 * [None](builtin-none) val

 ### size

 
```
fun ref size(
  rows: U16 val,
  cols: U16 val)
: None val

```
 #### Parameters

 * rows: [U16](builtin-u16) val
* cols: [U16](builtin-u16) val

 #### Returns

 * [None](builtin-none) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/term-Readline>

ANSINotify
==========

 [[Source]](https://stdlib.ponylang.io/src/term/ansi_notify/#L1)

 Receive input from an ANSITerm.

 
```
interface ref ANSINotify

```
 Public Functions
----------------

 ### apply

 [[Source]](https://stdlib.ponylang.io/src/term/ansi_notify/#L5)

 
```
fun ref apply(
  term: ANSITerm ref,
  input: U8 val)
: None val

```
 #### Parameters

 * term: [ANSITerm](term-ansiterm) ref
* input: [U8](builtin-u8) val

 #### Returns

 * [None](builtin-none) val

 ### up

 [[Source]](https://stdlib.ponylang.io/src/term/ansi_notify/#L8)

 
```
fun ref up(
  ctrl: Bool val,
  alt: Bool val,
  shift: Bool val)
: None val

```
 #### Parameters

 * ctrl: [Bool](builtin-bool) val
* alt: [Bool](builtin-bool) val
* shift: [Bool](builtin-bool) val

 #### Returns

 * [None](builtin-none) val

 ### down

 [[Source]](https://stdlib.ponylang.io/src/term/ansi_notify/#L11)

 
```
fun ref down(
  ctrl: Bool val,
  alt: Bool val,
  shift: Bool val)
: None val

```
 #### Parameters

 * ctrl: [Bool](builtin-bool) val
* alt: [Bool](builtin-bool) val
* shift: [Bool](builtin-bool) val

 #### Returns

 * [None](builtin-none) val

 ### left

 [[Source]](https://stdlib.ponylang.io/src/term/ansi_notify/#L14)

 
```
fun ref left(
  ctrl: Bool val,
  alt: Bool val,
  shift: Bool val)
: None val

```
 #### Parameters

 * ctrl: [Bool](builtin-bool) val
* alt: [Bool](builtin-bool) val
* shift: [Bool](builtin-bool) val

 #### Returns

 * [None](builtin-none) val

 ### right

 [[Source]](https://stdlib.ponylang.io/src/term/ansi_notify/#L17)

 
```
fun ref right(
  ctrl: Bool val,
  alt: Bool val,
  shift: Bool val)
: None val

```
 #### Parameters

 * ctrl: [Bool](builtin-bool) val
* alt: [Bool](builtin-bool) val
* shift: [Bool](builtin-bool) val

 #### Returns

 * [None](builtin-none) val

 ### delete

 [[Source]](https://stdlib.ponylang.io/src/term/ansi_notify/#L20)

 
```
fun ref delete(
  ctrl: Bool val,
  alt: Bool val,
  shift: Bool val)
: None val

```
 #### Parameters

 * ctrl: [Bool](builtin-bool) val
* alt: [Bool](builtin-bool) val
* shift: [Bool](builtin-bool) val

 #### Returns

 * [None](builtin-none) val

 ### insert

 [[Source]](https://stdlib.ponylang.io/src/term/ansi_notify/#L23)

 
```
fun ref insert(
  ctrl: Bool val,
  alt: Bool val,
  shift: Bool val)
: None val

```
 #### Parameters

 * ctrl: [Bool](builtin-bool) val
* alt: [Bool](builtin-bool) val
* shift: [Bool](builtin-bool) val

 #### Returns

 * [None](builtin-none) val

 ### home

 [[Source]](https://stdlib.ponylang.io/src/term/ansi_notify/#L26)

 
```
fun ref home(
  ctrl: Bool val,
  alt: Bool val,
  shift: Bool val)
: None val

```
 #### Parameters

 * ctrl: [Bool](builtin-bool) val
* alt: [Bool](builtin-bool) val
* shift: [Bool](builtin-bool) val

 #### Returns

 * [None](builtin-none) val

 ### end\_key

 [[Source]](https://stdlib.ponylang.io/src/term/ansi_notify/#L29)

 
```
fun ref end_key(
  ctrl: Bool val,
  alt: Bool val,
  shift: Bool val)
: None val

```
 #### Parameters

 * ctrl: [Bool](builtin-bool) val
* alt: [Bool](builtin-bool) val
* shift: [Bool](builtin-bool) val

 #### Returns

 * [None](builtin-none) val

 ### page\_up

 [[Source]](https://stdlib.ponylang.io/src/term/ansi_notify/#L32)

 
```
fun ref page_up(
  ctrl: Bool val,
  alt: Bool val,
  shift: Bool val)
: None val

```
 #### Parameters

 * ctrl: [Bool](builtin-bool) val
* alt: [Bool](builtin-bool) val
* shift: [Bool](builtin-bool) val

 #### Returns

 * [None](builtin-none) val

 ### page\_down

 [[Source]](https://stdlib.ponylang.io/src/term/ansi_notify/#L35)

 
```
fun ref page_down(
  ctrl: Bool val,
  alt: Bool val,
  shift: Bool val)
: None val

```
 #### Parameters

 * ctrl: [Bool](builtin-bool) val
* alt: [Bool](builtin-bool) val
* shift: [Bool](builtin-bool) val

 #### Returns

 * [None](builtin-none) val

 ### fn\_key

 [[Source]](https://stdlib.ponylang.io/src/term/ansi_notify/#L38)

 
```
fun ref fn_key(
  i: U8 val,
  ctrl: Bool val,
  alt: Bool val,
  shift: Bool val)
: None val

```
 #### Parameters

 * i: [U8](builtin-u8) val
* ctrl: [Bool](builtin-bool) val
* alt: [Bool](builtin-bool) val
* shift: [Bool](builtin-bool) val

 #### Returns

 * [None](builtin-none) val

 ### prompt

 [[Source]](https://stdlib.ponylang.io/src/term/ansi_notify/#L41)

 
```
fun ref prompt(
  term: ANSITerm ref,
  value: String val)
: None val

```
 #### Parameters

 * term: [ANSITerm](term-ansiterm) ref
* value: [String](builtin-string) val

 #### Returns

 * [None](builtin-none) val

 ### size

 [[Source]](https://stdlib.ponylang.io/src/term/ansi_notify/#L44)

 
```
fun ref size(
  rows: U16 val,
  cols: U16 val)
: None val

```
 #### Parameters

 * rows: [U16](builtin-u16) val
* cols: [U16](builtin-u16) val

 #### Returns

 * [None](builtin-none) val

 ### closed

 [[Source]](https://stdlib.ponylang.io/src/term/ansi_notify/#L47)

 
```
fun ref closed()
: None val

```
 #### Returns

 * [None](builtin-none) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/term-ANSINotify>

ANSI
====

 [[Source]](https://stdlib.ponylang.io/src/term/ansi/#L1)

 These strings can be embedded in text when writing to a StdStream to create a text-based UI.

 
```
primitive val ANSI

```
 Constructors
------------

 ### create

 [[Source]](https://stdlib.ponylang.io/src/term/ansi/#L1)

 
```
new val create()
: ANSI val^

```
 #### Returns

 * [ANSI](index) val^

 Public Functions
----------------

 ### up

 [[Source]](https://stdlib.ponylang.io/src/term/ansi/#L6)

 Move the cursor up n lines. 0 is the same as 1.

 
```
fun box up(
  n: U32 val = 0)
: String val

```
 #### Parameters

 * n: [U32](builtin-u32) val = 0

 #### Returns

 * [String](builtin-string) val

 ### down

 [[Source]](https://stdlib.ponylang.io/src/term/ansi/#L16)

 Move the cursor down n lines. 0 is the same as 1.

 
```
fun box down(
  n: U32 val = 0)
: String val

```
 #### Parameters

 * n: [U32](builtin-u32) val = 0

 #### Returns

 * [String](builtin-string) val

 ### right

 [[Source]](https://stdlib.ponylang.io/src/term/ansi/#L26)

 Move the cursor right n columns. 0 is the same as 1.

 
```
fun box right(
  n: U32 val = 0)
: String val

```
 #### Parameters

 * n: [U32](builtin-u32) val = 0

 #### Returns

 * [String](builtin-string) val

 ### left

 [[Source]](https://stdlib.ponylang.io/src/term/ansi/#L36)

 Move the cursor left n columns. 0 is the same as 1.

 
```
fun box left(
  n: U32 val = 0)
: String val

```
 #### Parameters

 * n: [U32](builtin-u32) val = 0

 #### Returns

 * [String](builtin-string) val

 ### cursor

 [[Source]](https://stdlib.ponylang.io/src/term/ansi/#L46)

 Move the cursor to line y, column x. 0 is the same as 1. This indexes from the top left corner of the screen.

 
```
fun box cursor(
  x: U32 val = 0,
  y: U32 val = 0)
: String val

```
 #### Parameters

 * x: [U32](builtin-u32) val = 0
* y: [U32](builtin-u32) val = 0

 #### Returns

 * [String](builtin-string) val

 ### clear

 [[Source]](https://stdlib.ponylang.io/src/term/ansi/#L57)

 Clear the screen and move the cursor to the top left corner.

 
```
fun box clear()
: String val

```
 #### Returns

 * [String](builtin-string) val

 ### erase

 [[Source]](https://stdlib.ponylang.io/src/term/ansi/#L63)

 Erases everything to the left of the cursor on the line the cursor is on.

 
```
fun box erase()
: String val

```
 #### Returns

 * [String](builtin-string) val

 ### reset

 [[Source]](https://stdlib.ponylang.io/src/term/ansi/#L69)

 Resets all colours and text styles to the default.

 
```
fun box reset()
: String val

```
 #### Returns

 * [String](builtin-string) val

 ### bold

 [[Source]](https://stdlib.ponylang.io/src/term/ansi/#L75)

 Bold text. Does nothing on Windows.

 
```
fun box bold(
  state: Bool val = true)
: String val

```
 #### Parameters

 * state: [Bool](builtin-bool) val = true

 #### Returns

 * [String](builtin-string) val

 ### underline

 [[Source]](https://stdlib.ponylang.io/src/term/ansi/#L81)

 Underlined text. Does nothing on Windows.

 
```
fun box underline(
  state: Bool val = true)
: String val

```
 #### Parameters

 * state: [Bool](builtin-bool) val = true

 #### Returns

 * [String](builtin-string) val

 ### blink

 [[Source]](https://stdlib.ponylang.io/src/term/ansi/#L87)

 Blinking text. Does nothing on Windows.

 
```
fun box blink(
  state: Bool val = true)
: String val

```
 #### Parameters

 * state: [Bool](builtin-bool) val = true

 #### Returns

 * [String](builtin-string) val

 ### reverse

 [[Source]](https://stdlib.ponylang.io/src/term/ansi/#L93)

 Swap foreground and background colour.

 
```
fun box reverse(
  state: Bool val = true)
: String val

```
 #### Parameters

 * state: [Bool](builtin-bool) val = true

 #### Returns

 * [String](builtin-string) val

 ### black

 [[Source]](https://stdlib.ponylang.io/src/term/ansi/#L99)

 Black text.

 
```
fun box black()
: String val

```
 #### Returns

 * [String](builtin-string) val

 ### red

 [[Source]](https://stdlib.ponylang.io/src/term/ansi/#L105)

 Red text.

 
```
fun box red()
: String val

```
 #### Returns

 * [String](builtin-string) val

 ### green

 [[Source]](https://stdlib.ponylang.io/src/term/ansi/#L111)

 Green text.

 
```
fun box green()
: String val

```
 #### Returns

 * [String](builtin-string) val

 ### yellow

 [[Source]](https://stdlib.ponylang.io/src/term/ansi/#L117)

 Yellow text.

 
```
fun box yellow()
: String val

```
 #### Returns

 * [String](builtin-string) val

 ### blue

 [[Source]](https://stdlib.ponylang.io/src/term/ansi/#L123)

 Blue text.

 
```
fun box blue()
: String val

```
 #### Returns

 * [String](builtin-string) val

 ### magenta

 [[Source]](https://stdlib.ponylang.io/src/term/ansi/#L129)

 Magenta text.

 
```
fun box magenta()
: String val

```
 #### Returns

 * [String](builtin-string) val

 ### cyan

 [[Source]](https://stdlib.ponylang.io/src/term/ansi/#L135)

 Cyan text.

 
```
fun box cyan()
: String val

```
 #### Returns

 * [String](builtin-string) val

 ### grey

 [[Source]](https://stdlib.ponylang.io/src/term/ansi/#L141)

 Grey text.

 
```
fun box grey()
: String val

```
 #### Returns

 * [String](builtin-string) val

 ### white

 [[Source]](https://stdlib.ponylang.io/src/term/ansi/#L147)

 White text.

 
```
fun box white()
: String val

```
 #### Returns

 * [String](builtin-string) val

 ### bright\_red

 [[Source]](https://stdlib.ponylang.io/src/term/ansi/#L153)

 Bright red text.

 
```
fun box bright_red()
: String val

```
 #### Returns

 * [String](builtin-string) val

 ### bright\_green

 [[Source]](https://stdlib.ponylang.io/src/term/ansi/#L159)

 Bright green text.

 
```
fun box bright_green()
: String val

```
 #### Returns

 * [String](builtin-string) val

 ### bright\_yellow

 [[Source]](https://stdlib.ponylang.io/src/term/ansi/#L165)

 Bright yellow text.

 
```
fun box bright_yellow()
: String val

```
 #### Returns

 * [String](builtin-string) val

 ### bright\_blue

 [[Source]](https://stdlib.ponylang.io/src/term/ansi/#L171)

 Bright blue text.

 
```
fun box bright_blue()
: String val

```
 #### Returns

 * [String](builtin-string) val

 ### bright\_magenta

 [[Source]](https://stdlib.ponylang.io/src/term/ansi/#L177)

 Bright magenta text.

 
```
fun box bright_magenta()
: String val

```
 #### Returns

 * [String](builtin-string) val

 ### bright\_cyan

 [[Source]](https://stdlib.ponylang.io/src/term/ansi/#L183)

 Bright cyan text.

 
```
fun box bright_cyan()
: String val

```
 #### Returns

 * [String](builtin-string) val

 ### bright\_grey

 [[Source]](https://stdlib.ponylang.io/src/term/ansi/#L189)

 Bright grey text.

 
```
fun box bright_grey()
: String val

```
 #### Returns

 * [String](builtin-string) val

 ### black\_bg

 [[Source]](https://stdlib.ponylang.io/src/term/ansi/#L195)

 Black background.

 
```
fun box black_bg()
: String val

```
 #### Returns

 * [String](builtin-string) val

 ### red\_bg

 [[Source]](https://stdlib.ponylang.io/src/term/ansi/#L201)

 Red background.

 
```
fun box red_bg()
: String val

```
 #### Returns

 * [String](builtin-string) val

 ### green\_bg

 [[Source]](https://stdlib.ponylang.io/src/term/ansi/#L207)

 Green background.

 
```
fun box green_bg()
: String val

```
 #### Returns

 * [String](builtin-string) val

 ### yellow\_bg

 [[Source]](https://stdlib.ponylang.io/src/term/ansi/#L213)

 Yellow background.

 
```
fun box yellow_bg()
: String val

```
 #### Returns

 * [String](builtin-string) val

 ### blue\_bg

 [[Source]](https://stdlib.ponylang.io/src/term/ansi/#L219)

 Blue background.

 
```
fun box blue_bg()
: String val

```
 #### Returns

 * [String](builtin-string) val

 ### magenta\_bg

 [[Source]](https://stdlib.ponylang.io/src/term/ansi/#L225)

 Magenta background.

 
```
fun box magenta_bg()
: String val

```
 #### Returns

 * [String](builtin-string) val

 ### cyan\_bg

 [[Source]](https://stdlib.ponylang.io/src/term/ansi/#L231)

 Cyan background.

 
```
fun box cyan_bg()
: String val

```
 #### Returns

 * [String](builtin-string) val

 ### grey\_bg

 [[Source]](https://stdlib.ponylang.io/src/term/ansi/#L237)

 Grey background.

 
```
fun box grey_bg()
: String val

```
 #### Returns

 * [String](builtin-string) val

 ### white\_bg

 [[Source]](https://stdlib.ponylang.io/src/term/ansi/#L243)

 White background.

 
```
fun box white_bg()
: String val

```
 #### Returns

 * [String](builtin-string) val

 ### bright\_red\_bg

 [[Source]](https://stdlib.ponylang.io/src/term/ansi/#L249)

 Bright red background.

 
```
fun box bright_red_bg()
: String val

```
 #### Returns

 * [String](builtin-string) val

 ### bright\_green\_bg

 [[Source]](https://stdlib.ponylang.io/src/term/ansi/#L255)

 Bright green background.

 
```
fun box bright_green_bg()
: String val

```
 #### Returns

 * [String](builtin-string) val

 ### bright\_yellow\_bg

 [[Source]](https://stdlib.ponylang.io/src/term/ansi/#L261)

 Bright yellow background.

 
```
fun box bright_yellow_bg()
: String val

```
 #### Returns

 * [String](builtin-string) val

 ### bright\_blue\_bg

 [[Source]](https://stdlib.ponylang.io/src/term/ansi/#L267)

 Bright blue background.

 
```
fun box bright_blue_bg()
: String val

```
 #### Returns

 * [String](builtin-string) val

 ### bright\_magenta\_bg

 [[Source]](https://stdlib.ponylang.io/src/term/ansi/#L273)

 Bright magenta background.

 
```
fun box bright_magenta_bg()
: String val

```
 #### Returns

 * [String](builtin-string) val

 ### bright\_cyan\_bg

 [[Source]](https://stdlib.ponylang.io/src/term/ansi/#L279)

 Bright cyan background.

 
```
fun box bright_cyan_bg()
: String val

```
 #### Returns

 * [String](builtin-string) val

 ### bright\_grey\_bg

 [[Source]](https://stdlib.ponylang.io/src/term/ansi/#L285)

 Bright grey background.

 
```
fun box bright_grey_bg()
: String val

```
 #### Returns

 * [String](builtin-string) val

 ### eq

 [[Source]](https://stdlib.ponylang.io/src/term/ansi/#L6)

 
```
fun box eq(
  that: ANSI val)
: Bool val

```
 #### Parameters

 * that: [ANSI](index) val

 #### Returns

 * [Bool](builtin-bool) val

 ### ne

 [[Source]](https://stdlib.ponylang.io/src/term/ansi/#L6)

 
```
fun box ne(
  that: ANSI val)
: Bool val

```
 #### Parameters

 * that: [ANSI](index) val

 #### Returns

 * [Bool](builtin-bool) val



 © 2016-2020, The Pony Developers  
© 2014-2015, Causality Ltd.  
Licensed under the BSD 2-Clause License.  

<https://stdlib.ponylang.io/term-ANSI>

pony