pub struct WorkerDescriptor {
pub name: String,
pub family: WorkerFamily,
pub capabilities: Vec<Capability>,
pub auth_mode: AuthMode,
pub quota: QuotaModel,
pub latency: LatencyProfile,
pub transport: Transport,
pub models: Vec<String>,
}Expand description
The full self-description a worker advertises to the scheduler.
Fields§
§name: StringStable worker name, e.g. claude-code, codex, anthropic.
family: WorkerFamily§capabilities: Vec<Capability>§auth_mode: AuthMode§quota: QuotaModel§latency: LatencyProfile§transport: Transport§models: Vec<String>Models this worker can run (e.g. ["opus", "sonnet", "haiku"]). Empty
means the worker has a single fixed model. The conductor picks from this
list per node to optimize cost/latency (CONTEXT.md §7).
Implementations§
Source§impl WorkerDescriptor
impl WorkerDescriptor
Sourcepub fn has(&self, cap: &Capability) -> bool
pub fn has(&self, cap: &Capability) -> bool
Whether this worker advertises the given capability.
Sourcepub fn satisfies(&self, needs: &[Capability]) -> bool
pub fn satisfies(&self, needs: &[Capability]) -> bool
Whether this worker satisfies every capability in needs — the
scheduler’s core match test (CONTEXT.md §7, §13).
Trait Implementations§
Source§impl Clone for WorkerDescriptor
impl Clone for WorkerDescriptor
Source§fn clone(&self) -> WorkerDescriptor
fn clone(&self) -> WorkerDescriptor
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for WorkerDescriptor
impl Debug for WorkerDescriptor
Source§impl<'de> Deserialize<'de> for WorkerDescriptor
impl<'de> Deserialize<'de> for WorkerDescriptor
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<WorkerDescriptor, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<WorkerDescriptor, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for WorkerDescriptor
impl Serialize for WorkerDescriptor
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Forget for WorkerDescriptor
impl Freeze for WorkerDescriptor
impl Move for WorkerDescriptor
impl RefUnwindSafe for WorkerDescriptor
impl Send for WorkerDescriptor
impl Sync for WorkerDescriptor
impl Unpin for WorkerDescriptor
impl UnsafeUnpin for WorkerDescriptor
impl UnwindSafe for WorkerDescriptor
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more