Skip to main content

App

Struct App 

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

The application builder.

App collects application state, routers, and optional OpenAPI configuration, then either finalizes into an AppInner via App::build or starts serving via App::serve.

App is deliberately not generic over its state type: state is stored in a type-erased StateMap, which is what lets router modules be defined without any knowledge of the concrete state type.

Implementations§

Source§

impl App

Source

pub fn new() -> Self

Creates an empty application.

Source

pub fn state<S: Send + Sync + 'static>(self, state: S) -> Self

Registers an application state value, retrievable via the State extractor.

Source

pub fn logger(self, config: LoggerConfig) -> Self

Configures logging. Without this, logging is on by default with sensible settings (a developer console on a terminal, JSON otherwise; level from RUST_LOG or info).

Source

pub fn cache(self, cache: Cache) -> Self

Enables caching, making the Cache injectable into handlers and services.

Pass a configured cache, for example Cache::in_memory() for the default in-memory store. Without this call, injecting a Cache fails.

Source

pub fn throttle(self, throttle: Throttle) -> Self

Enables rate limiting, defining the policies routes can apply with the throttle attribute and (optionally) a global default.

App::new().throttle(
    Throttle::new()
        .policy("default", 100, 60)
        .policy("strict", 5, 60)
        .default("default"),
);
Source

pub fn include_router(self, router: Router) -> Self

Mounts a router’s routes on the application.

Source

pub fn include(self, route: impl FnOnce() -> Route) -> Self

Mounts a single route, given the route factory generated for a handler.

A #[get] / #[post] / #[sse] / #[websocket] handler named handler generates a handler() route factory, so App::new().include(handler) registers it directly without building a Router.

Source

pub fn openapi<P: OpenApiProvider>(self, provider: P) -> Self

Configures OpenAPI document generation and the documentation UI.

Source

pub fn asyncapi<P: AsyncApiProvider>(self, provider: P) -> Self

Configures AsyncAPI document generation for the SSE/WebSocket channels.

Source

pub fn middleware<M: Middleware>(self, middleware: M) -> Self

Registers a middleware layer.

Layers run in registration order, outermost first. Some middlewares may only be registered once; see DuplicatePolicy.

Source

pub fn lifespan<L: Lifespan>(self) -> Self

Registers a lifespan: a resource container with typed startup/shutdown.

Lifespans start in registration order and stop in reverse order. Their resources are registered for injection. Using a lifespan together with on_startup or on_shutdown is a configuration error.

Source

pub fn on_startup<F, Fut>(self, hook: F) -> Self
where F: Fn() -> Fut + Send + Sync + 'static, Fut: Future<Output = Result<()>> + Send + 'static,

Registers a startup hook (for apps that do not use a lifespan).

Source

pub fn on_shutdown<F, Fut>(self, hook: F) -> Self
where F: Fn() -> Fut + Send + Sync + 'static, Fut: Future<Output = Result<()>> + Send + 'static,

Registers a shutdown hook (for apps that do not use a lifespan).

Source

pub fn on_ready<F, Fut>(self, hook: F) -> Self
where F: Fn(ReadyContext) -> Fut + Send + Sync + 'static, Fut: Future<Output = Result<()>> + Send + 'static,

Registers a hook that runs once the listener has bound.

Allowed in both lifespan and event-hook modes.

Source

pub fn on_request<F, Fut>(self, hook: F) -> Self
where F: Fn(RequestEvent) -> Fut + Send + Sync + 'static, Fut: Future<Output = ()> + Send + 'static,

Registers an observe-only hook that runs when a request arrives.

Hooks run in registration order, before the middleware chain, and cannot alter the response. Use them for logging, metrics, or tracing.

Source

pub fn on_response<F, Fut>(self, hook: F) -> Self
where F: Fn(ResponseEvent) -> Fut + Send + Sync + 'static, Fut: Future<Output = ()> + Send + 'static,

Registers an observe-only hook that runs once a response is ready.

Hooks run in registration order, after the middleware chain, and observe the final status and elapsed time.

Source

pub fn on_error<F, Fut>(self, hook: F) -> Self
where F: Fn(ErrorEvent) -> Fut + Send + Sync + 'static, Fut: Future<Output = ()> + Send + 'static,

Registers an observe-only hook that runs for a non-validation error.

Validation failures (422) go to on_validation_error instead; every other error fires this hook.

Source

pub fn on_validation_error<F, Fut>(self, hook: F) -> Self
where F: Fn(ValidationErrorEvent) -> Fut + Send + Sync + 'static, Fut: Future<Output = ()> + Send + 'static,

Registers an observe-only hook that runs for a request-body validation failure (422).

Source

pub fn on_panic<F, Fut>(self, hook: F) -> Self
where F: Fn(PanicEvent) -> Fut + Send + Sync + 'static, Fut: Future<Output = ()> + Send + 'static,

Registers an observe-only hook that runs when a handler panic is caught.

Has no effect unless the panic boundary is enabled with catch_panics.

Source

pub fn websocket_config(self, config: WebSocketConfig) -> Self

Sets default WebSocket limits and timeouts for every #[websocket] route.

A route’s own #[websocket(...)] limits override these defaults.

Source

pub fn max_sse_connections(self, limit: usize) -> Self

Caps the number of concurrent Server-Sent Events streams the app will serve.

Each SSE connection holds a pinned stream and timers for its whole lifetime (often hours), so an unbounded count can exhaust memory. Once the cap is reached, further #[sse] requests are rejected with 503 Service Unavailable until a stream ends. With no cap set, SSE streams are unbounded.

Source

pub fn idle_timeout(self, timeout: Duration) -> Self

Closes a connection after this long with no read or write activity.

Bounds slow or abandoned connections (and zombie keep-alive sockets). It is off by default, because a legitimately idle long-lived connection — an open WebSocket or a quiet Server-Sent Events stream — is normal; enable it only when your routes do not rely on long-lived idle connections, or set it comfortably above your SSE heartbeat interval.

Source

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

Binds the listening socket with SO_REUSEPORT (Unix), so several processes or instances can listen on the same address and the kernel load-balances new connections across them.

Has no effect on non-Unix platforms. Off by default.

Source

pub fn max_request_body_size(self, bytes: usize) -> Self

Sets the maximum size, in bytes, of a buffered request body.

Applies to the JSON, Valid<T>, and urlencoded Form<T> body extractors, which enforce the cap incrementally as the body arrives (an oversized body is rejected with 400 before it is fully buffered). Multipart uploads have their own UploadConfig limits. Defaults to MAX_BODY_BYTES (2 MiB).

Source

pub fn header_read_timeout(self, timeout: Duration) -> Self

Sets how long a client may take to send the complete request head (request line + headers) after its connection is accepted.

This bounds slowloris-style attacks where a client opens a connection and dribbles header bytes to tie up a worker. Defaults to DEFAULT_HEADER_READ_TIMEOUT (30s); pass a longer duration to relax it. Applies to HTTP/1 connections.

Source

pub fn without_header_read_timeout(self) -> Self

Removes the request-head read deadline, letting a client take unlimited time to send its headers. Only do this behind a trusted proxy that already bounds slow clients.

Source

pub fn http1(self, config: Http1Config) -> Self

Tunes HTTP/1 behavior (keep-alive, header count) for every connection.

Source

pub fn http2(self, config: Http2Config) -> Self

Tunes HTTP/2 behavior (stream limits, keep-alive, flow control) for every connection. HTTP/2 is served automatically over a plaintext upgrade or over TLS via ALPN.

Source

pub fn on_ws_connect<F, Fut>(self, hook: F) -> Self
where F: Fn(WsConnectInfo) -> Fut + Send + Sync + 'static, Fut: Future<Output = ()> + Send + 'static,

Registers an observe-only hook that runs when a WebSocket opens.

Source

pub fn on_ws_disconnect<F, Fut>(self, hook: F) -> Self
where F: Fn(WsDisconnectInfo) -> Fut + Send + Sync + 'static, Fut: Future<Output = ()> + Send + 'static,

Registers an observe-only hook that runs when a WebSocket closes.

The event carries how long the connection was open and the close code.

Source

pub fn upload_config(self, config: UploadConfig) -> Self

Sets default multipart upload limits for every form/file route.

A route’s own #[post("/p", upload(...))] limits override these defaults.

Source

pub fn catch_panics(self) -> Self

Enables the panic boundary: a panic in a handler is caught and turned into a 500 response instead of dropping the connection.

Enabled by default. A caught panic fires the on_panic hooks. The boundary has no effect when the process is built with panic = "abort".

Source

pub fn propagate_panics(self) -> Self

Disables the panic boundary: handler panics propagate and tear down the request task instead of becoming a 500 response.

Source

pub fn exception_handler<E, F, Fut>(self, handler: F) -> Self
where E: Error + Send + Sync + 'static, F: Fn(E, ErrorContext) -> Fut + Send + Sync + 'static, Fut: Future<Output = Response> + Send + 'static,

Registers a handler that maps a typed error E into a response.

When an error carries a source of type E (for example one produced by a #[derive(AppError)] type via ?), the registered handler receives the recovered value and produces the response. Registering a handler for a type again replaces the previous one.

Source

pub fn build(self) -> Result<AppInner>

Finalizes the application into its request-handling core.

Routers are flattened into a single route table, OpenAPI documentation routes (if configured) are appended, and a Matcher is compiled.

§Errors

Returns an error if the route table contains an invalid or duplicate path.

Source

pub async fn serve(self, addr: impl AsRef<str>) -> Result<()>

Runs the application lifecycle and serves on addr until a shutdown signal.

Listens for SIGINT (Ctrl-C) and, on Unix, SIGTERM. The lifecycle runs in order: startup (lifespans or on_startup hooks), bind, on_ready hooks, the accept loop, drain, then shutdown (lifespans in reverse, or on_shutdown hooks).

§Errors

Returns an error for a lifecycle misconfiguration, a failed startup, or a bind failure.

Source

pub async fn serve_with_shutdown<S>( self, addr: impl AsRef<str>, shutdown: S, ) -> Result<()>
where S: Future<Output = ()>,

Runs the lifecycle, stopping the accept loop when shutdown resolves.

Like serve but driven by a caller-supplied future instead of SIGINT/SIGTERM, for custom graceful shutdown (and for tests).

Source

pub async fn serve_unix(self, path: impl AsRef<Path>) -> Result<()>

Serves over a Unix-domain socket at path, until a SIGINT/SIGTERM.

Useful behind a reverse proxy on the same host. A stale socket file at path is removed before binding. Unix only.

Source

pub async fn serve_unix_with_shutdown<S>( self, path: impl AsRef<Path>, shutdown: S, ) -> Result<()>
where S: Future<Output = ()>,

Serves over a Unix-domain socket at path, stopping when shutdown resolves. Unix only.

Source

pub async fn build_test(self) -> Result<TestApp>

Builds the application for in-process testing.

Runs the startup phase (lifespans or on_startup hooks) and finalizes the app without binding a socket, returning a TestApp that the TestClient drives. The on_ready hooks are not run, since there is no bound address.

Trait Implementations§

Source§

impl Default for App

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl !RefUnwindSafe for App

§

impl !UnwindSafe for App

§

impl Freeze for App

§

impl Send for App

§

impl Sync for App

§

impl Unpin for App

§

impl UnsafeUnpin for App

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<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> Paint for T
where T: ?Sized,

Source§

fn fg(&self, value: Color) -> Painted<&T>

Returns a styled value derived from self with the foreground set to value.

This method should be used rarely. Instead, prefer to use color-specific builder methods like red() and green(), which have the same functionality but are pithier.

§Example

Set foreground color to white using fg():

use yansi::{Paint, Color};

painted.fg(Color::White);

Set foreground color to white using white().

use yansi::Paint;

painted.white();
Source§

fn primary(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Primary].

§Example
println!("{}", value.primary());
Source§

fn fixed(&self, color: u8) -> Painted<&T>

Returns self with the fg() set to [Color :: Fixed].

§Example
println!("{}", value.fixed(color));
Source§

fn rgb(&self, r: u8, g: u8, b: u8) -> Painted<&T>

Returns self with the fg() set to [Color :: Rgb].

§Example
println!("{}", value.rgb(r, g, b));
Source§

fn black(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Black].

§Example
println!("{}", value.black());
Source§

fn red(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Red].

§Example
println!("{}", value.red());
Source§

fn green(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Green].

§Example
println!("{}", value.green());
Source§

fn yellow(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Yellow].

§Example
println!("{}", value.yellow());
Source§

fn blue(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Blue].

§Example
println!("{}", value.blue());
Source§

fn magenta(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Magenta].

§Example
println!("{}", value.magenta());
Source§

fn cyan(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Cyan].

§Example
println!("{}", value.cyan());
Source§

fn white(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: White].

§Example
println!("{}", value.white());
Source§

fn bright_black(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightBlack].

§Example
println!("{}", value.bright_black());
Source§

fn bright_red(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightRed].

§Example
println!("{}", value.bright_red());
Source§

fn bright_green(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightGreen].

§Example
println!("{}", value.bright_green());
Source§

fn bright_yellow(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightYellow].

§Example
println!("{}", value.bright_yellow());
Source§

fn bright_blue(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightBlue].

§Example
println!("{}", value.bright_blue());
Source§

fn bright_magenta(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightMagenta].

§Example
println!("{}", value.bright_magenta());
Source§

fn bright_cyan(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightCyan].

§Example
println!("{}", value.bright_cyan());
Source§

fn bright_white(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightWhite].

§Example
println!("{}", value.bright_white());
Source§

fn bg(&self, value: Color) -> Painted<&T>

Returns a styled value derived from self with the background set to value.

This method should be used rarely. Instead, prefer to use color-specific builder methods like on_red() and on_green(), which have the same functionality but are pithier.

§Example

Set background color to red using fg():

use yansi::{Paint, Color};

painted.bg(Color::Red);

Set background color to red using on_red().

use yansi::Paint;

painted.on_red();
Source§

fn on_primary(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Primary].

§Example
println!("{}", value.on_primary());
Source§

fn on_fixed(&self, color: u8) -> Painted<&T>

Returns self with the bg() set to [Color :: Fixed].

§Example
println!("{}", value.on_fixed(color));
Source§

fn on_rgb(&self, r: u8, g: u8, b: u8) -> Painted<&T>

Returns self with the bg() set to [Color :: Rgb].

§Example
println!("{}", value.on_rgb(r, g, b));
Source§

fn on_black(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Black].

§Example
println!("{}", value.on_black());
Source§

fn on_red(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Red].

§Example
println!("{}", value.on_red());
Source§

fn on_green(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Green].

§Example
println!("{}", value.on_green());
Source§

fn on_yellow(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Yellow].

§Example
println!("{}", value.on_yellow());
Source§

fn on_blue(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Blue].

§Example
println!("{}", value.on_blue());
Source§

fn on_magenta(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Magenta].

§Example
println!("{}", value.on_magenta());
Source§

fn on_cyan(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Cyan].

§Example
println!("{}", value.on_cyan());
Source§

fn on_white(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: White].

§Example
println!("{}", value.on_white());
Source§

fn on_bright_black(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightBlack].

§Example
println!("{}", value.on_bright_black());
Source§

fn on_bright_red(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightRed].

§Example
println!("{}", value.on_bright_red());
Source§

fn on_bright_green(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightGreen].

§Example
println!("{}", value.on_bright_green());
Source§

fn on_bright_yellow(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightYellow].

§Example
println!("{}", value.on_bright_yellow());
Source§

fn on_bright_blue(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightBlue].

§Example
println!("{}", value.on_bright_blue());
Source§

fn on_bright_magenta(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightMagenta].

§Example
println!("{}", value.on_bright_magenta());
Source§

fn on_bright_cyan(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightCyan].

§Example
println!("{}", value.on_bright_cyan());
Source§

fn on_bright_white(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightWhite].

§Example
println!("{}", value.on_bright_white());
Source§

fn attr(&self, value: Attribute) -> Painted<&T>

Enables the styling Attribute value.

This method should be used rarely. Instead, prefer to use attribute-specific builder methods like bold() and underline(), which have the same functionality but are pithier.

§Example

Make text bold using attr():

use yansi::{Paint, Attribute};

painted.attr(Attribute::Bold);

Make text bold using using bold().

use yansi::Paint;

painted.bold();
Source§

fn bold(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Bold].

§Example
println!("{}", value.bold());
Source§

fn dim(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Dim].

§Example
println!("{}", value.dim());
Source§

fn italic(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Italic].

§Example
println!("{}", value.italic());
Source§

fn underline(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Underline].

§Example
println!("{}", value.underline());

Returns self with the attr() set to [Attribute :: Blink].

§Example
println!("{}", value.blink());

Returns self with the attr() set to [Attribute :: RapidBlink].

§Example
println!("{}", value.rapid_blink());
Source§

fn invert(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Invert].

§Example
println!("{}", value.invert());
Source§

fn conceal(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Conceal].

§Example
println!("{}", value.conceal());
Source§

fn strike(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Strike].

§Example
println!("{}", value.strike());
Source§

fn quirk(&self, value: Quirk) -> Painted<&T>

Enables the yansi Quirk value.

This method should be used rarely. Instead, prefer to use quirk-specific builder methods like mask() and wrap(), which have the same functionality but are pithier.

§Example

Enable wrapping using .quirk():

use yansi::{Paint, Quirk};

painted.quirk(Quirk::Wrap);

Enable wrapping using wrap().

use yansi::Paint;

painted.wrap();
Source§

fn mask(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Mask].

§Example
println!("{}", value.mask());
Source§

fn wrap(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Wrap].

§Example
println!("{}", value.wrap());
Source§

fn linger(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Linger].

§Example
println!("{}", value.linger());
Source§

fn clear(&self) -> Painted<&T>

👎Deprecated since 1.0.1:

renamed to resetting() due to conflicts with Vec::clear(). The clear() method will be removed in a future release.

Returns self with the quirk() set to [Quirk :: Clear].

§Example
println!("{}", value.clear());
Source§

fn resetting(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Resetting].

§Example
println!("{}", value.resetting());
Source§

fn bright(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Bright].

§Example
println!("{}", value.bright());
Source§

fn on_bright(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: OnBright].

§Example
println!("{}", value.on_bright());
Source§

fn whenever(&self, value: Condition) -> Painted<&T>

Conditionally enable styling based on whether the Condition value applies. Replaces any previous condition.

See the crate level docs for more details.

§Example

Enable styling painted only when both stdout and stderr are TTYs:

use yansi::{Paint, Condition};

painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);
Source§

fn new(self) -> Painted<Self>
where Self: Sized,

Create a new Painted with a default Style. Read more
Source§

fn paint<S>(&self, style: S) -> Painted<&Self>
where S: Into<Style>,

Apply a style wholesale to self. Any previous style is replaced. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. 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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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