Lyricdev
GitHub

class ValueEncoder

pub class ValueEncoder :: [Encoder]

Conforms to Encoder.

An encoder that builds a Value: Value.encoder(), then v.encode(&e), then e.value().

Methods

pub fn value(): Value

Returns the value built, once one value was encoded; Null before.

pub mut fn encodeNull(): void throws EncodeError
pub mut fn encodeBool(v: bool): void throws EncodeError
pub mut fn encodeInt(v: int): void throws EncodeError
pub mut fn encodeUint(v: uint): void throws EncodeError
pub mut fn encodeFloat(v: float): void throws EncodeError
pub mut fn encodeString(v: string): void throws EncodeError
pub mut fn encodeBytes(v: Slice<uint8>): void throws EncodeError
pub mut fn beginSeq(count: int): void throws EncodeError
pub mut fn endSeq(): void throws EncodeError
pub mut fn beginMap(count: int): void throws EncodeError
pub mut fn beginKey(): void throws EncodeError
pub mut fn endMap(): void throws EncodeError
pub mut fn beginStruct(name: string, count: int): void throws EncodeError
pub mut fn beginField(name: string): void throws EncodeError
pub mut fn endStruct(): void throws EncodeError
pub mut fn beginVariant(
    enumName: string,
    variant: string,
    index: int,
    hasPayload: bool
): void throws EncodeError
pub mut fn endVariant(): void throws EncodeError
pub fn path(): string