Skip to main content

StatusCode

Struct StatusCode 

Source
pub struct StatusCode(/* private fields */);
Available on crate feature server only.
Expand description

An HTTP status code (status-code in RFC 9110 et al.).

Constants are provided for known status codes, including those in the IANA HTTP Status Code Registry.

Status code values in the range 100-999 (inclusive) are supported by this type. Values in the range 100-599 are semantically classified by the most significant digit. See StatusCode::is_success, etc. Values above 599 are unclassified but allowed for legacy compatibility, though their use is discouraged. Applications may interpret such values as protocol errors.

§Examples

use http::StatusCode;

assert_eq!(StatusCode::from_u16(200).unwrap(), StatusCode::OK);
assert_eq!(StatusCode::NOT_FOUND.as_u16(), 404);
assert!(StatusCode::OK.is_success());

Implementations§

Source§

impl StatusCode

Source

pub const fn from_u16(src: u16) -> Result<StatusCode, InvalidStatusCode>

Available on crate feature fullstack only.

Converts a u16 to a status code.

The function validates the correctness of the supplied u16. It must be greater or equal to 100 and less than 1000.

§Example
use http::StatusCode;

let ok = StatusCode::from_u16(200).unwrap();
assert_eq!(ok, StatusCode::OK);

let err = StatusCode::from_u16(99);
assert!(err.is_err());
Source

pub fn from_bytes(src: &[u8]) -> Result<StatusCode, InvalidStatusCode>

Available on crate feature fullstack only.

Converts a &[u8] to a status code.

Source

pub const fn as_u16(&self) -> u16

Available on crate feature fullstack only.

Returns the u16 corresponding to this StatusCode.

§Note

This is the same as the From<StatusCode> implementation, but included as an inherent method because that implementation doesn’t appear in rustdocs, as well as a way to force the type instead of relying on inference.

§Example
let status = http::StatusCode::OK;
assert_eq!(status.as_u16(), 200);
Source

pub fn as_str(&self) -> &str

Available on crate feature fullstack only.

Returns a &str representation of the StatusCode

The return value only includes a numerical representation of the status code. The canonical reason is not included.

§Example
let status = http::StatusCode::OK;
assert_eq!(status.as_str(), "200");
Source

pub fn canonical_reason(&self) -> Option<&'static str>

Available on crate feature fullstack only.

Get the standardised reason-phrase for this status code.

This is mostly here for servers writing responses, but could potentially have application at other times.

The reason phrase is defined as being exclusively for human readers. You should avoid deriving any meaning from it at all costs.

Bear in mind also that in HTTP/2.0 and HTTP/3.0 the reason phrase is abolished from transmission, and so this canonical reason phrase really is the only reason phrase you’ll find.

§Example
let status = http::StatusCode::OK;
assert_eq!(status.canonical_reason(), Some("OK"));
Source

pub fn is_informational(&self) -> bool

Available on crate feature fullstack only.

Check if status is within 100-199.

Source

pub fn is_success(&self) -> bool

Available on crate feature fullstack only.

Check if status is within 200-299.

Source

pub fn is_redirection(&self) -> bool

Available on crate feature fullstack only.

Check if status is within 300-399.

Source

pub fn is_client_error(&self) -> bool

Available on crate feature fullstack only.

Check if status is within 400-499.

Source

pub fn is_server_error(&self) -> bool

Available on crate feature fullstack only.

Check if status is within 500-599.

Source§

impl StatusCode

Source

pub const CONTINUE: StatusCode

Available on crate feature fullstack only.

100 Continue [RFC9110, Section 15.2.1]

Source

pub const SWITCHING_PROTOCOLS: StatusCode

Available on crate feature fullstack only.

101 Switching Protocols [RFC9110, Section 15.2.2]

Source

pub const PROCESSING: StatusCode

Available on crate feature fullstack only.

102 Processing [RFC2518, Section 10.1]

Source

pub const EARLY_HINTS: StatusCode

Available on crate feature fullstack only.

103 Early Hints [RFC8297, Section 2]

Source

pub const OK: StatusCode

Available on crate feature fullstack only.
Source

pub const CREATED: StatusCode

Available on crate feature fullstack only.
Source

pub const ACCEPTED: StatusCode

Available on crate feature fullstack only.

202 Accepted [RFC9110, Section 15.3.3]

Source

pub const NON_AUTHORITATIVE_INFORMATION: StatusCode

Available on crate feature fullstack only.

203 Non-Authoritative Information [RFC9110, Section 15.3.4]

Source

pub const NO_CONTENT: StatusCode

Available on crate feature fullstack only.

204 No Content [RFC9110, Section 15.3.5]

Source

pub const RESET_CONTENT: StatusCode

Available on crate feature fullstack only.

205 Reset Content [RFC9110, Section 15.3.6]

Source

pub const PARTIAL_CONTENT: StatusCode

Available on crate feature fullstack only.

206 Partial Content [RFC9110, Section 15.3.7]

Source

pub const MULTI_STATUS: StatusCode

Available on crate feature fullstack only.

207 Multi-Status [RFC4918, Section 11.1]

Source

pub const ALREADY_REPORTED: StatusCode

Available on crate feature fullstack only.

208 Already Reported [RFC5842, Section 7.1]

Source

pub const IM_USED: StatusCode

Available on crate feature fullstack only.
Source

pub const MULTIPLE_CHOICES: StatusCode

Available on crate feature fullstack only.

300 Multiple Choices [RFC9110, Section 15.4.1]

Source

pub const MOVED_PERMANENTLY: StatusCode

Available on crate feature fullstack only.

301 Moved Permanently [RFC9110, Section 15.4.2]

Source

pub const FOUND: StatusCode

Available on crate feature fullstack only.
Source

pub const SEE_OTHER: StatusCode

Available on crate feature fullstack only.

303 See Other [RFC9110, Section 15.4.4]

Source

pub const NOT_MODIFIED: StatusCode

Available on crate feature fullstack only.

304 Not Modified [RFC9110, Section 15.4.5]

Source

pub const USE_PROXY: StatusCode

Available on crate feature fullstack only.

305 Use Proxy [RFC9110, Section 15.4.6]

Source

pub const TEMPORARY_REDIRECT: StatusCode

Available on crate feature fullstack only.

307 Temporary Redirect [RFC9110, Section 15.4.7]

Source

pub const PERMANENT_REDIRECT: StatusCode

Available on crate feature fullstack only.

308 Permanent Redirect [RFC9110, Section 15.4.8]

Source

pub const BAD_REQUEST: StatusCode

Available on crate feature fullstack only.

400 Bad Request [RFC9110, Section 15.5.1]

Source

pub const UNAUTHORIZED: StatusCode

Available on crate feature fullstack only.

401 Unauthorized [RFC9110, Section 15.5.2]

Source

pub const PAYMENT_REQUIRED: StatusCode

Available on crate feature fullstack only.

402 Payment Required [RFC9110, Section 15.5.3]

Source

pub const FORBIDDEN: StatusCode

Available on crate feature fullstack only.

403 Forbidden [RFC9110, Section 15.5.4]

Source

pub const NOT_FOUND: StatusCode

Available on crate feature fullstack only.

404 Not Found [RFC9110, Section 15.5.5]

Source

pub const METHOD_NOT_ALLOWED: StatusCode

Available on crate feature fullstack only.

405 Method Not Allowed [RFC9110, Section 15.5.6]

Source

pub const NOT_ACCEPTABLE: StatusCode

Available on crate feature fullstack only.

406 Not Acceptable [RFC9110, Section 15.5.7]

Source

pub const PROXY_AUTHENTICATION_REQUIRED: StatusCode

Available on crate feature fullstack only.

407 Proxy Authentication Required [RFC9110, Section 15.5.8]

Source

pub const REQUEST_TIMEOUT: StatusCode

Available on crate feature fullstack only.

408 Request Timeout [RFC9110, Section 15.5.9]

Source

pub const CONFLICT: StatusCode

Available on crate feature fullstack only.

409 Conflict [RFC9110, Section 15.5.10]

Source

pub const GONE: StatusCode

Available on crate feature fullstack only.
Source

pub const LENGTH_REQUIRED: StatusCode

Available on crate feature fullstack only.

411 Length Required [RFC9110, Section 15.5.12]

Source

pub const PRECONDITION_FAILED: StatusCode

Available on crate feature fullstack only.

412 Precondition Failed [RFC9110, Section 15.5.13]

Source

pub const PAYLOAD_TOO_LARGE: StatusCode

Available on crate feature fullstack only.

413 Payload Too Large [RFC9110, Section 15.5.14]

Source

pub const URI_TOO_LONG: StatusCode

Available on crate feature fullstack only.

414 URI Too Long [RFC9110, Section 15.5.15]

Source

pub const UNSUPPORTED_MEDIA_TYPE: StatusCode

Available on crate feature fullstack only.

415 Unsupported Media Type [RFC9110, Section 15.5.16]

Source

pub const RANGE_NOT_SATISFIABLE: StatusCode

Available on crate feature fullstack only.

416 Range Not Satisfiable [RFC9110, Section 15.5.17]

Source

pub const EXPECTATION_FAILED: StatusCode

Available on crate feature fullstack only.

417 Expectation Failed [RFC9110, Section 15.5.18]

Source

pub const IM_A_TEAPOT: StatusCode

Available on crate feature fullstack only.

418 I’m a teapot [curiously not registered by IANA but RFC2324, Section 2.3.2]

Source

pub const MISDIRECTED_REQUEST: StatusCode

Available on crate feature fullstack only.

421 Misdirected Request [RFC9110, Section 15.5.20]

Source

pub const UNPROCESSABLE_ENTITY: StatusCode

Available on crate feature fullstack only.

422 Unprocessable Entity [RFC9110, Section 15.5.21]

Source

pub const LOCKED: StatusCode

Available on crate feature fullstack only.

423 Locked [RFC4918, Section 11.3]

Source

pub const FAILED_DEPENDENCY: StatusCode

Available on crate feature fullstack only.

424 Failed Dependency [RFC4918, Section 11.4]

Source

pub const TOO_EARLY: StatusCode

Available on crate feature fullstack only.

425 Too early [RFC8470, Section 5.2]

Source

pub const UPGRADE_REQUIRED: StatusCode

Available on crate feature fullstack only.

426 Upgrade Required [RFC9110, Section 15.5.22]

Source

pub const PRECONDITION_REQUIRED: StatusCode

Available on crate feature fullstack only.

428 Precondition Required [RFC6585, Section 3]

Source

pub const TOO_MANY_REQUESTS: StatusCode

Available on crate feature fullstack only.

429 Too Many Requests [RFC6585, Section 4]

Source

pub const REQUEST_HEADER_FIELDS_TOO_LARGE: StatusCode

Available on crate feature fullstack only.

431 Request Header Fields Too Large [RFC6585, Section 5]

Available on crate feature fullstack only.

451 Unavailable For Legal Reasons [RFC7725, Section 3]

Source

pub const INTERNAL_SERVER_ERROR: StatusCode

Available on crate feature fullstack only.

500 Internal Server Error [RFC9110, Section 15.6.1]

Source

pub const NOT_IMPLEMENTED: StatusCode

Available on crate feature fullstack only.

501 Not Implemented [RFC9110, Section 15.6.2]

Source

pub const BAD_GATEWAY: StatusCode

Available on crate feature fullstack only.

502 Bad Gateway [RFC9110, Section 15.6.3]

Source

pub const SERVICE_UNAVAILABLE: StatusCode

Available on crate feature fullstack only.

503 Service Unavailable [RFC9110, Section 15.6.4]

Source

pub const GATEWAY_TIMEOUT: StatusCode

Available on crate feature fullstack only.

504 Gateway Timeout [RFC9110, Section 15.6.5]

Source

pub const HTTP_VERSION_NOT_SUPPORTED: StatusCode

Available on crate feature fullstack only.

505 HTTP Version Not Supported [RFC9110, Section 15.6.6]

Source

pub const VARIANT_ALSO_NEGOTIATES: StatusCode

Available on crate feature fullstack only.

506 Variant Also Negotiates [RFC2295, Section 8.1]

Source

pub const INSUFFICIENT_STORAGE: StatusCode

Available on crate feature fullstack only.

507 Insufficient Storage [RFC4918, Section 11.5]

Source

pub const LOOP_DETECTED: StatusCode

Available on crate feature fullstack only.

508 Loop Detected [RFC5842, Section 7.2]

Source

pub const NOT_EXTENDED: StatusCode

Available on crate feature fullstack only.

510 Not Extended [RFC2774, Section 7]

Source

pub const NETWORK_AUTHENTICATION_REQUIRED: StatusCode

Available on crate feature fullstack only.

511 Network Authentication Required [RFC6585, Section 6]

Trait Implementations§

Source§

impl Clone for StatusCode

Source§

fn clone(&self) -> StatusCode

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for StatusCode

Source§

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

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

impl Default for StatusCode

Source§

fn default() -> StatusCode

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

impl Display for StatusCode

Formats the status code, including the canonical reason.

§Example

assert_eq!(format!("{}", StatusCode::OK), "200 OK");
Source§

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

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

impl<'a> From<&'a StatusCode> for StatusCode

Source§

fn from(t: &'a StatusCode) -> StatusCode

Converts to this type from the input type.
Source§

impl From<ServerFnError> for StatusCode

Source§

fn from(value: ServerFnError) -> StatusCode

Converts to this type from the input type.
Source§

impl From<StatusCode> for u16

Source§

fn from(status: StatusCode) -> u16

Converts to this type from the input type.
Source§

impl FromStr for StatusCode

Source§

type Err = InvalidStatusCode

The associated error which can be returned from parsing.
Source§

fn from_str(s: &str) -> Result<StatusCode, InvalidStatusCode>

Parses a string s to return a value of this type. Read more
Source§

impl Hash for StatusCode

Source§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl IntoResponse for StatusCode

Source§

fn into_response(self) -> Response<Body>

Create a response.
Source§

impl Ord for StatusCode

Source§

fn cmp(&self, other: &StatusCode) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 (const: unstable) · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 (const: unstable) · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq<u16> for StatusCode

Source§

fn eq(&self, other: &u16) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq for StatusCode

Source§

fn eq(&self, other: &StatusCode) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for StatusCode

Source§

fn partial_cmp(&self, other: &StatusCode) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 (const: unstable) · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 (const: unstable) · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<'a> TryFrom<&'a [u8]> for StatusCode

Source§

type Error = InvalidStatusCode

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

fn try_from( t: &'a [u8], ) -> Result<StatusCode, <StatusCode as TryFrom<&'a [u8]>>::Error>

Performs the conversion.
Source§

impl<'a> TryFrom<&'a str> for StatusCode

Source§

type Error = InvalidStatusCode

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

fn try_from( t: &'a str, ) -> Result<StatusCode, <StatusCode as TryFrom<&'a str>>::Error>

Performs the conversion.
Source§

impl TryFrom<u16> for StatusCode

Source§

type Error = InvalidStatusCode

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

fn try_from(t: u16) -> Result<StatusCode, <StatusCode as TryFrom<u16>>::Error>

Performs the conversion.
Source§

impl Copy for StatusCode

Source§

impl Eq for StatusCode

Source§

impl StructuralPartialEq for StatusCode

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<Q, K> Comparable<K> for Q
where Q: Ord + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromHashFragment for T
where T: FromStr + Default, <T as FromStr>::Err: Display,

Source§

fn from_hash_fragment(hash: &str) -> T

Create an instance of Self from a hash fragment.
Source§

impl<T> FromQueryArgument for T
where T: Default + FromStr, <T as FromStr>::Err: Display,

Source§

type Err = <T as FromStr>::Err

The error that can occur when parsing a query argument.
Source§

fn from_query_argument( argument: &str, ) -> Result<T, <T as FromQueryArgument>::Err>

Create an instance of Self from a query string.
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> FromRouteSegment for T
where T: FromStr, <T as FromStr>::Err: Display,

Source§

type Err = <T as FromStr>::Err

The error that can occur when parsing a route segment.
Source§

fn from_route_segment(route: &str) -> Result<T, <T as FromRouteSegment>::Err>

Create an instance of Self from a route segment.
Source§

impl<T, S> Handler<IntoResponseHandler, S> for T
where T: IntoResponse + Clone + Send + Sync + 'static,

Source§

type Future = Ready<Response<Body>>

The type of future calling this handler returns.
Source§

fn call( self, _req: Request<Body>, _state: S, ) -> <T as Handler<IntoResponseHandler, S>>::Future

Call the handler with the given request.
Source§

fn layer<L>(self, layer: L) -> Layered<L, Self, T, S>
where L: Layer<HandlerService<Self, T, S>> + Clone, <L as Layer<HandlerService<Self, T, S>>>::Service: Service<Request<Body>>,

Apply a tower::Layer to the handler. Read more
Source§

fn with_state(self, state: S) -> HandlerService<Self, T, S>

Convert the handler into a Service by providing the state
Source§

impl<H, T> HandlerWithoutStateExt<T> for H
where H: Handler<T, ()>,

Source§

fn into_service(self) -> HandlerService<H, T, ()>

Convert the handler into a Service and no state.
Source§

fn into_make_service(self) -> IntoMakeService<HandlerService<H, T, ()>>

Convert the handler into a MakeService and no state. Read more
Source§

fn into_make_service_with_connect_info<C>( self, ) -> IntoMakeServiceWithConnectInfo<HandlerService<H, T, ()>, C>

Available on crate feature tokio only.
Convert the handler into a MakeService which stores information about the incoming connection and has no state. Read more
Source§

impl<T> InitializeFromFunction<T> for T

Source§

fn initialize_from_function(f: fn() -> T) -> T

Create an instance of this type from an initialization function
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> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: 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: 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> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<Ret> SpawnIfAsync<(), Ret> for Ret

Source§

fn spawn(self) -> Ret

Spawn the value into the dioxus runtime if it is an async block
Source§

impl<T, O> SuperFrom<T> for O
where O: From<T>,

Source§

fn super_from(input: T) -> O

Convert from a type to another type.
Source§

impl<T, O, M> SuperInto<O, M> for T
where O: SuperFrom<T, M>,

Source§

fn super_into(self) -> O

Convert from a type to another type.
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> ToQueryArgument for T
where T: Display,

Source§

fn display_query_argument( &self, query_name: &str, f: &mut Formatter<'_>, ) -> Result<(), Error>

Display the query argument as a string.
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> ToStringFallible for T
where T: Display,

Source§

fn try_to_string(&self) -> Result<String, TryReserveError>

ToString::to_string, but without panic on OOM.

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<S, T> Upcast<T> for S
where T: UpcastFrom<S> + ?Sized, S: ?Sized,

Source§

fn upcast(&self) -> &T
where Self: ErasableGeneric, T: ErasableGeneric<Repr = Self::Repr>,

Perform a zero-cost type-safe upcast to a wider ref type within the Wasm bindgen generics type system. Read more
Source§

fn upcast_into(self) -> T
where Self: Sized + ErasableGeneric, T: ErasableGeneric<Repr = Self::Repr>,

Perform a zero-cost type-safe upcast to a wider type within the Wasm bindgen generics type system. Read more
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<T> DependencyElement for T
where T: 'static + PartialEq + Clone,