FastMM documentation
FastMM C++ API 0.14.0
Public headers, tier 1 and tier 2
Loading...
Searching...
No Matches
fastmm::PartyId Struct Reference

#include <fastmm/core/messages.hpp>

Public Member Functions

constexpr bool known () const noexcept
 
std::uint64_t account () const noexcept
 The account id; 0 for another kind.
 
std::span< const std::uint8_t > raw () const noexcept
 
constexpr bool operator== (const PartyId &) const noexcept=default
 

Static Public Member Functions

static PartyId of_account (std::uint64_t id) noexcept
 
static PartyId of_address (std::span< const std::uint8_t > raw) noexcept
 Empty when raw is longer than kMaxBytes.
 

Public Attributes

PartyIdKind kind
 
std::uint8_t len
 bytes used: 8 for an Account, the address's length for an Address
 
std::uint8_t bytes [kMaxBytes]
 

Static Public Attributes

static constexpr std::size_t kMaxBytes = 30
 

Member Function Documentation

◆ known()

constexpr bool fastmm::PartyId::known ( ) const
inlineconstexprnoexcept

◆ account()

std::uint64_t fastmm::PartyId::account ( ) const
inlinenoexcept

The account id; 0 for another kind.

◆ raw()

std::span< const std::uint8_t > fastmm::PartyId::raw ( ) const
inlinenoexcept

◆ of_account()

static PartyId fastmm::PartyId::of_account ( std::uint64_t  id)
inlinestaticnoexcept

◆ of_address()

static PartyId fastmm::PartyId::of_address ( std::span< const std::uint8_t >  raw)
inlinestaticnoexcept

Empty when raw is longer than kMaxBytes.

◆ operator==()

constexpr bool fastmm::PartyId::operator== ( const PartyId &  ) const
constexprdefaultnoexcept

Member Data Documentation

◆ kMaxBytes

constexpr std::size_t fastmm::PartyId::kMaxBytes = 30
staticconstexpr

◆ kind

PartyIdKind fastmm::PartyId::kind

◆ len

std::uint8_t fastmm::PartyId::len

bytes used: 8 for an Account, the address's length for an Address

◆ bytes

std::uint8_t fastmm::PartyId::bytes[kMaxBytes]