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

Response containing signup result. More...

#include <signup_protocol.hpp>

Collaboration diagram for signup_response:
Collaboration graph

Public Member Functions

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

Static Public Member Functions

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

Public Attributes

bool success = false
 
std::string error_message
 
boost::uuids::uuid account_id
 
std::string username
 

Detailed Description

Response containing signup result.

On success, contains the newly created account's ID and username. On failure, contains an error message describing why signup failed.

Member Function Documentation

◆ serialize()

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

Serialize response to bytes.

Format:

  • 1 byte: success (boolean)
  • 2 bytes: error_message length
  • N bytes: error_message (UTF-8)
  • 16 bytes: account_id (UUID)
  • 2 bytes: username length
  • N bytes: username (UTF-8)