PdfServiceError

Enum PdfServiceError 

Source
pub enum PdfServiceError {
    InvalidUrl(String),
    EmptyHtml,
    PoolLockFailed(String),
    BrowserUnavailable(String),
    TabCreationFailed(String),
    NavigationFailed(String),
    NavigationTimeout(String),
    PdfGenerationFailed(String),
    Timeout(String),
    PoolShuttingDown,
    Internal(String),
}
Expand description

Errors that can occur during PDF generation.

Each variant maps to a specific HTTP status code and error code for consistent API responses. Use status_code() and error_code() to build HTTP responses.

§HTTP Status Code Mapping

Error TypeHTTP StatusError Code
InvalidUrl400 Bad RequestINVALID_URL
EmptyHtml400 Bad RequestEMPTY_HTML
PoolLockFailed500 Internal Server ErrorPOOL_LOCK_FAILED
BrowserUnavailable503 Service UnavailableBROWSER_UNAVAILABLE
TabCreationFailed500 Internal Server ErrorTAB_CREATION_FAILED
NavigationFailed502 Bad GatewayNAVIGATION_FAILED
NavigationTimeout504 Gateway TimeoutNAVIGATION_TIMEOUT
PdfGenerationFailed502 Bad GatewayPDF_GENERATION_FAILED
Timeout504 Gateway TimeoutTIMEOUT
PoolShuttingDown503 Service UnavailablePOOL_SHUTTING_DOWN
Internal500 Internal Server ErrorINTERNAL_ERROR

§Error Categories

§Client Errors (4xx)

These indicate problems with the request that the client can fix:

§Server Errors (5xx)

These indicate problems on the server side:

§Upstream Errors (502/504)

These indicate problems with the target URL or browser:

§Availability Errors (503)

These indicate the service is temporarily unavailable:

§Examples

§Error Handling

use html2pdf_api::service::{PdfServiceError, ErrorResponse};

fn handle_result(result: Result<Vec<u8>, PdfServiceError>) -> (u16, String) {
    match result {
        Ok(pdf) => (200, format!("Generated {} bytes", pdf.len())),
        Err(e) => {
            let status = e.status_code();
            let response = ErrorResponse::from(&e);
            (status, serde_json::to_string(&response).unwrap())
        }
    }
}

§Retry Logic

use html2pdf_api::service::PdfServiceError;

fn should_retry(error: &PdfServiceError) -> bool {
    match error {
        // Transient errors - worth retrying
        PdfServiceError::BrowserUnavailable(_) => true,
        PdfServiceError::NavigationTimeout(_) => true,
        PdfServiceError::Timeout(_) => true,
         
        // Client errors - don't retry
        PdfServiceError::InvalidUrl(_) => false,
        PdfServiceError::EmptyHtml => false,
         
        // Server errors - maybe retry with backoff
        PdfServiceError::PoolLockFailed(_) => true,
         
        // Fatal errors - don't retry
        PdfServiceError::PoolShuttingDown => false,
         
        _ => false,
    }
}

Variants§

§

InvalidUrl(String)

The provided URL is invalid or malformed.

§Causes

  • Empty URL string
  • Missing URL scheme (e.g., example.com instead of https://example.com)
  • Invalid URL format

§Resolution

Provide a valid HTTP or HTTPS URL with proper formatting.

§Example Response

{
    "error": "Invalid URL: relative URL without a base",
    "code": "INVALID_URL"
}
§

EmptyHtml

The HTML content is empty or contains only whitespace.

§Causes

  • Empty html field in request
  • HTML field contains only whitespace

§Resolution

Provide non-empty HTML content.

§Example Response

{
    "error": "HTML content is required",
    "code": "EMPTY_HTML"
}
§

PoolLockFailed(String)

Failed to acquire the browser pool lock.

This is an internal error indicating a synchronization problem, typically caused by a poisoned mutex (previous panic while holding lock).

§Causes

  • Mutex was poisoned by a previous panic
  • Deadlock condition (should not happen with correct implementation)

§Resolution

This is a server-side issue. Restarting the service may help. Check logs for previous panic messages.

§

BrowserUnavailable(String)

No browser is available in the pool.

All browsers are currently in use and the pool is at maximum capacity.

§Causes

  • High request volume exceeding pool capacity
  • Slow PDF generation causing browser exhaustion
  • Browsers failing health checks faster than replacement

§Resolution

  • Retry after a short delay
  • Increase max_pool_size configuration
  • Reduce waitsecs to speed up PDF generation
§

TabCreationFailed(String)

Failed to create a new browser tab.

The browser instance is available but couldn’t create a new tab.

§Causes

  • Browser process is unresponsive
  • System resource exhaustion (file descriptors, memory)
  • Browser crashed

§Resolution

The pool should automatically replace unhealthy browsers. If persistent, check system resources and browser logs.

§

NavigationFailed(String)

Failed to navigate to the specified URL.

The browser couldn’t load the target URL.

§Causes

  • URL doesn’t exist (404)
  • Server error at target URL (5xx)
  • SSL/TLS certificate issues
  • Network connectivity problems
  • Target server refusing connections

§Resolution

  • Verify the URL is accessible
  • Check if the target server is running
  • Verify SSL certificates if using HTTPS
§

NavigationTimeout(String)

Navigation to the URL timed out.

The browser started loading the URL but didn’t complete within the allowed time.

§Causes

  • Target server is slow to respond
  • Large page with many resources
  • Network latency issues
  • Target server overloaded

§Resolution

  • Check target server performance
  • Increase timeout if needed (via configuration)
  • Optimize the target page
§

PdfGenerationFailed(String)

Failed to generate PDF from the loaded page.

The page loaded successfully but PDF generation failed.

§Causes

  • Complex page layout that can’t be rendered
  • Browser rendering issues
  • Memory exhaustion during rendering
  • Invalid page content

§Resolution

  • Simplify the page layout
  • Check for rendering errors in browser console
  • Ensure sufficient system memory
§

Timeout(String)

The overall operation timed out.

The complete PDF generation operation (including queue time, navigation, and rendering) exceeded the maximum allowed duration.

§Causes

  • High system load
  • Very large or complex pages
  • Slow target server
  • Insufficient waitsecs for JavaScript completion

§Resolution

  • Retry the request
  • Increase timeout configuration
  • Reduce page complexity
§

PoolShuttingDown

The browser pool is shutting down.

The service is in the process of graceful shutdown and not accepting new requests.

§Causes

  • Service restart initiated
  • Graceful shutdown in progress
  • Container/pod termination

§Resolution

Wait for the service to restart and retry. Do not retry immediately as the service is intentionally stopping.

§

Internal(String)

An unexpected internal error occurred.

Catch-all for errors that don’t fit other categories.

§Causes

  • Unexpected panic
  • Unhandled error condition
  • Bug in the application

§Resolution

Check server logs for details. Report persistent issues with reproduction steps.

Implementations§

Source§

impl PdfServiceError

Source

pub fn status_code(&self) -> u16

Returns the HTTP status code for this error.

Maps each error type to an appropriate HTTP status code following REST conventions.

§Status Code Categories
RangeCategoryMeaning
400-499Client ErrorRequest problem (client can fix)
500-599Server ErrorServer problem (client can’t fix)
§Examples
use html2pdf_api::service::PdfServiceError;

let error = PdfServiceError::InvalidUrl("missing scheme".to_string());
assert_eq!(error.status_code(), 400);

let error = PdfServiceError::BrowserUnavailable("pool exhausted".to_string());
assert_eq!(error.status_code(), 503);

let error = PdfServiceError::NavigationTimeout("30s exceeded".to_string());
assert_eq!(error.status_code(), 504);
Source

pub fn error_code(&self) -> &'static str

Returns a machine-readable error code.

These codes are stable and can be used for programmatic error handling by API clients. They are returned in the code field of error responses.

§Error Codes
CodeError Type
INVALID_URLInvalid or malformed URL
EMPTY_HTMLEmpty HTML content
POOL_LOCK_FAILEDInternal pool lock error
BROWSER_UNAVAILABLENo browsers available
TAB_CREATION_FAILEDFailed to create browser tab
NAVIGATION_FAILEDFailed to load URL
NAVIGATION_TIMEOUTURL load timeout
PDF_GENERATION_FAILEDFailed to generate PDF
TIMEOUTOverall operation timeout
POOL_SHUTTING_DOWNService shutting down
INTERNAL_ERRORUnexpected internal error
§Examples
use html2pdf_api::service::PdfServiceError;

let error = PdfServiceError::InvalidUrl("test".to_string());
assert_eq!(error.error_code(), "INVALID_URL");

// Client-side handling
match error.error_code() {
    "INVALID_URL" | "EMPTY_HTML" => println!("Fix your request"),
    "BROWSER_UNAVAILABLE" | "TIMEOUT" => println!("Retry later"),
    _ => println!("Contact support"),
}
Source

pub fn is_retryable(&self) -> bool

Returns true if this error is likely transient and worth retrying.

Transient errors are typically caused by temporary conditions that may resolve on their own. Client errors (4xx) are never transient as they require the client to change the request.

§Retryable Errors
ErrorRetryableReason
BrowserUnavailablePool may free up
NavigationTimeoutNetwork may recover
TimeoutLoad may decrease
PoolLockFailedRare, may recover
InvalidUrlClient must fix
EmptyHtmlClient must fix
PoolShuttingDownIntentional shutdown
§Examples
use html2pdf_api::service::PdfServiceError;

let error = PdfServiceError::BrowserUnavailable("pool full".to_string());
if error.is_retryable() {
    // Wait and retry
    tokio::time::sleep(std::time::Duration::from_secs(1)).await;
}

let error = PdfServiceError::InvalidUrl("bad url".to_string());
assert!(!error.is_retryable()); // Don't retry, fix the URL

Trait Implementations§

Source§

impl Clone for PdfServiceError

Source§

fn clone(&self) -> PdfServiceError

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for PdfServiceError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for PdfServiceError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for PdfServiceError

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<&PdfServiceError> for ErrorResponse

Source§

fn from(err: &PdfServiceError) -> Self

Converts to this type from the input type.
Source§

impl From<PdfServiceError> for ErrorResponse

Source§

fn from(err: PdfServiceError) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

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<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromRef<T> for T
where T: Clone,

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
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> IntoCollection<T> for T

Source§

fn into_collection<A>(self) -> SmallVec<A>
where A: Array<Item = T>,

Converts self into a collection.
Source§

fn mapped<U, F, A>(self, f: F) -> SmallVec<A>
where F: FnMut(T) -> U, A: Array<Item = U>,

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> 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> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
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
Source§

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