pub struct SpawnOptions {
pub name: Option<String>,
pub hostname: String,
pub port: u16,
pub public_url: Option<String>,
pub description: Option<String>,
pub peer: Vec<String>,
pub discovery_interval_secs: u64,
pub auto_introduce: bool,
pub mdns: bool,
}Expand description
Inputs for starting an A2A peer runtime.
Used by codetether spawn (one-shot CLI) and by codetether tui (which
runs the same A2A surface in the background alongside the interactive
session). Every field is optional / has an auto-pick default — the
“default by default by default” experience is SpawnOptions::auto().
Fields§
§name: Option<String>Agent name. None → auto-pick <host>-<repo>-<short-pid>.
hostname: StringBind hostname. 0.0.0.0 is the zero-config default so mDNS can
announce real interfaces. Use 127.0.0.1 for loopback-only peers.
port: u16Bind port. 0 → OS picks an available port.
public_url: Option<String>Public URL published in the agent card. None → derived from the
effective bound address after binding.
description: Option<String>Optional card description.
peer: Vec<String>Explicit peer seeds — used in addition to mDNS discovery, mainly for cross-host setups where mDNS isn’t routable.
discovery_interval_secs: u64Polling interval for explicit peer seeds (mDNS is event-driven). Clamped to ≥ 5.
auto_introduce: boolSend a non-blocking intro message/send on first sighting of a peer.
mdns: boolEnable mDNS announce + browse (true P2P discovery, no central state).
Implementations§
Source§impl SpawnOptions
impl SpawnOptions
Sourcepub fn from_spawn_args(args: &SpawnArgs) -> Self
pub fn from_spawn_args(args: &SpawnArgs) -> Self
Materialize options from the codetether spawn CLI args.
Trait Implementations§
Source§impl Clone for SpawnOptions
impl Clone for SpawnOptions
Source§fn clone(&self) -> SpawnOptions
fn clone(&self) -> SpawnOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for SpawnOptions
impl RefUnwindSafe for SpawnOptions
impl Send for SpawnOptions
impl Sync for SpawnOptions
impl Unpin for SpawnOptions
impl UnsafeUnpin for SpawnOptions
impl UnwindSafe for SpawnOptions
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request