Skip to content

XRayUDPEmitter_SegmentEncoding

pokryfka edited this page Aug 10, 2020 · 1 revision

XRayUDPEmitter.SegmentEncoding

A type representing the ability to encode a XRayRecorder.Segment to a String with its JSON representation.

public struct SegmentEncoding

Initializers

init(encode:​)

Creates new instance.

public init(encode:@escaping (XRayRecorder.Segment) throws -> ByteBuffer)

Parameters

  • encode:​ - encode:​ How to encode a segment to JSON string.

Properties

`default`

Default encoding of XRayRecorder.Segment to JSON string.

let `default`:​ XRayUDPEmitter.SegmentEncoding

encode

How to encode a segment to JSON string.

let encode:(XRayRecorder.Segment) throws -> ByteBuffer