NativeTcpStream

Enum NativeTcpStream 

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

Variants§

§

IoUring(TcpStream)

Available on non-miri and Linux and crate feature io-uring only.
§

Mio(TcpStream)

Available on non-miri and Unix and crate feature mio only.
§

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.

Source§

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

Source§

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<'a, T>( &'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<'a, T>( &'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>,

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

Source§

impl<T> StreamHandle for T