[][src]Struct craftio_rs::CraftConnection

pub struct CraftConnection<R, W> { /* fields omitted */ }

Implementations

impl<R, W> CraftConnection<R, W>[src]

pub fn into_split(self) -> (CraftReader<R>, CraftWriter<W>)[src]

pub fn split(&mut self) -> (&mut CraftReader<R>, &mut CraftWriter<W>)[src]

impl CraftConnection<BufReader<TcpStream>, TcpStream>[src]

pub fn connect_server_std<A>(to: A) -> Result<Self, Error> where
    A: ToSocketAddrs
[src]

pub fn wrap_client_stream_std(stream: TcpStream) -> Result<Self, Error>[src]

pub fn from_std(
    s1: TcpStream,
    read_direction: PacketDirection
) -> Result<Self, Error>
[src]

pub fn from_std_with_state(
    s1: TcpStream,
    read_direction: PacketDirection,
    state: State
) -> Result<Self, Error>
[src]

impl CraftConnection<BufReader<OwnedReadHalf>, OwnedWriteHalf>[src]

pub async fn connect_server_tokio<A>(to: A) -> Result<Self, TokioIoError> where
    A: TokioToSocketAddrs
[src]

impl CraftConnection<OwnedReadHalf, OwnedWriteHalf>[src]

pub async fn connect_server_tokio_unbuffered<A>(
    to: A
) -> Result<Self, TokioIoError> where
    A: TokioToSocketAddrs
[src]

impl<R, W> CraftConnection<R, W> where
    CraftReader<R>: CraftAsyncReader,
    CraftWriter<W>: CraftAsyncWriter
[src]

pub fn from_async(tuple: (R, W), read_direction: PacketDirection) -> Self[src]

pub fn from_async_with_state(
    tuple: (R, W),
    read_direction: PacketDirection,
    state: State
) -> Self
[src]

Trait Implementations

impl<R, W> CraftAsyncReader for CraftConnection<R, W> where
    CraftReader<R>: CraftAsyncReader,
    R: Send + Sync,
    CraftWriter<W>: CraftAsyncWriter,
    W: Send + Sync
[src]

impl<R, W> CraftAsyncWriter for CraftConnection<R, W> where
    CraftReader<R>: CraftAsyncReader,
    R: Send + Sync,
    CraftWriter<W>: CraftAsyncWriter,
    W: Send + Sync
[src]

impl<R, W> CraftIo for CraftConnection<R, W>[src]

impl<R, W> CraftSyncReader for CraftConnection<R, W> where
    CraftReader<R>: CraftSyncReader,
    CraftWriter<W>: CraftSyncWriter
[src]

impl<R, W> CraftSyncWriter for CraftConnection<R, W> where
    CraftReader<R>: CraftSyncReader,
    CraftWriter<W>: CraftSyncWriter
[src]

impl<R, W> CraftWrapper<(R, W)> for CraftConnection<R, W>[src]

Auto Trait Implementations

impl<R, W> RefUnwindSafe for CraftConnection<R, W> where
    R: RefUnwindSafe,
    W: RefUnwindSafe
[src]

impl<R, W> Send for CraftConnection<R, W> where
    R: Send,
    W: Send
[src]

impl<R, W> Sync for CraftConnection<R, W> where
    R: Sync,
    W: Sync
[src]

impl<R, W> Unpin for CraftConnection<R, W> where
    R: Unpin,
    W: Unpin
[src]

impl<R, W> UnwindSafe for CraftConnection<R, W> where
    R: UnwindSafe,
    W: UnwindSafe
[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,