Skip to main content

ServerBuilder

Struct ServerBuilder 

Source
pub struct ServerBuilder { /* private fields */ }
Expand description

Builder for constructing an ADK server with custom routes.

ServerBuilder allows registering additional Axum routers alongside the built-in REST and A2A routes. Custom routes benefit from the same middleware stack (host and origin checks, auth, CORS, tracing, timeout, security headers) as the built-in routes.

The host and origin checks follow SecurityConfig: by default only loopback names and IP addresses are answered, and no other origin may call the server from a browser.

§Example

ⓘ
use adk_server::{ServerBuilder, ServerConfig};
use axum::{Router, routing::get};

let config = ServerConfig::new(agent, session_service);

let app = ServerBuilder::new(config)
    .add_api_routes(
        Router::new()
            .route("/projects", get(list_projects))
            .route("/projects/{id}", get(get_project))
    )
    .add_api_routes(
        Router::new()
            .route("/automations", get(list_automations))
    )
    .with_a2a("http://localhost:8080")
    .build();

let listener = tokio::net::TcpListener::bind("127.0.0.1:8080").await?;
axum::serve(listener, app).await?;

Implementations§

Source§

impl ServerBuilder

Source

pub fn new(config: ServerConfig) -> Self

Create a new server builder with the given configuration.

Source

pub fn with_ag_ui_extension(self, extension: Arc<dyn AgUiExtension>) -> Self

Adds extension to protocol-native AG-UI runs, and its features to ag_ui in GET /api/ui/capabilities (spec 3.3 §6.1 genui; see RuntimeController::with_ag_ui_extension).

§Example
ⓘ
let app = ServerBuilder::new(config).with_ag_ui_extension(Arc::new(extension)).build();
Source

pub fn add_api_routes(self, routes: Router) -> Self

Add custom routes nested under /api.

These routes are merged into the API router and benefit from the auth middleware layer. Multiple calls accumulate routes.

§Example
ⓘ
builder.add_api_routes(
    Router::new()
        .route("/projects", get(list_projects))
        .route("/projects/{id}", get(get_project))
)
Source

pub fn add_root_routes(self, routes: Router) -> Self

Add custom routes at the root level (not nested under /api).

These routes, such as the web home of adk-surface’s web feature, are merged at the top level of the application, alongside the A2A routes. They receive the full middleware stack (CORS, tracing, timeout, security headers, host and origin checks) but NOT the auth middleware.

Use this for routes that need their own auth handling or public endpoints.

Source

pub fn awp(self, edge: AwpEdge) -> Self

Mounts the AWP 2.0 agent edge (spec 3.5 §7.9) through add_root_routes, so the host guard, CORS, timeouts and security headers apply, and attaches the server’s kill switch to it unless it carries its own.

The edge serves /.well-known/agent-card.json; with an edge mounted, with_a2a keeps its JSON-RPC routes but not its card route.

§Example
ⓘ
let app = ServerBuilder::new(config).awp(edge).build();
Source

pub fn with_a2a(self, base_url: impl Into<String>) -> Self

Enable A2A protocol support at the specified base URL.

The base URL is used to construct the agent card’s endpoint URLs.

With the a2a-v1 feature, the root agent is served over A2A v1 (a2a::v1::server::A2aV1Server):

  • the JSON-RPC binding at /a2a/v1;
  • the HTTP+JSON binding under /a2a/v1/rest;
  • the v1 card at /.well-known/agent-card.json.

The A2A 0.3 endpoint stays at /a2a (and /a2a/stream), with its card at /.well-known/agent.json. The v1 card also lists it, as its last interface with protocolVersion 0.3; a v1 card has no top-level url, so a 0.3 peer reads the 0.3 card.

Without a2a-v1, only A2A 0.3 is served, and its card is at both paths.

Source

pub fn with_skill_index(self, skill_index: Arc<SkillIndex>) -> Self

Expose the skills in skill_index on the A2A agent card.

When A2A is enabled via with_a2a, the served agent card appends one skills[] entry per indexed skill, mapped by agent_skills_from_index. Has no effect without with_a2a.

§Example
ⓘ
use adk_server::{ServerBuilder, ServerConfig};
use std::sync::Arc;

let index = adk_skill::load_skill_index(".")?;
let app = ServerBuilder::new(config)
    .with_a2a("http://localhost:8080")
    .with_skill_index(Arc::new(index))
    .build();
Source

pub fn with_a2a_task_retention(self, retention: A2aTaskRetention) -> Self

Bound how many finished A2A task records the server keeps, and for how long.

Defaults to A2aTaskRetention::default: the newest 1,000 records, each for at most one hour. Has no effect without with_a2a.

§Example
ⓘ
use adk_server::{A2aTaskRetention, ServerBuilder};
use std::time::Duration;

let app = ServerBuilder::new(config)
    .with_a2a("http://localhost:8080")
    .with_a2a_task_retention(A2aTaskRetention::default().with_ttl(Duration::from_secs(300)))
    .build();
Source

pub fn with_background_runs(self, state: BackgroundState) -> Self

Mount the background run endpoints under /api, behind the auth middleware.

Serves POST /api/runs, GET /api/runs, GET /api/runs/{run_id}, and DELETE /api/runs/{run_id} from state, and starts its embedded worker when the router is built inside a Tokio runtime. The state obeys ServerConfig::governance unless it carries its own control. When a RequestContextExtractor is configured, every request must authenticate, and an authenticated run belongs to the caller’s user id: the caller lists, reads, cancels, and wakes only their own runs, another owner’s run answers 404, and the caller’s idempotency and concurrency keys are scoped to the caller. Without one the routes run in open mode, and build logs a warning that says so. Mounting background_runs_router_with_state yourself skips that layer.

§Example
ⓘ
use adk_server::background::BackgroundState;

let app = ServerBuilder::new(config)
    .with_background_runs(BackgroundState::new().with_executor(executor))
    .build();
Source

pub fn with_cron_jobs(self, state: CronState) -> Self

Mount the cron job endpoints under /api, behind the auth middleware.

Serves POST /api/cron, GET /api/cron, and GET/PATCH/DELETE /api/cron/{job_id} from state. The scheduler is not started here — call start_cron_scheduler with a clone of the same state on every replica; each fire time is enqueued once. Without a RequestContextExtractor the routes run in open mode, and build logs a warning that says so.

§Example
ⓘ
use adk_server::background::{BackgroundState, CronState, start_cron_scheduler};

let cron_state = CronState::new(BackgroundState::new());
start_cron_scheduler(cron_state.clone());
let app = ServerBuilder::new(config).with_cron_jobs(cron_state).build();
Source

pub fn with_webhook_ingress(self, ingress: WebhookIngress) -> Self

Mount POST /hooks/{name}: each signed delivery enqueues a durable run.

The route is served at the root, outside /api and without the auth middleware: the Standard Webhooks signature is the authentication. When ingress has no kill switch of its own, ServerConfig::governance is installed, so a freeze refuses deliveries with 503. Runs execute when a worker claims them from the ingress’s run store.

§Example
ⓘ
use adk_server::webhooks::{WebhookHook, WebhookIngress};

let ingress = WebhookIngress::new(run_store.clone())
    .with_hook(WebhookHook::new("billing", verifier, "billing", "invoice_agent"));
let app = ServerBuilder::new(config).with_webhook_ingress(ingress).build();
Source

pub fn with_google_push(self, ingress: GooglePushIngress) -> Self

Mount Google push triggers: POST /triggers/pubsub/{name} and POST /triggers/eventarc/{name} at the root, outside /api, so Pub/Sub and Eventarc reach them with their own OIDC tokens rather than the server’s auth middleware (google_triggers).

An ingress built without a kill switch takes ServerConfig::governance, so a frozen server answers 503 and the source redelivers. The routes are host-checked like every other: add the service’s hostname to SecurityConfig::allowed_hosts.

ⓘ
use adk_server::google_triggers::{GoogleOidcVerifier, GooglePushIngress, PushTrigger};

let verifier = GoogleOidcVerifier::new(audience, ["push@my-project.iam.gserviceaccount.com"])?;
let ingress = GooglePushIngress::new(run_store.clone())
    .with_trigger(PushTrigger::pubsub("orders", verifier, "shop", "order_agent"));
let app = ServerBuilder::new(config).with_google_push(ingress).build();
Source

pub fn with_agent_engine(self, enabled: bool) -> Self

Mount the Agent Engine dispatch endpoints alongside the built-in routes.

When enabled, POST /api/reasoning_engine and POST /api/stream_reasoning_engine serve the Gemini Enterprise Agent Platform runtime contract for the loader’s root agent, using the configured session and artifact services. The routes carry the shared middleware stack but not the auth middleware or the host check — a deployed engine is fronted by the platform, which authenticates callers before they reach the container and chooses the Host it forwards. The memory class methods report Unsupported; use serve_agent_engine with AgentEngineOptions to configure a memory service.

§Panics

build panics when the root agent’s name is not a valid app name, mirroring the builder’s other misuse panics.

Source

pub fn enable_shutdown_endpoint(self) -> Self

Enable the POST /api/shutdown endpoint for graceful shutdown.

When enabled, the server exposes a shutdown endpoint that triggers graceful shutdown: stops accepting new connections, completes in-flight requests, and then exits. Use build_with_shutdown to get the ShutdownHandle for wiring into axum::serve().with_graceful_shutdown().

The endpoint is protected by the auth middleware when a RequestContextExtractor is configured.

Source

pub fn enable_governance_endpoints(self) -> Self

Mount the governance admin endpoints under /api/admin, behind the auth middleware.

RouteEffect
POST /api/admin/freezeFreezes ServerConfig::governance, failing new runs and stopping running ones before their next model or tool call; background workers stop claiming and schedules stop firing; running durable runs are asked to cancel, or parked by the FreezeDelegate registered with with_freeze_delegate. A mirrored control writes the freeze to the shared store, so it reaches every replica. Body: {"reason": "..."}; answers the status with parkedRuns and cancelledRuns
POST /api/admin/unfreezeLifts the freeze; a delegate also resumes what the freeze parked
GET /api/admin/governanceReports {"frozen", "reason", "mirrored", "stale", "runningRuns"}, where runningRuns is park under a delegate and cancel otherwise

The endpoints sit behind the auth middleware, and the freeze and the unfreeze admit only an administrator: a caller whose RequestContext::scopes include SecurityConfig::admin_scope ("admin" by default). An authenticated caller without it is refused with 403 (governance.forbidden). Without a RequestContextExtractor no request has a caller, so both are refused with 401 (governance.unauthenticated); the status stays readable.

§Example
ⓘ
let app = ServerBuilder::new(config).enable_governance_endpoints().build();
Source

pub fn with_freeze_delegate(self, delegate: Arc<dyn FreezeDelegate>) -> Self

Hands the governance endpoints’ freezes and unfreezes to delegate (spec 3.2 §10 S4), so POST /api/admin/freeze parks the running runs the delegate supervises instead of cancelling the background run stores’ runs, and POST /api/admin/unfreeze resumes them. A kernel registers itself here. Implies enable_governance_endpoints, so the delegate is reached only by an administrator’s request.

§Example
ⓘ
let app = ServerBuilder::new(config).with_freeze_delegate(kernel).build();
Source

pub fn with_approval_service(self, service: Arc<dyn ApprovalService>) -> Self

Mount the approval inbox endpoints for service under /api/approvals, behind the auth middleware. See crate::approvals for the routes.

Protocol-native AG-UI runs route the calls they hold to service as well: each ends the run with an AG-UI interrupt naming its inbox entry, and a later AG-UI resume decides the entry (spec 3.3 §10 S2, RuntimeController::with_approval_service).

The endpoints need an authenticated caller, so configure a RequestContextExtractor; without one every route answers 401. Run spawn_approval_ticker as well so requests expire and escalate.

§Example
ⓘ
let app = ServerBuilder::new(config).with_approval_service(service).build();
Source

pub fn with_approval_endpoints(self, endpoints: ApprovalEndpoints) -> Self

Serves endpoints as with_approval_service serves its service: the endpoints keep what they were built with, such as a DecideGuard that checks each decision (spec 3.3 §7.2).

§Example
ⓘ
let endpoints = ApprovalEndpoints::new(service).with_decide_guard(guard);
let app = ServerBuilder::new(config).with_approval_endpoints(endpoints).build();
Source

pub fn build(self) -> Router

Build the final Axum router with all routes and middleware applied.

Source

pub fn build_with_shutdown(self) -> (Router, ShutdownHandle)

Build the final Axum router and return a ShutdownHandle.

Use this when enable_shutdown_endpoint() is set. Pass the handle’s signal to axum::serve().with_graceful_shutdown().

§Example
ⓘ
let (app, shutdown_handle) = ServerBuilder::new(config)
    .enable_shutdown_endpoint()
    .build_with_shutdown();

let listener = tokio::net::TcpListener::bind("127.0.0.1:8080").await?;
axum::serve(listener, app)
    .with_graceful_shutdown(shutdown_handle.signal())
    .await?;

Auto Trait Implementations§

§

impl !RefUnwindSafe for ServerBuilder

§

impl !UnwindSafe for ServerBuilder

§

impl Forget for ServerBuilder

§

impl Freeze for ServerBuilder
where *const ArcInner<dyn AgentLoader> is !null: Freeze, PhantomData<ArcInner<dyn AgentLoader>>: Freeze, *const ArcInner<dyn SessionService> is !null: Freeze, PhantomData<ArcInner<dyn SessionService>>: Freeze, *const ArcInner<dyn ArtifactService> is !null: Freeze, PhantomData<ArcInner<dyn ArtifactService>>: Freeze, *const ArcInner<dyn Memory> is !null: Freeze, PhantomData<ArcInner<dyn Memory>>: Freeze, *const ArcInner<dyn BaseEventsSummarizer> is !null: Freeze, PhantomData<ArcInner<dyn BaseEventsSummarizer>>: Freeze, *const ArcInner<dyn CacheCapable> is !null: Freeze, PhantomData<ArcInner<dyn CacheCapable>>: Freeze, *const ArcInner<AdkSpanExporter> is !null: Freeze, PhantomData<ArcInner<AdkSpanExporter>>: Freeze, *const u8 is !null: Freeze, PhantomData<u8>: Freeze, PhantomData<String>: Freeze, *const ArcInner<dyn RequestContextExtractor> is !null: Freeze, PhantomData<ArcInner<dyn RequestContextExtractor>>: Freeze, *const ArcInner<InterceptorChain> is !null: Freeze, PhantomData<ArcInner<InterceptorChain>>: Freeze, PhantomData<PathBuf>: Freeze, *const ArcInner<ControlState> is !null: Freeze, PhantomData<ArcInner<ControlState>>: Freeze, *const ArcInner<Mutex<HashMap<AdkIdentity, usize>>> is !null: Freeze, PhantomData<ArcInner<Mutex<HashMap<AdkIdentity, usize>>>>: Freeze, PhantomData<Router>: Freeze, *const ArcInner<dyn FreezeDelegate> is !null: Freeze, PhantomData<ArcInner<dyn FreezeDelegate>>: Freeze, *const ArcInner<SkillIndex> is !null: Freeze, PhantomData<ArcInner<SkillIndex>>: Freeze, *const ArcInner<dyn DurableRunStore> is !null: Freeze, PhantomData<ArcInner<dyn DurableRunStore>>: Freeze, *const ArcInner<dyn WorkflowExecutor> is !null: Freeze, PhantomData<ArcInner<dyn WorkflowExecutor>>: Freeze, *const LeafNode<String, Arc<Runner>> is !null: Freeze, PhantomData<(Owned, LeafOrInternal)>: Freeze, PhantomData<Box<(String, Arc<Runner>)>>: Freeze, *const ArcInner<RwLock<Option<GovernanceControl>>> is !null: Freeze, PhantomData<ArcInner<RwLock<Option<GovernanceControl>>>>: Freeze, *const LeafNode<AgentId, SetValZST> is !null: Freeze, PhantomData<Box<(AgentId, SetValZST)>>: Freeze, *const ArcInner<Mutex<Option<WorkerHandle>>> is !null: Freeze, PhantomData<ArcInner<Mutex<Option<WorkerHandle>>>>: Freeze, *const ArcInner<dyn ScheduleStore> is !null: Freeze, PhantomData<ArcInner<dyn ScheduleStore>>: Freeze, *const ArcInner<dyn AuditRecorder> is !null: Freeze, PhantomData<ArcInner<dyn AuditRecorder>>: Freeze, *const ArcInner<HashMap<String, WebhookHook>> is !null: Freeze, PhantomData<ArcInner<HashMap<String, WebhookHook>>>: Freeze, *const ArcInner<HashMap<(PushKind, String), PushTrigger>> is !null: Freeze, PhantomData<ArcInner<HashMap<(PushKind, String), PushTrigger>>>: Freeze, *const ArcInner<dyn ApprovalService> is !null: Freeze, PhantomData<ArcInner<dyn ApprovalService>>: Freeze, *const ArcInner<dyn AgUiExtension> is !null: Freeze, PhantomData<ArcInner<dyn AgUiExtension>>: Freeze,

§

impl Move for ServerBuilder

§

impl Send for ServerBuilder

§

impl Sync for ServerBuilder

§

impl Unpin for ServerBuilder

§

impl UnsafeUnpin for ServerBuilder
where *const ArcInner<dyn AgentLoader> is !null: UnsafeUnpin, PhantomData<ArcInner<dyn AgentLoader>>: UnsafeUnpin, *const ArcInner<dyn SessionService> is !null: UnsafeUnpin, PhantomData<ArcInner<dyn SessionService>>: UnsafeUnpin, *const ArcInner<dyn ArtifactService> is !null: UnsafeUnpin, PhantomData<ArcInner<dyn ArtifactService>>: UnsafeUnpin, *const ArcInner<dyn Memory> is !null: UnsafeUnpin, PhantomData<ArcInner<dyn Memory>>: UnsafeUnpin, *const ArcInner<dyn BaseEventsSummarizer> is !null: UnsafeUnpin, PhantomData<ArcInner<dyn BaseEventsSummarizer>>: UnsafeUnpin, *const ArcInner<dyn CacheCapable> is !null: UnsafeUnpin, PhantomData<ArcInner<dyn CacheCapable>>: UnsafeUnpin, *const ArcInner<AdkSpanExporter> is !null: UnsafeUnpin, PhantomData<ArcInner<AdkSpanExporter>>: UnsafeUnpin, *const u8 is !null: UnsafeUnpin, PhantomData<u8>: UnsafeUnpin, PhantomData<String>: UnsafeUnpin, *const ArcInner<dyn RequestContextExtractor> is !null: UnsafeUnpin, PhantomData<ArcInner<dyn RequestContextExtractor>>: UnsafeUnpin, *const ArcInner<InterceptorChain> is !null: UnsafeUnpin, PhantomData<ArcInner<InterceptorChain>>: UnsafeUnpin, PhantomData<PathBuf>: UnsafeUnpin, *const ArcInner<ControlState> is !null: UnsafeUnpin, PhantomData<ArcInner<ControlState>>: UnsafeUnpin, *const ArcInner<Mutex<HashMap<AdkIdentity, usize>>> is !null: UnsafeUnpin, PhantomData<ArcInner<Mutex<HashMap<AdkIdentity, usize>>>>: UnsafeUnpin, PhantomData<Router>: UnsafeUnpin, *const ArcInner<dyn FreezeDelegate> is !null: UnsafeUnpin, PhantomData<ArcInner<dyn FreezeDelegate>>: UnsafeUnpin, *const ArcInner<SkillIndex> is !null: UnsafeUnpin, PhantomData<ArcInner<SkillIndex>>: UnsafeUnpin, *const ArcInner<dyn DurableRunStore> is !null: UnsafeUnpin, PhantomData<ArcInner<dyn DurableRunStore>>: UnsafeUnpin, *const ArcInner<dyn WorkflowExecutor> is !null: UnsafeUnpin, PhantomData<ArcInner<dyn WorkflowExecutor>>: UnsafeUnpin, *const LeafNode<String, Arc<Runner>> is !null: UnsafeUnpin, PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin, PhantomData<Box<(String, Arc<Runner>)>>: UnsafeUnpin, *const ArcInner<RwLock<Option<GovernanceControl>>> is !null: UnsafeUnpin, PhantomData<ArcInner<RwLock<Option<GovernanceControl>>>>: UnsafeUnpin, *const LeafNode<AgentId, SetValZST> is !null: UnsafeUnpin, PhantomData<Box<(AgentId, SetValZST)>>: UnsafeUnpin, *const ArcInner<Mutex<Option<WorkerHandle>>> is !null: UnsafeUnpin, PhantomData<ArcInner<Mutex<Option<WorkerHandle>>>>: UnsafeUnpin, *const ArcInner<dyn ScheduleStore> is !null: UnsafeUnpin, PhantomData<ArcInner<dyn ScheduleStore>>: UnsafeUnpin, *const ArcInner<dyn AuditRecorder> is !null: UnsafeUnpin, PhantomData<ArcInner<dyn AuditRecorder>>: UnsafeUnpin, *const ArcInner<HashMap<String, WebhookHook>> is !null: UnsafeUnpin, PhantomData<ArcInner<HashMap<String, WebhookHook>>>: UnsafeUnpin, *const ArcInner<HashMap<(PushKind, String), PushTrigger>> is !null: UnsafeUnpin, PhantomData<ArcInner<HashMap<(PushKind, String), PushTrigger>>>: UnsafeUnpin, *const ArcInner<dyn ApprovalService> is !null: UnsafeUnpin, PhantomData<ArcInner<dyn ApprovalService>>: UnsafeUnpin, *const ArcInner<dyn AgUiExtension> is !null: UnsafeUnpin, PhantomData<ArcInner<dyn AgUiExtension>>: UnsafeUnpin,

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<A, B, T> HttpServerConnExec<A, B> for T
where B: Body,

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts 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 more
Source§

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

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more