direct<Owner extends Object, Value extends Object> static method
MixProtocolFieldCodec<Owner, Value>
direct<Owner extends Object, Value extends Object>({
- required String wire,
- required MixProtocolValueCodec<
Value> codec, - required Value? read(
- Owner value
- String? inventoryName,
Creates a field read directly from its owner.
Implementation
static MixProtocolFieldCodec<Owner, Value>
direct<Owner extends Object, Value extends Object>({
required String wire,
required MixProtocolValueCodec<Value> codec,
required Value? Function(Owner value) read,
String? inventoryName,
}) {
return MixProtocolFieldCodec._(
directField<Owner, Value>(
wire,
codec._schema,
read,
inventoryName: inventoryName,
schemaSemantics: codec._fieldSemantics,
),
);
}