AvroType
Это содержимое пока не доступно на вашем языке.
Defined in: src/serialization/AvroSerializerOptions.ts:21
The slice of an Avro type object that AvroSerializer uses.
Declared structurally rather than imported from avsc, for the same
reason zodCodec takes a ParserLike instead of importing zod: the
schema library belongs to the user’s project, and actor-ts has no
business pinning a version of it or shipping a lazy import for
something it never calls itself. avsc’s Type satisfies this shape
as-is:
import avsc from 'avsc';const avroType = avsc.Type.forSchema({ name: 'Order', type: 'record', fields: [...] });Any other library whose compiled type exposes toBuffer / fromBuffer
fits too.
Type Parameters
Section titled “Type Parameters”T = unknown
Properties
Section titled “Properties”
readonlyoptionalname?:string
Defined in: src/serialization/AvroSerializerOptions.ts:27
Record name from the schema, used as the default manifest when set.
Methods
Section titled “Methods”fromBuffer()
Section titled “fromBuffer()”fromBuffer(
bytes):T
Defined in: src/serialization/AvroSerializerOptions.ts:25
Decode Avro binary back to a value. Needs a Node Buffer in avsc’s case.
Parameters
Section titled “Parameters”Uint8Array
Returns
Section titled “Returns”T
toBuffer()
Section titled “toBuffer()”toBuffer(
value):Uint8Array
Defined in: src/serialization/AvroSerializerOptions.ts:23
Encode a value to Avro binary. Throws when the value doesn’t match the schema.
Parameters
Section titled “Parameters”T
Returns
Section titled “Returns”Uint8Array
