Peer pick failed (timeout / connect / RPC) — not the same as ready: false.
models
Source src/FleetHealth.ts:701 lines
export class class Unreachableclass Unreachable {
_tag: 'Unreachable';
}
Peer pick failed (timeout / connect / RPC) — not the same as ready: false.
Unreachable extends import SchemaSchema.const TaggedClass: {
<Self = never, Brand = {}>(
identifier?: string
): {
<
Tag extends string,
Fields extends Struct.Fields
>(
tag: Tag,
fields: Fields,
annotations?: Annotations.Declaration<
Self,
readonly [TaggedStruct<Tag, Fields>]
>
): [Self] extends [never]
? MissingSelfGeneric<"Schema.TaggedClass">
: Class<
Self,
TaggedStruct<Tag, Fields>,
Brand
>
<
Tag extends string,
S extends Struct<Struct.Fields>
>(
tag: Tag,
schema: S,
annotations?: Annotations.Declaration<
Self,
readonly [
Struct<
Simplify<
{
readonly _tag: tag<Tag>
} & S["fields"]
>
>
]
>
): [Self] extends [never]
? MissingSelfGeneric<"Schema.TaggedClass">
: Class<
Self,
Struct<
Simplify<
{
readonly _tag: tag<Tag>
} & S["fields"]
>
>,
Brand
>
}
}
Defines a schema-backed class with an automatically populated _tag field.
When to use
Use to define class instances that are validated by a schema and participate
in tagged union matching.
Details
The optional identifier parameter overrides the schema identifier;
it defaults to the tag value.
Example (Defining a tagged class)
import { Schema } from "effect"
class Circle extends Schema.TaggedClass<Circle>()("Circle", {
radius: Schema.Number
}) {}
const c = new Circle({ radius: 5 })
console.log(c._tag) // "Circle"
console.log(c.radius) // 5
TaggedClass<class Unreachableclass Unreachable {
_tag: 'Unreachable';
}
Peer pick failed (timeout / connect / RPC) — not the same as ready: false.
Unreachable>()("Unreachable", {}) {}
Referenced by 1 symbols