pub struct Response {
pub reply: Reply,
pub address: Address,
}Expand description
SOCKS5 response
+-----+-----+-------+------+----------+----------+
| VER | REP | RSV | ATYP | BND.ADDR | BND.PORT |
+-----+-----+-------+------+----------+----------+
| 1 | 1 | X'00' | 1 | Variable | 2 |
+-----+-----+-------+------+----------+----------+Fields§
§reply: Reply§address: AddressImplementations§
Source§impl Response
impl Response
pub const fn new(reply: Reply, address: Address) -> Self
pub async fn read_from<R>(r: &mut R) -> Result<Self, Error>
pub async fn write_to<W>(&self, w: &mut W) -> Result<(), IoError>where
W: AsyncWrite + Unpin,
pub fn write_to_buf<B: BufMut>(&self, buf: &mut B)
pub fn serialized_len(&self) -> usize
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Response
impl RefUnwindSafe for Response
impl Send for Response
impl Sync for Response
impl Unpin for Response
impl UnwindSafe for Response
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