Skip to main content

Network

Trait Network 

Source
pub trait Network {
    type Reader: NetworkRead;
    type Writer: NetworkWrite;

    // Required method
    fn split(&mut self) -> (&mut Self::Reader, &mut Self::Writer);
}
Expand description

A bidirectional network layer that can be split into independent read and write halves.

Required Associated Types§

Source

type Reader: NetworkRead

Read half type.

Source

type Writer: NetworkWrite

Write half type.

Required Methods§

Source

fn split(&mut self) -> (&mut Self::Reader, &mut Self::Writer)

Split into independent read and write halves.

Implementations on Foreign Types§

Source§

impl<R: NetworkRead, W: NetworkWrite> Network for (R, W)

Source§

type Reader = R

Source§

type Writer = W

Source§

fn split(&mut self) -> (&mut R, &mut W)

Implementors§