Dumps a message field to the object. Field is defined by the message field specification.

    :param obj:
    :param msg:
    :param field:
    :param field_archiver:
    :return:

async def dump_message_field(obj, msg, field, field_archiver=None):
    """
    Dumps a message field to the object. Field is defined by the message field specification.

    :param obj:
    :param msg:
    :param field:
    :param field_archiver:
    :return:
    """
    fname, ftype, params = field[0], field[1], field[2:]
    fvalue = getattr(msg, fname, None)
    field_archiver = field_archiver if field_archiver else dump_field
    return await field_archiver(eref(obj, fname, True), fvalue, ftype, params)