pub struct A2aFeatureProfile { /* private fields */ }Expand description
The per-revision capability bitset for an A2A peer.
The matrix is small (one row per known version, one column
per Feature::ALL); the type holds it as a fixed-size
[bool; N_FEATURES] so the matrix lives in the type
system rather than in a HashMap that the feature set could
silently diverge from.
Implementations§
Source§impl A2aFeatureProfile
impl A2aFeatureProfile
Sourcepub const fn for_known_version(version: A2aVersion) -> Self
pub const fn for_known_version(version: A2aVersion) -> Self
Build the profile for a known version. The matrix is the authoritative source; a per-version row is a literal here. A future revision adds a row, not a column.
Sourcepub const fn is_enabled(&self, feature: Feature) -> bool
pub const fn is_enabled(&self, feature: Feature) -> bool
true if the named feature is enabled. The match is on
a fixed-size array indexed by the feature’s position in
Feature::ALL; a new variant appended to ALL is the
only edit the index needs to pick up.
Sourcepub const fn version(&self) -> A2aVersion
pub const fn version(&self) -> A2aVersion
The version this profile was derived for. The
dispatcher’s VersionNotSupportedError includes this so
a peer that did not negotiate sees which version it
landed on.