DVJobPayloadCodec<TPayload> class

Converts a job payload to and from JSON so a durable queue can store it.

name is written to the database and read back after a restart, so it must stay stable across releases even if the Dart class is renamed.

Constructors

DVJobPayloadCodec({required String name, required Map<String, Object?> encode(TPayload payload), required TPayload decode(Map<String, Object?> json)})
const

Properties

decode → TPayload Function(Map<String, Object?> json)
final
encode Map<String, Object?> Function(TPayload payload)
final
hashCode int
The hash code for this object.
no setterinherited
name String
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited