Struct socks5_impl::protocol::handshake::HandshakeResponse
source · pub struct HandshakeResponse {
pub method: HandshakeMethod,
}
Expand description
SOCKS5 handshake response
+-----+--------+
| VER | METHOD |
+-----+--------+
| 1 | 1 |
+-----+--------+
Fields§
§method: HandshakeMethod
Implementations§
source§impl HandshakeResponse
impl HandshakeResponse
pub fn new(method: HandshakeMethod) -> Self
pub async fn from_stream<R: AsyncRead + Unpin>(r: &mut R) -> Result<Self>
pub async fn write_to<W: AsyncWrite + Unpin>(&self, w: &mut W) -> Result<()>
pub fn write_to_buf<B: BufMut>(&self, buf: &mut B)
pub fn serialized_len(&self) -> usize
Trait Implementations§
source§impl Clone for HandshakeResponse
impl Clone for HandshakeResponse
source§fn clone(&self) -> HandshakeResponse
fn clone(&self) -> HandshakeResponse
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl RefUnwindSafe for HandshakeResponse
impl Send for HandshakeResponse
impl Sync for HandshakeResponse
impl Unpin for HandshakeResponse
impl UnwindSafe for HandshakeResponse
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