direct<Owner extends Object, Value extends Object> static method

MixProtocolFieldCodec<Owner, Value> direct<Owner extends Object, Value extends Object>({
  1. required String wire,
  2. required MixProtocolValueCodec<Value> codec,
  3. required Value? read(
    1. Owner value
    ),
  4. 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,
    ),
  );
}