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

Request to update an existing account. More...

#include <account_protocol.hpp>

Collaboration diagram for update_account_request:
Collaboration graph

Public Member Functions

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

Static Public Member Functions

static std::expected< update_account_request, comms::messaging::error_code > deserialize (std::span< const std::byte > data)
 Deserialize request from bytes.
 

Public Attributes

boost::uuids::uuid account_id
 
std::string email
 
std::string recorded_by
 
bool is_admin = false
 

Detailed Description

Request to update an existing account.

Only email and is_admin fields can be updated. Username cannot be changed. Requires admin privileges.

Member Function Documentation

◆ serialize()

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

Serialize request to bytes.

Format:

  • 16 bytes: account_id (UUID)
  • 2 bytes: email length
  • N bytes: email (UTF-8)
  • 2 bytes: recorded_by length
  • N bytes: recorded_by (UTF-8)
  • 1 byte: is_admin (boolean)