Serializer<T>: {
description: string;
serialize: ((value: T) => Buffer);
deserialize: ((buffer: Buffer, offset?: number) => [T, number]);
}
Type declaration
-
description: string
-
serialize: ((value: T) => Buffer)
-
- (value: T): Buffer
-
Returns Buffer
-
deserialize: ((buffer: Buffer, offset?: number) => [T, number])
-
- (buffer: Buffer, offset?: number): [T, number]
-
Parameters
-
buffer: Buffer
-
Optional
offset: number
Returns [T, number]