NativeSerializerMode<T> class
abstract
Operation mode that converters a value to a native representation as defined by the DogNativeCodec of the current DogEngine. For most implementations, this means converting the value to a "primitive" dart type, that could also be encoded using jsonEncode.
Consider using SimpleDogConverter since this base class already implements this operation mode for you.
- Implemented types
Constructors
Properties
- canSerializeNull → bool
-
Returns true if the serializer can handle null values and create
T
instances from them.no setter - deriveFuture → Type
-
no setterinherited
- deriveFutureOr → Type
-
no setterinherited
- deriveIterable → Type
-
no setterinherited
- deriveList → Type
-
no setterinherited
- deriveSet → Type
-
no setterinherited
- deriveStream → Type
-
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- isNullable → bool
-
no setterinherited
- nullable → TypeCapture
-
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- typeArgument → Type
-
no setterinherited
Methods
-
castIterable(
Iterable< T> iterable) → Iterable<T> -
inherited
-
castList(
List list) → List< T> -
inherited
-
castSet(
Set set) → Set< T> -
inherited
-
consumeType<
RETURN> (RETURN func< _>() ) → RETURN -
inherited
-
consumeTypeArg<
RETURN, ARG> (RETURN func< _>(ARG), ARG arg) → RETURN -
inherited
-
deserialize(
dynamic value, DogEngine engine) → T -
Aggressively converts a "primitive" dart type to
T
. -
initialise(
DogEngine engine) → void -
Initialises the operation mode with the given
engine
. This allows for the operation mode to possibly precache some data that would need to be lookup on every invocation otherwise.inherited -
isAssignable(
dynamic object) → bool -
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
serialize(
T value, DogEngine engine) → dynamic -
Aggressively converts
T
to a "primitive" dart type. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
create<
T> ({required dynamic serializer(T value, DogEngine engine), required T deserializer(dynamic value, DogEngine engine), bool canSerializeNull = false}) → NativeSerializerMode< T> -
Creates a new NativeSerializerMode instance using the provided
serializer
anddeserializer
functions without needing to create a new class.