Schema.Union<
readonly [
typeof QueueMissingItemSchemaError,
typeof QueueItemEncodingError
]
>The releaseEncoded failure channel — the wire-encodable union of the engine's encode
errors (now Schema.TaggedErrorClass, so they are both yieldable and RPC-encodable).
export const const queueReleaseEncodingError: Schema.Union<
readonly [
typeof QueueMissingItemSchemaError,
typeof QueueItemEncodingError
]
>
const queueReleaseEncodingError: {
Type: { [K in keyof Members]: Members[K]["Type"]; }[number];
Encoded: { [K in keyof Members]: Members[K]["Encoded"]; }[number];
DecodingServices: { [K in keyof Members]: Members[K]["DecodingServices"]; }[number];
EncodingServices: { [K in keyof Members]: Members[K]["EncodingServices"]; }[number];
Iso: { [K in keyof Members]: Members[K]["Iso"]; }[number];
members: Members;
mapMembers: (f: (members: readonly [typeof QueueMissingItemSchemaError, typeof QueueItemEncodingError]) => To, options?: { readonly unsafePreserveChecks?: boolean | undefined } | undefined) => Schema.Union<{ [K in keyof Readonly<To>]: Readonly<To>[K];…;
Rebuild: Rebuild;
ast: Ast;
annotate: (annotations: Schema.Annotations.Bottom<QueueMissingItemSchemaError | QueueItemEncodingError, readonly []>) => Schema.Union<readonly [typeof QueueMissingItemSchemaError, typeof QueueItemEncodingError]>;
annotateKey: (annotations: Schema.Annotations.Key<QueueMissingItemSchemaError | QueueItemEncodingError>) => Schema.Union<readonly [typeof QueueMissingItemSchemaError, typeof QueueItemEncodingError]>;
check: (checks_0: Check<QueueMissingItemSchemaError | QueueItemEncodingError>, ...checks: Array<Check<QueueMissingItemSchemaError | QueueItemEncodingError>>) => Schema.Union<readonly [typeof QueueMissingItemSchemaError, typeof QueueItemEncodingEr…;
rebuild: (ast: Union<Declaration>) => Schema.Union<readonly [typeof QueueMissingItemSchemaError, typeof QueueItemEncodingError]>;
make: (input: QueueMissingItemSchemaError | QueueItemEncodingError, options?: MakeOptions) => QueueMissingItemSchemaError | QueueItemEncodingError;
makeOption: (input: QueueMissingItemSchemaError | QueueItemEncodingError, options?: MakeOptions) => Option_.Option<QueueMissingItemSchemaError | QueueItemEncodingError>;
makeEffect: (input: QueueMissingItemSchemaError | QueueItemEncodingError, options?: MakeOptions) => Effect.Effect<QueueMissingItemSchemaError | QueueItemEncodingError, SchemaError, never>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
The releaseEncoded failure channel — the wire-encodable union of the engine's encode
errors (now Schema.TaggedErrorClass, so they are both yieldable and RPC-encodable).
queueReleaseEncodingError = import SchemaSchema.function Union<
Members extends ReadonlyArray<Constraint>
>(
members: Members,
options?: { mode?: "anyOf" | "oneOf" }
): Union<Members>
Creates a union schema from an array of member schemas. Members are tested in
order; the first match is returned.
Details
Optionally, specify mode:
"anyOf" (default) — matches if any member matches.
"oneOf" — matches if exactly one member matches.
Example (Defining a string or number union)
import { Schema } from "effect"
const schema = Schema.Union([Schema.String, Schema.Number])
Schema.decodeUnknownSync(schema)("hello") // "hello"
Schema.decodeUnknownSync(schema)(42) // 42
Union([
class QueueMissingItemSchemaErrorclass QueueMissingItemSchemaError {
Type: Self;
Encoded: S["Encoded"];
DecodingServices: S["DecodingServices"];
EncodingServices: S["EncodingServices"];
Iso: S["Iso"];
identifier: string;
fields: S["fields"];
mapFields: (f: (fields: { readonly _tag: Schema.tag<'QueueMissingItemSchemaError'>; readonly queue: Schema.String }) => To, options?: { readonly unsafePreserveChecks?: boolean | undefined } | undefined) => Schema.Struct<{ [K in keyof Readonly<To>]: R…;
extend: (identifier: string) => { (fields: NewFields, annotations?: Schema.Annotations.Declaration<Extended, readonly [Schema.Struct<{ [K in keyof { [K in keyof (('queue' | '_tag') & keyof NewFields extends never ? { readonly _tag: Schema.tag<'Que…;
Rebuild: Rebuild;
ast: Ast;
annotate: (annotations: Schema.Annotations.Bottom<QueueMissingItemSchemaError, readonly [Schema.TaggedStruct<'QueueMissingItemSchemaError', { readonly queue: Schema.String }>]>) => Schema.decodeTo<Schema.declareConstructor<QueueMissingItemSchemaErro…;
annotateKey: (annotations: Schema.Annotations.Key<QueueMissingItemSchemaError>) => Schema.decodeTo<Schema.declareConstructor<QueueMissingItemSchemaError, Schema.Struct.ReadonlySide<{ readonly _tag: Schema.tag<'QueueMissingItemSchemaError'>; readonly qu…;
check: (checks_0: Check<QueueMissingItemSchemaError>, ...checks: Array<Check<QueueMissingItemSchemaError>>) => Schema.decodeTo<Schema.declareConstructor<QueueMissingItemSchemaError, Schema.Struct.ReadonlySide<{ readonly _tag: Schema.tag<'QueueMis…;
rebuild: (ast: Declaration) => Schema.decodeTo<Schema.declareConstructor<QueueMissingItemSchemaError, Schema.Struct.ReadonlySide<{ readonly _tag: Schema.tag<'QueueMissingItemSchemaError'>; readonly queue: Schema.String }, 'Encoded'>, readonly [Sche…;
make: (input: { readonly queue: string; readonly _tag?: 'QueueMissingItemSchemaError' | undefined }, options?: MakeOptions) => QueueMissingItemSchemaError;
makeOption: (input: { readonly queue: string; readonly _tag?: 'QueueMissingItemSchemaError' | undefined }, options?: MakeOptions) => Option_.Option<QueueMissingItemSchemaError>;
makeEffect: (input: { readonly queue: string; readonly _tag?: 'QueueMissingItemSchemaError' | undefined }, options?: MakeOptions) => Effect.Effect<QueueMissingItemSchemaError, SchemaError, never>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
Encoded release was requested for a queue without itemSchema.
Schema.TaggedErrorClass so it is both a yieldable/throwable error and wire-encodable —
part of the releaseEncoded RPC error channel.
QueueMissingItemSchemaError,
class QueueItemEncodingErrorclass QueueItemEncodingError {
Type: Self;
Encoded: S["Encoded"];
DecodingServices: S["DecodingServices"];
EncodingServices: S["EncodingServices"];
Iso: S["Iso"];
identifier: string;
fields: S["fields"];
mapFields: (f: (fields: { readonly _tag: Schema.tag<'QueueItemEncodingError'>; readonly queue: Schema.String; readonly entryId: Schema.String; readonly message: Schema.String; readonly codecId: Schema.optionalKey<Schema.String> }) => To, options?: { …;
extend: (identifier: string) => { (fields: NewFields, annotations?: Schema.Annotations.Declaration<Extended, readonly [Schema.Struct<{ [K in keyof { [K in keyof (('queue' | '_tag' | 'codecId' | 'entryId' | 'message') & keyof NewFields extends neve…;
Rebuild: Rebuild;
ast: Ast;
annotate: (annotations: Schema.Annotations.Bottom<QueueItemEncodingError, readonly [Schema.TaggedStruct<'QueueItemEncodingError', { readonly queue: Schema.String; readonly entryId: Schema.String; readonly message: Schema.String; readonly codecId: Sc…;
annotateKey: (annotations: Schema.Annotations.Key<QueueItemEncodingError>) => Schema.decodeTo<Schema.declareConstructor<QueueItemEncodingError, { readonly queue: string; readonly _tag: 'QueueItemEncodingError'; readonly entryId: string; readonly messag…;
check: (checks_0: Check<QueueItemEncodingError>, ...checks: Array<Check<QueueItemEncodingError>>) => Schema.decodeTo<Schema.declareConstructor<QueueItemEncodingError, { readonly queue: string; readonly _tag: 'QueueItemEncodingError'; readonly ent…;
rebuild: (ast: Declaration) => Schema.decodeTo<Schema.declareConstructor<QueueItemEncodingError, { readonly queue: string; readonly _tag: 'QueueItemEncodingError'; readonly entryId: string; readonly message: string; readonly codecId?: string | unde…;
make: (input: { readonly queue: string; readonly entryId: string; readonly message: string; readonly _tag?: 'QueueItemEncodingError' | undefined; readonly codecId?: string | undefined }, options?: MakeOptions) => QueueItemEncodingError;
makeOption: (input: { readonly queue: string; readonly entryId: string; readonly message: string; readonly _tag?: 'QueueItemEncodingError' | undefined; readonly codecId?: string | undefined }, options?: MakeOptions) => Option_.Option<QueueItemEncoding…;
makeEffect: (input: { readonly queue: string; readonly entryId: string; readonly message: string; readonly _tag?: 'QueueItemEncodingError' | undefined; readonly codecId?: string | undefined }, options?: MakeOptions) => Effect.Effect<QueueItemEncodingE…;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
A queue item failed schema encoding while preparing a wire handoff release.
Schema.TaggedErrorClass so it is both a yieldable/throwable error and wire-encodable —
part of the releaseEncoded RPC error channel.
QueueItemEncodingError,
]);