pub trait WithRoute: Sized {
// Required methods
fn public(self) -> Self;
fn private(self) -> Self;
fn auto(self) -> Self;
}Expand description
Routing-intent shortcuts.
Implemented on every public-LLM request shape. Mirrors the TypeScript
SDK’s .route('public' | 'private' | 'auto') ergonomics with idiomatic
Rust verbs (.public(), .private(), .auto()).
Required Methods§
Sourcefn public(self) -> Self
fn public(self) -> Self
Set LlmRoute::Public — force direct upstream-provider execution,
skipping any custodial-hardware hop even on peers that have it
configured.
Sourcefn private(self) -> Self
fn private(self) -> Self
Set LlmRoute::Private — force the custodial-hardware path. Hard-
fails with crate::llm::PrivateUnavailableError when the selected
executor has no hardware path.
Honest framing: Private mode isolates the upstream provider’s API credentials on the peer’s host and routes egress through a separate device; it does NOT mask prompt contents from the upstream provider or anonymize the user.
Sourcefn auto(self) -> Self
fn auto(self) -> Self
Set LlmRoute::Auto — pick the more-isolated path when available,
never hard-fail because of routing. The response’s execution_route
is the truthful echo of what actually ran.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".