Spec-Zone.ru › Pony

Serialised

[Source]

This represents serialised data. How it can be used depends on the other capabilities a caller holds.

class val Serialised

Constructors

create

[Source]

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 val
  • data: Any box

Returns

  • Serialised ref^ ?

input

[Source]

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 val
  • data: Array[U8 val] val

Returns

  • Serialised ref^

Public Functions

apply

[Source]

A caller with DeserialiseAuth can create an object graph from serialised data.

fun box apply(
  auth: DeserialiseAuth val)
: Any iso^ ?

Parameters

  • auth: DeserialiseAuth val

Returns

  • Any iso^ ?

output

[Source]

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 val

Returns

  • Array[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

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API