Serializer

@JSImport("v8", "Serializer") @native @JSType class Serializer() extends StObject
trait StObject
class Object
trait Any
class Object
trait Matchable
class Any

Value members

Concrete methods

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.

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().

def writeDouble(value: Double): Unit

Write a JS number value.

Write a JS number value.

def writeHeader(): Unit

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

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

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.

def writeUint32(value: Double): Unit

Write a raw 32-bit unsigned integer.

Write a raw 32-bit unsigned integer.

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.

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 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
def toLocaleString(): String
Inherited from
Object
def valueOf(): Any
Inherited from
Object