Skip to main content

ExactFleet

Struct ExactFleet 

Source
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

Source

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.

Source

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.

Source

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.

Source

pub fn router_ref(&self) -> Option<FleetRouterRef>

How this Fleet points at its Router, if it does at all.

Source

pub fn legacy_inline_router(&self) -> Option<&RouterMember>

The legacy inline Router member, if the file used the prototype form.

Source

pub fn has_auto_member(&self) -> bool

Whether any member explicitly requested reasoning = "auto".

Source

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.

Source

pub fn parse(text: &str) -> Result<Self, ExactFleetError>

Parse an exact Fleet from TOML text.

Trait Implementations§

Source§

impl Clone for ExactFleet

Source§

fn clone(&self) -> ExactFleet

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ExactFleet

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for ExactFleet

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for ExactFleet

Source§

impl PartialEq for ExactFleet

Source§

fn eq(&self, other: &ExactFleet) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for ExactFleet

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for ExactFleet

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.