Trait s2n_quic::provider::tls::default::error::Fallible

source ·
pub trait Fallible {
    type Output;

    // Required method
    fn into_result(self) -> Result<Self::Output, Error>;
}

Required Associated Types§

Required Methods§

source

fn into_result(self) -> Result<Self::Output, Error>

Implementations on Foreign Types§

source§

impl Fallible for i32

source§

impl Fallible for isize

source§

impl Fallible for u64

source§

fn into_result(self) -> Result<<u64 as Fallible>::Output, Error>

Converts a u64 to a Result by checking for u64::MAX.

If a method that returns an unsigned int is fallible, then the -1 error result wraps around to u64::MAX.

For a u64 to be Fallible, a result of u64::MAX must not be possible without an error. For example, s2n_connection_get_delay can’t return u64::MAX as a valid result because s2n-tls blinding delays are limited to 30s, or a return value of 3^10 ns, which is significantly less than u64::MAX. s2n_connection_get_delay would therefore only return u64::MAX for a -1 error result.

§

type Output = u64

source§

impl<T> Fallible for *const T

source§

impl<T> Fallible for *mut T

Implementors§