pub struct TokioRustlsRuntime { /* private fields */ }
native-tls
or rustls
) and crate feature tokio
and crate feature rustls
only.Expand description
A Runtime
built around a Handle to a tokio runtime, and rustls
.
Implementations§
Source§impl TokioRustlsRuntime
impl TokioRustlsRuntime
Sourcepub fn create() -> IoResult<Self>
pub fn create() -> IoResult<Self>
Create a new TokioRustlsRuntime
.
The return value will own the underlying Tokio runtime object, which will be dropped when the last copy of this handle is freed.
If you want to use a currently running runtime instead, call
TokioRustlsRuntime::current()
.
Sourcepub fn current() -> IoResult<Self>
pub fn current() -> IoResult<Self>
Return a TokioRustlsRuntime
wrapping the currently running
Tokio runtime.
§Usage note
We should never call this from inside other Arti crates, or from library
crates that want to support multiple runtimes! This function is for
Arti users who want to wrap some existing Tokio runtime as a
Runtime
. It is not for library crates that want to work with
multiple runtimes.
Once you have a runtime returned by this function, you should just
create more handles to it via Clone
.
Trait Implementations§
Source§impl BlockOn for TokioRustlsRuntime
impl BlockOn for TokioRustlsRuntime
Source§impl Clone for TokioRustlsRuntime
impl Clone for TokioRustlsRuntime
Source§fn clone(&self) -> TokioRustlsRuntime
fn clone(&self) -> TokioRustlsRuntime
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl CoarseTimeProvider for TokioRustlsRuntime
impl CoarseTimeProvider for TokioRustlsRuntime
Source§fn now_coarse(&self) -> CoarseInstant
fn now_coarse(&self) -> CoarseInstant
CoarseTimeProvider
’s view of the current instant. Read moreSource§impl Debug for TokioRustlsRuntime
impl Debug for TokioRustlsRuntime
Source§impl From<Handle> for TokioRustlsRuntime
impl From<Handle> for TokioRustlsRuntime
Source§impl NetStreamProvider<SocketAddr> for TokioRustlsRuntime
impl NetStreamProvider<SocketAddr> for TokioRustlsRuntime
Source§type Stream = <CompoundRuntime<TokioRuntimeHandle, TokioRuntimeHandle, RealCoarseTimeProvider, TokioRuntimeHandle, TokioRuntimeHandle, RustlsProvider, TokioRuntimeHandle> as NetStreamProvider<SocketAddr>>::Stream
type Stream = <CompoundRuntime<TokioRuntimeHandle, TokioRuntimeHandle, RealCoarseTimeProvider, TokioRuntimeHandle, TokioRuntimeHandle, RustlsProvider, TokioRuntimeHandle> as NetStreamProvider<SocketAddr>>::Stream
Self::connect()
.Source§type Listener = <CompoundRuntime<TokioRuntimeHandle, TokioRuntimeHandle, RealCoarseTimeProvider, TokioRuntimeHandle, TokioRuntimeHandle, RustlsProvider, TokioRuntimeHandle> as NetStreamProvider<SocketAddr>>::Listener
type Listener = <CompoundRuntime<TokioRuntimeHandle, TokioRuntimeHandle, RealCoarseTimeProvider, TokioRuntimeHandle, TokioRuntimeHandle, RustlsProvider, TokioRuntimeHandle> as NetStreamProvider<SocketAddr>>::Listener
Self::listen()
.Source§fn connect<'life0, 'life1, 'async_trait>(
&'life0 self,
addr: &'life1 SocketAddr,
) -> Pin<Box<dyn Future<Output = Result<Self::Stream>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn connect<'life0, 'life1, 'async_trait>(
&'life0 self,
addr: &'life1 SocketAddr,
) -> Pin<Box<dyn Future<Output = Result<Self::Stream>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§impl NetStreamProvider for TokioRustlsRuntime
impl NetStreamProvider for TokioRustlsRuntime
Source§type Stream = <CompoundRuntime<TokioRuntimeHandle, TokioRuntimeHandle, RealCoarseTimeProvider, TokioRuntimeHandle, TokioRuntimeHandle, RustlsProvider, TokioRuntimeHandle> as NetStreamProvider>::Stream
type Stream = <CompoundRuntime<TokioRuntimeHandle, TokioRuntimeHandle, RealCoarseTimeProvider, TokioRuntimeHandle, TokioRuntimeHandle, RustlsProvider, TokioRuntimeHandle> as NetStreamProvider>::Stream
Self::connect()
.Source§type Listener = <CompoundRuntime<TokioRuntimeHandle, TokioRuntimeHandle, RealCoarseTimeProvider, TokioRuntimeHandle, TokioRuntimeHandle, RustlsProvider, TokioRuntimeHandle> as NetStreamProvider>::Listener
type Listener = <CompoundRuntime<TokioRuntimeHandle, TokioRuntimeHandle, RealCoarseTimeProvider, TokioRuntimeHandle, TokioRuntimeHandle, RustlsProvider, TokioRuntimeHandle> as NetStreamProvider>::Listener
Self::listen()
.Source§fn connect<'life0, 'life1, 'async_trait>(
&'life0 self,
addr: &'life1 SocketAddr,
) -> Pin<Box<dyn Future<Output = Result<Self::Stream>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn connect<'life0, 'life1, 'async_trait>(
&'life0 self,
addr: &'life1 SocketAddr,
) -> Pin<Box<dyn Future<Output = Result<Self::Stream>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§impl SleepProvider for TokioRustlsRuntime
impl SleepProvider for TokioRustlsRuntime
Source§type SleepFuture = <CompoundRuntime<TokioRuntimeHandle, TokioRuntimeHandle, RealCoarseTimeProvider, TokioRuntimeHandle, TokioRuntimeHandle, RustlsProvider, TokioRuntimeHandle> as SleepProvider>::SleepFuture
type SleepFuture = <CompoundRuntime<TokioRuntimeHandle, TokioRuntimeHandle, RealCoarseTimeProvider, TokioRuntimeHandle, TokioRuntimeHandle, RustlsProvider, TokioRuntimeHandle> as SleepProvider>::SleepFuture
SleepProvider::sleep()
Source§fn sleep(&self, duration: Duration) -> Self::SleepFuture
fn sleep(&self, duration: Duration) -> Self::SleepFuture
duration
has
elapsed.Source§fn wallclock(&self) -> SystemTime
fn wallclock(&self) -> SystemTime
Source§fn block_advance<T: Into<String>>(&self, _reason: T)
fn block_advance<T: Into<String>>(&self, _reason: T)
Source§fn release_advance<T: Into<String>>(&self, _reason: T)
fn release_advance<T: Into<String>>(&self, _reason: T)
block_advance
no
longer exists, and it’s fine to move time forward if nothing else is blocking advances. Read moreSource§fn allow_one_advance(&self, _dur: Duration)
fn allow_one_advance(&self, _dur: Duration)
block_advance
API has been used. Read moreSource§impl Spawn for TokioRustlsRuntime
impl Spawn for TokioRustlsRuntime
Source§impl SpawnBlocking for TokioRustlsRuntime
impl SpawnBlocking for TokioRustlsRuntime
Source§type Handle<T: Send + 'static> = <CompoundRuntime<TokioRuntimeHandle, TokioRuntimeHandle, RealCoarseTimeProvider, TokioRuntimeHandle, TokioRuntimeHandle, RustlsProvider, TokioRuntimeHandle> as SpawnBlocking>::Handle<T>
type Handle<T: Send + 'static> = <CompoundRuntime<TokioRuntimeHandle, TokioRuntimeHandle, RealCoarseTimeProvider, TokioRuntimeHandle, TokioRuntimeHandle, RustlsProvider, TokioRuntimeHandle> as SpawnBlocking>::Handle<T>
Source§fn spawn_blocking<F, T>(
&self,
f: F,
) -> <CompoundRuntime<TokioRuntimeHandle, TokioRuntimeHandle, RealCoarseTimeProvider, TokioRuntimeHandle, TokioRuntimeHandle, RustlsProvider, TokioRuntimeHandle> as SpawnBlocking>::Handle<T>
fn spawn_blocking<F, T>( &self, f: F, ) -> <CompoundRuntime<TokioRuntimeHandle, TokioRuntimeHandle, RealCoarseTimeProvider, TokioRuntimeHandle, TokioRuntimeHandle, RustlsProvider, TokioRuntimeHandle> as SpawnBlocking>::Handle<T>
Source§impl<S> TlsProvider<S> for TokioRustlsRuntime
impl<S> TlsProvider<S> for TokioRustlsRuntime
Source§type Connector = <CompoundRuntime<TokioRuntimeHandle, TokioRuntimeHandle, RealCoarseTimeProvider, TokioRuntimeHandle, TokioRuntimeHandle, RustlsProvider, TokioRuntimeHandle> as TlsProvider<S>>::Connector
type Connector = <CompoundRuntime<TokioRuntimeHandle, TokioRuntimeHandle, RealCoarseTimeProvider, TokioRuntimeHandle, TokioRuntimeHandle, RustlsProvider, TokioRuntimeHandle> as TlsProvider<S>>::Connector
Source§type TlsStream = <CompoundRuntime<TokioRuntimeHandle, TokioRuntimeHandle, RealCoarseTimeProvider, TokioRuntimeHandle, TokioRuntimeHandle, RustlsProvider, TokioRuntimeHandle> as TlsProvider<S>>::TlsStream
type TlsStream = <CompoundRuntime<TokioRuntimeHandle, TokioRuntimeHandle, RealCoarseTimeProvider, TokioRuntimeHandle, TokioRuntimeHandle, RustlsProvider, TokioRuntimeHandle> as TlsProvider<S>>::TlsStream
Source§fn tls_connector(&self) -> Self::Connector
fn tls_connector(&self) -> Self::Connector
Source§fn supports_keying_material_export(&self) -> bool
fn supports_keying_material_export(&self) -> bool
Source§impl UdpProvider for TokioRustlsRuntime
impl UdpProvider for TokioRustlsRuntime
Source§type UdpSocket = <CompoundRuntime<TokioRuntimeHandle, TokioRuntimeHandle, RealCoarseTimeProvider, TokioRuntimeHandle, TokioRuntimeHandle, RustlsProvider, TokioRuntimeHandle> as UdpProvider>::UdpSocket
type UdpSocket = <CompoundRuntime<TokioRuntimeHandle, TokioRuntimeHandle, RealCoarseTimeProvider, TokioRuntimeHandle, TokioRuntimeHandle, RustlsProvider, TokioRuntimeHandle> as UdpProvider>::UdpSocket
Self::bind()
Auto Trait Implementations§
impl Freeze for TokioRustlsRuntime
impl !RefUnwindSafe for TokioRustlsRuntime
impl Send for TokioRustlsRuntime
impl Sync for TokioRustlsRuntime
impl Unpin for TokioRustlsRuntime
impl !UnwindSafe for TokioRustlsRuntime
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> NetStreamProvider<SocketAddr> for T
impl<T> NetStreamProvider<SocketAddr> for T
Source§type Stream = Stream
type Stream = Stream
Self::connect()
.Source§type Listener = Listener
type Listener = Listener
Self::listen()
.Source§fn connect<'life0, 'life1, 'async_trait>(
&'life0 self,
addr: &'life1 SocketAddr,
) -> Pin<Box<dyn Future<Output = Result<Stream, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
T: 'async_trait,
fn connect<'life0, 'life1, 'async_trait>(
&'life0 self,
addr: &'life1 SocketAddr,
) -> Pin<Box<dyn Future<Output = Result<Stream, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
T: 'async_trait,
Source§impl<R> RuntimeSubstExt for Rwhere
R: Runtime,
impl<R> RuntimeSubstExt for Rwhere
R: Runtime,
Source§fn with_tcp_provider<T>(
&self,
new_tcp: T,
) -> CompoundRuntime<R, R, R, T, R, R, R>
fn with_tcp_provider<T>( &self, new_tcp: T, ) -> CompoundRuntime<R, R, R, T, R, R, R>
Source§fn with_sleep_provider<T>(
&self,
new_sleep: T,
) -> CompoundRuntime<R, T, R, R, R, R, R>
fn with_sleep_provider<T>( &self, new_sleep: T, ) -> CompoundRuntime<R, T, R, R, R, R, R>
Source§fn with_coarse_time_provider<T>(
&self,
new_coarse_time: T,
) -> CompoundRuntime<R, R, T, R, R, R, R>
fn with_coarse_time_provider<T>( &self, new_coarse_time: T, ) -> CompoundRuntime<R, R, T, R, R, R, R>
Source§impl<T> SleepProviderExt for Twhere
T: SleepProvider,
impl<T> SleepProviderExt for Twhere
T: SleepProvider,
Source§fn timeout<F: Future>(
&self,
duration: Duration,
future: F,
) -> Timeout<F, Self::SleepFuture> ⓘ
fn timeout<F: Future>( &self, duration: Duration, future: F, ) -> Timeout<F, Self::SleepFuture> ⓘ
Source§fn sleep_until_wallclock(
&self,
when: SystemTime,
) -> SleepUntilWallclock<'_, Self>
fn sleep_until_wallclock( &self, when: SystemTime, ) -> SleepUntilWallclock<'_, Self>
when
or later, trying to
recover from clock jumps. Read more§impl<Sp> SpawnExt for Spwhere
Sp: Spawn + ?Sized,
impl<Sp> SpawnExt for Spwhere
Sp: Spawn + ?Sized,
§fn spawn<Fut>(&self, future: Fut) -> Result<(), SpawnError>
fn spawn<Fut>(&self, future: Fut) -> Result<(), SpawnError>
alloc
only.()
to
completion. Read more