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

Response containing the requested role. More...

#include <authorization_protocol.hpp>

Collaboration diagram for get_role_response:
Collaboration graph

Public Member Functions

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

Static Public Member Functions

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

Public Attributes

bool found = false
 
std::optional< domain::rolerole
 
std::string error_message
 

Detailed Description

Response containing the requested role.

Member Function Documentation

◆ serialize()

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

Serialize response to bytes.

Format:

  • 1 byte: found (boolean)
  • If found:
  • If not found:
    • 2 bytes: error_message length
    • N bytes: error_message (UTF-8)