pub struct SpawnArgs {
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,
}Fields§
§name: Option<String>Agent name. Defaults to
hostname: StringHostname to bind. 127.0.0.1 (default) is loopback-only and SAFE
(the peer is unreachable from outside the host) but mDNS multicast
does NOT traverse the Linux lo interface, so same-host peers
cannot find each other via mDNS at this binding. Use 0.0.0.0 to
be reachable on the LAN AND to enable mDNS auto-discovery between
same-host agents (multicast loops back through the real interface).
port: u16Port to bind. 0 (default) lets the OS pick an available port. Specify a port if you need a stable URL for curl scripts.
public_url: Option<String>Public URL published in the agent card (defaults to http://
description: Option<String>Optional custom agent description for the card
peer: Vec<String>Explicit peer seed URLs (in addition to mDNS-discovered peers). Useful for cross-host setups where mDNS isn’t routable.
discovery_interval_secs: u64Discovery interval for explicit –peer seeds, in seconds. Clamped to ≥ 5. (mDNS discovery is event-driven, not polled.)
auto_introduce: boolDisable sending an automatic intro message to newly discovered peers
mdns: boolDisable mDNS announce + browse. Without mDNS, only explicit –peer seeds are discovered. mDNS is on by default for true P2P.
Trait Implementations§
Source§impl Args for SpawnArgs
impl Args for SpawnArgs
Source§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§impl CommandFactory for SpawnArgs
impl CommandFactory for SpawnArgs
Source§impl FromArgMatches for SpawnArgs
impl FromArgMatches for SpawnArgs
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl Parser for SpawnArgs
impl Parser for SpawnArgs
Source§fn parse_from<I, T>(itr: I) -> Self
fn parse_from<I, T>(itr: I) -> Self
Source§fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
Source§fn update_from<I, T>(&mut self, itr: I)
fn update_from<I, T>(&mut self, itr: I)
Auto Trait Implementations§
impl Freeze for SpawnArgs
impl RefUnwindSafe for SpawnArgs
impl Send for SpawnArgs
impl Sync for SpawnArgs
impl Unpin for SpawnArgs
impl UnsafeUnpin for SpawnArgs
impl UnwindSafe for SpawnArgs
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