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

Schema for a single input or output port of an action. More...

#include <cpp/a11/actions/schema.h>

Public Member Functions

absl::Status Validate () const
 Validates the port schema.
 

Public Attributes

std::string name
 Port name (unique within its direction).
 
std::string type
 Payload type name.
 
std::string description
 Human-readable description.
 
bool required = false
 Whether the port must be supplied.
 
bool unary = false
 Whether the port carries a single value.
 
std::vector< std::optional< data::NodeFragment > > autofills
 Input-default fragments; an autofilled input must otherwise be empty.
 
std::shared_ptr< voidtypeinfo
 Opaque, owning language-binding type handle (e.g.
 

Friends

bool operator== (const ActionPortSchema &, const ActionPortSchema &)=default
 

Detailed Description

Schema for a single input or output port of an action.

Describes the port's name and payload type, whether it is required and unary (a single value rather than a stream), an optional description, and input autofills. Before applying autofills the runtime requires that input to be writable and empty; existing data causes the action to fail rather than overriding a receiver-owned default.

Member Function Documentation

◆ Validate()

absl::Status a11::actions::ActionPortSchema::Validate ( ) const

Validates the port schema.

Friends And Related Symbol Documentation

◆ operator==

Member Data Documentation

◆ autofills

std::vector<std::optional<data::NodeFragment> > a11::actions::ActionPortSchema::autofills

Input-default fragments; an autofilled input must otherwise be empty.

◆ description

std::string a11::actions::ActionPortSchema::description

Human-readable description.

◆ name

std::string a11::actions::ActionPortSchema::name

Port name (unique within its direction).

◆ required

bool a11::actions::ActionPortSchema::required = false

Whether the port must be supplied.

◆ type

std::string a11::actions::ActionPortSchema::type

Payload type name.

◆ typeinfo

std::shared_ptr<void> a11::actions::ActionPortSchema::typeinfo

Opaque, owning language-binding type handle (e.g.

a Python type object). The a11::actions layer stays language-agnostic: it only holds the handle and never dereferences it. Ownership is real – the binding that populates it installs a custom deleter (which reacquires its runtime's lock as needed), so the referent is kept alive for exactly as long as any copy of this schema, instead of being a borrowed pointer that can dangle once the caller drops its own reference. Empty when the port has no bound type.

◆ unary

bool a11::actions::ActionPortSchema::unary = false

Whether the port carries a single value.


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