A11 (C++ runtime)
Native C++ implementation of the A11 action and streaming runtime
Loading...
Searching...
No Matches
a11::data::Port Struct Reference

Binds an action's port name to the concrete node id serving it. More...

#include <cpp/a11/data/types.h>

Public Member Functions

size_t ApproxBytes () const
 Estimate memory/wire weight for session and transport limits.
 
std::string DebugString () const
 Return a concise representation suitable for logs and diagnostics.
 
absl::Status Validate () const
 Validate the port name and node id used to bind an action.
 
absl::StatusOr< BytesToMsgpack () const
 Encodes this port as MessagePack bytes.
 

Static Public Member Functions

static absl::StatusOr< PortFromMsgpack (std::string_view bytes)
 Decodes MessagePack bytes into a Port.
 

Public Attributes

std::string name
 Schema-defined port name.
 
std::string id
 Id of the node backing this port.
 

Friends

bool operator== (const Port &, const Port &)=default
 
template<typename Sink >
void AbslStringify (Sink &sink, const Port &value)
 

Detailed Description

Binds an action's port name to the concrete node id serving it.

Ports appear in a a11::data::ActionMessage to tell the peer which node backs each of the action's named inputs and outputs.

Member Function Documentation

◆ ApproxBytes()

size_t a11::data::Port::ApproxBytes ( ) const

Estimate memory/wire weight for session and transport limits.

◆ DebugString()

std::string a11::data::Port::DebugString ( ) const

Return a concise representation suitable for logs and diagnostics.

◆ FromMsgpack()

absl::StatusOr< Port > a11::data::Port::FromMsgpack ( std::string_view  bytes)
static

Decodes MessagePack bytes into a Port.

◆ ToMsgpack()

absl::StatusOr< Bytes > a11::data::Port::ToMsgpack ( ) const

Encodes this port as MessagePack bytes.

◆ Validate()

absl::Status a11::data::Port::Validate ( ) const

Validate the port name and node id used to bind an action.

Friends And Related Symbol Documentation

◆ AbslStringify

template<typename Sink >
void AbslStringify ( Sink sink,
const Port value 
)
friend

◆ operator==

bool operator== ( const Port ,
const Port  
)
friend

Member Data Documentation

◆ id

std::string a11::data::Port::id

Id of the node backing this port.

◆ name

std::string a11::data::Port::name

Schema-defined port name.


The documentation for this struct was generated from the following files: