[−][src]Struct protocol::wire::stream::Connection
A stream-based connection.
Fields
stream: S
transport: Simple
middleware: M
settings: Settings
_a: PhantomData<P>
Implementations
impl<P, S, M> Connection<P, S, M> where
P: Parcel,
S: Read + Write,
M: Pipeline,
[src]
P: Parcel,
S: Read + Write,
M: Pipeline,
pub fn new(stream: S, middleware: M, settings: Settings) -> Self
[src]
Creates a new connection.
pub fn process_incoming_data(&mut self) -> Result<(), Error>
[src]
Processes any incoming data in the stream.
pub fn receive_packet(&mut self) -> Result<Option<P>, Error>
[src]
Attempts to receive a packet.
pub fn send_packet(&mut self, packet: &P) -> Result<(), Error>
[src]
Sends a packet.
pub fn into_inner(self) -> S
[src]
Trait Implementations
impl<P: Debug + Parcel, S: Debug + Read + Write, M: Debug + Pipeline> Debug for Connection<P, S, M>
[src]
Auto Trait Implementations
impl<P, S, M> RefUnwindSafe for Connection<P, S, M> where
M: RefUnwindSafe,
P: RefUnwindSafe,
S: RefUnwindSafe,
M: RefUnwindSafe,
P: RefUnwindSafe,
S: RefUnwindSafe,
impl<P, S, M> Send for Connection<P, S, M> where
M: Send,
P: Send,
S: Send,
M: Send,
P: Send,
S: Send,
impl<P, S, M> Sync for Connection<P, S, M> where
M: Sync,
P: Sync,
S: Sync,
M: Sync,
P: Sync,
S: Sync,
impl<P, S, M> Unpin for Connection<P, S, M> where
M: Unpin,
P: Unpin,
S: Unpin,
M: Unpin,
P: Unpin,
S: Unpin,
impl<P, S, M> UnwindSafe for Connection<P, S, M> where
M: UnwindSafe,
P: UnwindSafe,
S: UnwindSafe,
M: UnwindSafe,
P: UnwindSafe,
S: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,