Skip to content
Snippets Groups Projects
  • Georgy Moshkin's avatar
    a0cd0c89
    refactor(storage): type-safe access to single fields of peer · a0cd0c89
    Georgy Moshkin authored
    Every field of Peer now has a corresponding unit struct defined in the
    `peer_field` module, which implements the `PeerFieldDef` trait which in
    turn contains information about the field's name, tarantool type and
    rust type.
    
    This information currently is used in the `field_by_raft_id` method
    and is generated by the `define_peer_fields` macro, which also
    automates the generation of the format (`peer_format` function) for the
    "raft_group" space.
    a0cd0c89
    History
    refactor(storage): type-safe access to single fields of peer
    Georgy Moshkin authored
    Every field of Peer now has a corresponding unit struct defined in the
    `peer_field` module, which implements the `PeerFieldDef` trait which in
    turn contains information about the field's name, tarantool type and
    rust type.
    
    This information currently is used in the `field_by_raft_id` method
    and is generated by the `define_peer_fields` macro, which also
    automates the generation of the format (`peer_format` function) for the
    "raft_group" space.