ORE Studio 0.0.4
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
delete_country_request Struct Referencefinal

Request to delete one or more countries. More...

#include <country_protocol.hpp>

Collaboration diagram for delete_country_request:
Collaboration graph

Public Member Functions

std::vector< std::byte > serialize () const
 Serialize request to bytes.
 

Static Public Member Functions

static std::expected< delete_country_request, ores::utility::serialization::error_code > deserialize (std::span< const std::byte > data)
 Deserialize request from bytes.
 

Public Attributes

std::vector< std::string > alpha2_codes
 

Detailed Description

Request to delete one or more countries.

Supports batch deletion by accepting a vector of alpha-2 codes. Each country is processed independently - partial success is possible.

Member Function Documentation

◆ serialize()

std::vector< std::byte > serialize ( ) const

Serialize request to bytes.

Format:

  • 4 bytes: count (number of alpha-2 codes)
  • For each alpha-2 code:
    • 2 bytes: length
    • N bytes: alpha2_code (UTF-8)