pub struct ExactFleet {
pub name: String,
pub description: Option<String>,
pub schema_revision: u32,
pub members: Vec<ExactMember>,
pub reasoning_router: Option<String>,
pub router: Option<RouterMember>,
}Expand description
A parsed exact Fleet.
Fields§
§name: String§description: Option<String>§schema_revision: u32§members: Vec<ExactMember>§reasoning_router: Option<String>Name of the saved Reasoning Router profile this Fleet references. The
profile is a separate, reusable service — several Fleets may name the
same one. Accepts a qualified origin/name.
router: Option<RouterMember>The legacy inline Router, if the file used the prototype form.
Implementations§
Source§impl ExactFleet
impl ExactFleet
Sourcepub fn member(&self, id: &str) -> Option<&ExactMember>
pub fn member(&self, id: &str) -> Option<&ExactMember>
Look up a dispatchable member by its member id only.
Roles are semantic labels used by gates, handoffs, and records; ids are
what addresses a roster entry. Keeping the two lookups separate is what
lets a task carry a meaningful role (builder) while the runtime
resolves a distinct profile id (implementer) — see
Self::member_by_role.
Sourcepub fn member_by_role(&self, role: &str) -> Option<&ExactMember>
pub fn member_by_role(&self, role: &str) -> Option<&ExactMember>
Look up a dispatchable member by its semantic role.
Both sides resolve through canonical_role_key, so a member saved
under a renamed role (oracle) is found by a task, gate, or handoff that
names either spelling.
Sourcepub fn member_by_id_or_role(&self, id_or_role: &str) -> Option<&ExactMember>
pub fn member_by_id_or_role(&self, id_or_role: &str) -> Option<&ExactMember>
Look up a member by id first, then by role. Roster invariants forbid an id/role collision, so this can never be order-dependent.
Sourcepub fn router_ref(&self) -> Option<FleetRouterRef>
pub fn router_ref(&self) -> Option<FleetRouterRef>
How this Fleet points at its Router, if it does at all.
Sourcepub fn legacy_inline_router(&self) -> Option<&RouterMember>
pub fn legacy_inline_router(&self) -> Option<&RouterMember>
The legacy inline Router member, if the file used the prototype form.
Sourcepub fn has_auto_member(&self) -> bool
pub fn has_auto_member(&self) -> bool
Whether any member explicitly requested reasoning = "auto".
Sourcepub fn validate(&self) -> Result<(), ExactFleetError>
pub fn validate(&self) -> Result<(), ExactFleetError>
Re-check every roster invariant that Self::parse enforces.
ExactFleet is pub and Deserialize, so a value can reach a snapshot
without ever passing through the TOML parser. Capture calls this so a
hand-built or round-tripped roster cannot smuggle in a duplicate role, an
id/role collision, or a worker claiming the Router’s identity.
Sourcepub fn parse(text: &str) -> Result<Self, ExactFleetError>
pub fn parse(text: &str) -> Result<Self, ExactFleetError>
Parse an exact Fleet from TOML text.
Trait Implementations§
Source§impl Clone for ExactFleet
impl Clone for ExactFleet
Source§fn clone(&self) -> ExactFleet
fn clone(&self) -> ExactFleet
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more