DefaultSerializer

@JSImport("v8", "DefaultSerializer") @native @JSType class DefaultSerializer() extends Serializer

A subclass of Serializer that serializes TypedArray (in particular Buffer) and DataView objects as host objects, and only stores the part of their underlying ArrayBuffers that they are referring to.

trait StObject
class Object
trait Any
class Object
trait Matchable
class Any

Value members

Inherited methods

def hasOwnProperty(v: String): Boolean
Inherited from
Object
def isPrototypeOf(v: Object): Boolean
Inherited from
Object
def propertyIsEnumerable(v: String): Boolean
Inherited from
Object

Returns the stored internal buffer. This serializer should not be used once the buffer is released. Calling this method results in undefined behavior if a previous write has failed.

Returns the stored internal buffer. This serializer should not be used once the buffer is released. Calling this method results in undefined behavior if a previous write has failed.

Inherited from
Serializer
def toLocaleString(): String
Inherited from
Object
def transferArrayBuffer(id: Double, arrayBuffer: ArrayBuffer): Unit

Marks an ArrayBuffer as having its contents transferred out of band.
Pass the corresponding ArrayBuffer in the deserializing context to deserializer.transferArrayBuffer().

Marks an ArrayBuffer as having its contents transferred out of band.
Pass the corresponding ArrayBuffer in the deserializing context to deserializer.transferArrayBuffer().

Inherited from
Serializer
def valueOf(): Any
Inherited from
Object
def writeDouble(value: Double): Unit

Write a JS number value.

Write a JS number value.

Inherited from
Serializer
def writeHeader(): Unit

Writes out a header, which includes the serialization format version.

Writes out a header, which includes the serialization format version.

Inherited from
Serializer
def writeRawBytes(buffer: TypedArray): Unit

Write raw bytes into the serializer’s internal buffer. The deserializer will require a way to compute the length of the buffer.

Write raw bytes into the serializer’s internal buffer. The deserializer will require a way to compute the length of the buffer.

Inherited from
Serializer
def writeUint32(value: Double): Unit

Write a raw 32-bit unsigned integer.

Write a raw 32-bit unsigned integer.

Inherited from
Serializer
def writeUint64(hi: Double, lo: Double): Unit

Write a raw 64-bit unsigned integer, split into high and low 32-bit parts.

Write a raw 64-bit unsigned integer, split into high and low 32-bit parts.

Inherited from
Serializer
def writeValue(`val`: Any): Boolean

Serializes a JavaScript value and adds the serialized representation to the internal buffer. This throws an error if value cannot be serialized.

Serializes a JavaScript value and adds the serialized representation to the internal buffer. This throws an error if value cannot be serialized.

Inherited from
Serializer