pub enum NativeTcpStream {
    IoUring(TcpStream),
    Mio(TcpStream),
    Default(TcpStream),
}
Available on crate feature native only.

Variants§

§

IoUring(TcpStream)

§

Mio(TcpStream)

§

Default(TcpStream)

Trait Implementations§

source§

impl Drop for NativeTcpStream

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl PacketIo<Read, NoPos> for NativeTcpStream

source§

fn send_io(&self, param: NoPos, view: BoundPacketView<Read>)

Send I/O request to the backend. Read more
source§

impl PacketIo<Write, NoPos> for NativeTcpStream

source§

fn send_io(&self, param: NoPos, view: BoundPacketView<Write>)

Send I/O request to the backend. Read more
source§

impl TcpStreamHandle for NativeTcpStream

source§

fn local_addr(&self) -> MfioResult<SocketAddr>

Available on crate feature std only.
source§

fn peer_addr(&self) -> MfioResult<SocketAddr>

Available on crate feature std only.
source§

fn shutdown(&self, how: Shutdown) -> MfioResult<()>

Available on crate feature std only.

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> AsyncRead<NoPos> for T
where T: IoRead<NoPos>,

source§

fn read<'a>( &'a self, buf: &'a mut [u8] ) -> AsyncIoFut<'a, T, Write, NoPos, &'a mut [u8]>

source§

fn read_to_end<'a>( &'a self, buf: &'a mut Vec<u8> ) -> StdReadToEndFut<'a, T, NoPos>

source§

impl<T> AsyncWrite<NoPos> for T
where T: IoWrite<NoPos>,

source§

fn write<'a>( &'a self, buf: &'a [u8] ) -> AsyncIoFut<'a, T, Read, NoPos, &'a [u8]>

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

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, F> From2<T> for F
where T: Into<F>,

§

fn from2(other: T) -> F

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<Pos, T> IoRead<Pos> for T
where Pos: 'static, T: PacketIo<Write, Pos>,

source§

fn read_raw<'a, T>( &'a self, pos: Pos, packet: T ) -> IoFut<'a, Self, Write, Pos, T>
where T: PacketStore<'a, Write>,

Forwards a read request to the I/O object. Read more
source§

fn read_all<'a, T>( &'a self, pos: Pos, packet: T ) -> IoFullFut<'a, Self, Write, Pos, T>
where T: IntoPacket<'a, Write>,

Read all data into the given object.
source§

fn read_into<T, 'a>( &'a self, pos: Pos, data: &'a mut MaybeUninit<T> ) -> IoFullFut<'a, Self, Write, Pos, &'a mut [MaybeUninit<u8>]>
where T: Pod,

Reads data into a Pod struct.
source§

fn read<T>(&self, pos: Pos) -> IoReadFut<'_, Self, Pos, T>
where T: Pod,

Reads data into a new Pod struct.
source§

fn read_to_end<'a>( &'a self, pos: Pos, buf: &'a mut Vec<u8> ) -> ReadToEndFut<'a, Self, Pos>
where Pos: CopyPos,

Reads data into given buffer until a gap is reached.
source§

impl<Pos, T> IoWrite<Pos> for T
where Pos: 'static, T: PacketIo<Read, Pos>,

source§

fn write_raw<'a, T>( &'a self, pos: Pos, packet: T ) -> IoFut<'a, Self, Read, Pos, T>
where T: PacketStore<'a, Read>,

Forwards a write request to the I/O object. Read more
source§

fn write_all<'a, T>( &'a self, pos: Pos, packet: T ) -> IoFullFut<'a, Self, Read, Pos, T>
where T: IntoPacket<'a, Read>,

Writes all data in the given packet to destination.
source§

fn write<T, 'a>( &'a self, pos: Pos, data: &'a T ) -> IoFullFut<'a, Self, Read, Pos, &'a [u8]>

Writes a pod object into to destination.
source§

impl<T, Perms, Param> PacketIoExt<Perms, Param> for T
where T: PacketIo<Perms, Param>, Perms: PacketPerms,

source§

fn io<'a, T>( &'a self, param: Param, packet: T ) -> IoFut<'a, Self, Perms, Param, T>
where T: PacketStore<'a, Perms>,

source§

fn io_to<'a, T, O>( &'a self, param: Param, packet: T, output: O ) -> IoToFut<'a, Self, Perms, Param, T, O>
where T: PacketStore<'a, Perms>, O: OutputStore<'a, Perms>,

source§

fn io_to_stream<'a, T, O>( &'a self, param: Param, packet: T, container: O ) -> IoToFut<'a, Self, Perms, Param, T, PacketStream<'a, O, Perms>>
where T: PacketStore<'a, Perms> + 'a, O: PushPop<(PacketView<'a, Perms>, Option<Error>)> + 'a,

source§

fn io_to_fn<'a, T, F>( &'a self, param: Param, packet: T, func: F ) -> IoToFut<'a, Self, Perms, Param, T, OutputFunction<F, Perms>>
where T: PacketStore<'a, Perms>, F: Fn(PacketView<'a, Perms>, Option<Error>) + Send + Sync + 'a,

source§

impl<T, Perms> StreamIoExt<Perms> for T
where T: PacketIo<Perms, NoPos>, Perms: PacketPerms,

source§

fn stream_io<'a, T>(&'a self, packet: T) -> IoFut<'a, Self, Perms, NoPos, T>
where T: PacketStore<'a, Perms>,

source§

fn stream_io_to<'a, T, O>( &'a self, packet: T, output: O ) -> IoToFut<'a, Self, Perms, NoPos, T, O>
where T: PacketStore<'a, Perms>, O: OutputStore<'a, Perms>,

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

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>,

§

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<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
§

impl<T> GenericTypeBounds for T

source§

impl<T> StreamHandle for T