Enum mfio_rt::native::NativeRtInstance
source · pub enum NativeRtInstance {
IoUring(Runtime),
Mio(Runtime),
Default(Runtime),
}
Available on crate feature
native
only.Variants§
IoUring(Runtime)
Available on non-
miri
and Linux and crate feature io-uring
only.Mio(Runtime)
Available on non-
miri
and Unix and crate feature mio
only.Default(Runtime)
Implementations§
source§impl NativeRtInstance
impl NativeRtInstance
sourcepub fn register_stream(&self, stream: TcpStream) -> NativeTcpStream
pub fn register_stream(&self, stream: TcpStream) -> NativeTcpStream
Registers a non-seekable I/O stream
TODO: this perhaps should be private. We can’t expose register_file publicly, because on iocp, files need to be opened with appropriate (unchangeable!) flags. Perhaps we should mirror this with streams.
pub fn cancel_all_ops(&self)
Trait Implementations§
source§impl Debug for NativeRtInstance
impl Debug for NativeRtInstance
source§impl From<NativeRtInstance> for NativeRt
impl From<NativeRtInstance> for NativeRt
source§fn from(instance: NativeRtInstance) -> Self
fn from(instance: NativeRtInstance) -> Self
Converts to this type from the input type.
source§impl IoBackend for NativeRtInstance
impl IoBackend for NativeRtInstance
type Backend = dyn Future<Output = ()> + Send
source§fn polling_handle(&self) -> Option<PollingHandle<'_>>
fn polling_handle(&self) -> Option<PollingHandle<'_>>
Gets handle to the backing event system. Read more
source§fn get_backend(&self) -> BackendHandle<'_, Self::Backend>
fn get_backend(&self) -> BackendHandle<'_, Self::Backend>
Acquires exclusive handle to IO backend. Read more
source§impl Tcp for NativeRtInstance
impl Tcp for NativeRtInstance
§type StreamHandle = NativeTcpStream
type StreamHandle = NativeTcpStream
Available on crate feature
std
only.§type ListenerHandle = NativeTcpListener
type ListenerHandle = NativeTcpListener
Available on crate feature
std
only.§type ConnectFuture<'a, A: ToSocketAddrs + Send + 'a> = NativeTcpConnectFuture<'a, A>
type ConnectFuture<'a, A: ToSocketAddrs + Send + 'a> = NativeTcpConnectFuture<'a, A>
Available on crate feature
std
only.§type BindFuture<'a, A: ToSocketAddrs + Send + 'a> = Ready<Result<NativeTcpListener, Error>>
type BindFuture<'a, A: ToSocketAddrs + Send + 'a> = Ready<Result<NativeTcpListener, Error>>
Available on crate feature
std
only.source§fn connect<'a, A: ToSocketAddrs + Send + 'a>(
&'a self,
addrs: A
) -> Self::ConnectFuture<'a, A>
fn connect<'a, A: ToSocketAddrs + Send + 'a>( &'a self, addrs: A ) -> Self::ConnectFuture<'a, A>
Available on crate feature
std
only.source§fn bind<'a, A: ToSocketAddrs + Send + 'a>(
&'a self,
addrs: A
) -> Self::BindFuture<'a, A>
fn bind<'a, A: ToSocketAddrs + Send + 'a>( &'a self, addrs: A ) -> Self::BindFuture<'a, A>
Available on crate feature
std
only.Auto Trait Implementations§
impl !RefUnwindSafe for NativeRtInstance
impl Send for NativeRtInstance
impl Sync for NativeRtInstance
impl Unpin for NativeRtInstance
impl !UnwindSafe for NativeRtInstance
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
Mutably borrows from an owned value. Read more
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
source§impl<T, Handle> IoBackendExt<Handle> for T
impl<T, Handle> IoBackendExt<Handle> for T
source§fn with_backend<F>(
&self,
future: F
) -> (WithBackend<'_, Self::Backend, F>, Option<PollingHandle<'_>>)where
F: Future,
fn with_backend<F>(
&self,
future: F
) -> (WithBackend<'_, Self::Backend, F>, Option<PollingHandle<'_>>)where
F: Future,
Builds a composite future that also polls the backend future. Read more