fn pack_delegation_type<W: Write>(
    delegation_type: &DelegationType,
    codec: &mut Codec<W>
) -> Result<(), WriteError>