std.zon.Serializer
The entries of std.zon.Serializer in the Zig reference. This page has 41 cards.
pub fn beginStruct(self: *Serializer, options: ContainerOptions) Error!Struct
Create a `Struct` for writing ZON structs field by field.
- Kind
- function
- Module
std.zon.Serializer
pub fn beginTuple(self: *Serializer, options: ContainerOptions) Error!Tuple
Creates a `Tuple` for writing ZON tuples field by field.
- Kind
- function
- Module
std.zon.Serializer
pub fn codePoint(self: *Serializer, val: u21, options: CodePointOptions) CodePointError!void
Serialize `val` as a Unicode codepoint.
- Kind
- function
- Module
std.zon.Serializer
- Kind
- type
- Module
std.zon.Serializer
Options for formatting code points.
- Kind
- struct
- Module
std.zon.Serializer
Options for manual serialization of container types.
- Kind
- struct
- Module
std.zon.Serializer
- Kind
- type
- Module
std.zon.Serializer
Determines when to emit Unicode code point literals as opposed to integer literals.
- Kind
- enum
- Module
std.zon.Serializer
- Kind
- type
- Module
std.zon.Serializer
pub fn float(self: *Serializer, val: anytype) Error!void
Serialize a float.
- Kind
- function
- Module
std.zon.Serializer
pub fn ident(self: *Serializer, name: []const u8) Error!void
Serialize `name` as an identifier prefixed with `.`.
- Kind
- function
- Module
std.zon.Serializer
pub fn int(self: *Serializer, val: anytype) Error!void
Serialize an integer.
- Kind
- function
- Module
std.zon.Serializer
pub fn multilineString(self: *Serializer, val: []const u8, options: MultilineStringOptions) MultilineStringError!void
Like `value`, but always serializes to a multiline string literal.
- Kind
- function
- Module
std.zon.Serializer
- Kind
- type
- Module
std.zon.Serializer
Options for formatting multiline strings.
- Kind
- struct
- Module
std.zon.Serializer
- Kind
- struct
- Module
std.zon.Serializer
pub fn string(self: *Serializer, val: []const u8, options: StringOptions) Writer.Error!void
Like `value`, but always serializes `val` as a string.
- Kind
- function
- Module
std.zon.Serializer
- Kind
- struct
- Module
std.zon.Serializer
Writes ZON structs field by field.
- Kind
- struct
- Module
std.zon.Serializer
pub fn beginStructField(self: *Struct, name: []const u8, options: ContainerOptions) Error!Struct
Starts a field with a struct as a value.
- Kind
- function
- Module
std.zon.Serializer
pub fn beginTupleField(self: *Struct, name: []const u8, options: ContainerOptions) Error!Tuple
Starts a field with a tuple as a value.
- Kind
- function
- Module
std.zon.Serializer
pub fn end(self: *Struct) Error!void
Finishes serializing the struct.
- Kind
- function
- Module
std.zon.Serializer
pub fn field(self: *Struct, name: []const u8, val: anytype, options: ValueOptions) Error!void
Serialize a field.
- Kind
- function
- Module
std.zon.Serializer
pub fn fieldArbitraryDepth(self: *Struct, name: []const u8, val: anytype, options: ValueOptions) Error!void
Serialize a field.
- Kind
- function
- Module
std.zon.Serializer
pub fn fieldMaxDepth(self: *Struct, name: []const u8, val: anytype, options: ValueOptions, depth: usize) DepthError!void
Serialize a field.
- Kind
- function
- Module
std.zon.Serializer
pub fn fieldPrefix(self: *Struct, name: []const u8) Error!void
Print a field prefix.
- Kind
- function
- Module
std.zon.Serializer
Writes ZON tuples field by field.
- Kind
- struct
- Module
std.zon.Serializer
pub fn tuple(self: *Serializer, val: anytype, options: ValueOptions) Error!void
Like `value`, but always serializes `val` as a tuple.
- Kind
- function
- Module
std.zon.Serializer
pub fn beginStructField(self: *Tuple, options: ContainerOptions) Error!Struct
Starts a field with a struct as a value.
- Kind
- function
- Module
std.zon.Serializer
pub fn beginTupleField(self: *Tuple, options: ContainerOptions) Error!Tuple
Starts a field with a tuple as a value.
- Kind
- function
- Module
std.zon.Serializer
pub fn end(self: *Tuple) Error!void
Finishes serializing the tuple.
- Kind
- function
- Module
std.zon.Serializer
pub fn field(self: *Tuple, val: anytype, options: ValueOptions) Error!void
Serialize a field.
- Kind
- function
- Module
std.zon.Serializer
pub fn fieldArbitraryDepth(self: *Tuple, val: anytype, options: ValueOptions) Error!void
Serialize a field.
- Kind
- function
- Module
std.zon.Serializer
pub fn fieldMaxDepth(self: *Tuple, val: anytype, options: ValueOptions, depth: usize) DepthError!void
Serialize a field.
- Kind
- function
- Module
std.zon.Serializer
pub fn fieldPrefix(self: *Tuple) Error!void
Print a field prefix.
- Kind
- function
- Module
std.zon.Serializer
pub fn tupleArbitraryDepth(self: *Serializer, val: anytype, options: ValueOptions) Error!void
Like `tuple`, but recursive types are allowed.
- Kind
- function
- Module
std.zon.Serializer
pub fn tupleMaxDepth(self: *Serializer, val: anytype, options: ValueOptions, depth: usize) DepthError!void
Like `tuple`, but recursive types are allowed.
- Kind
- function
- Module
std.zon.Serializer
pub fn value(self: *Serializer, val: anytype, options: ValueOptions) Error!void
Serialize a value, similar to `serialize`.
- Kind
- function
- Module
std.zon.Serializer
pub fn valueArbitraryDepth(self: *Serializer, val: anytype, options: ValueOptions) Error!void
Serialize a value, similar to `serializeArbitraryDepth`.
- Kind
- function
- Module
std.zon.Serializer
pub fn valueMaxDepth(self: *Serializer, val: anytype, options: ValueOptions, depth: usize) DepthError!void
Serialize a value, similar to `serializeMaxDepth`.
- Kind
- function
- Module
std.zon.Serializer
Options for serialization of an individual value.
- Kind
- struct
- Module
std.zon.Serializer