pub enum Request {
Bind(Address),
Connect(Address),
Associate(Address),
}Variants§
Trait Implementations§
Source§impl Streamable for Request
impl Streamable for Request
Source§async fn read<T>(stream: &mut T) -> Result<Self>
async fn read<T>(stream: &mut T) -> Result<Self>
§Request
§Stream
+-----+-----+-------+------+----------+----------+
| VER | CMD | RSV | ATYP | DST.ADDR | DST.PORT |
+-----+-----+-------+------+----------+----------+
| 1 | 1 | X'00' | 1 | Variable | 2 |
+-----+-----+-------+------+----------+----------+§Where
o VER protocol version: X’05’
o CMD
o CONNECT X’01’
o BIND X’02’
o UDP ASSOCIATE X’03’
o RSV RESERVED
o ATYP address type of following address
o IP V4 address: X’01’
o DOMAINNAME: X’03’
o IP V6 address: X’04’
o DST.ADDR desired destination address
o DST.PORT desired destination port in network octet
order
fn write<T>(&self, stream: &mut T) -> impl Future<Output = Result<()>> + Send
impl StructuralPartialEq for Request
Auto Trait Implementations§
impl Freeze for Request
impl RefUnwindSafe for Request
impl Send for Request
impl Sync for Request
impl Unpin for Request
impl UnwindSafe for Request
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more