effect-io-ai

Package: effect
Module: Schema

Schema.toEncoderXml

Derives an XML encoder from a codec.

Details

The returned function encodes a value through toCodecStringTree and returns an Effect that succeeds with the XML string or fails with SchemaError if codec encoding fails.

Signature

declare const toEncoderXml: <T, RE>(codec: ConstraintCodec<T, unknown, unknown, RE>, options?: XmlEncoderOptions) => (t: T) => Effect.Effect<string, SchemaError, RE>

Source

Since v4.0.0