Struct socks5_impl::protocol::handshake::HandshakeRequest
source · pub struct HandshakeRequest {
pub methods: Vec<HandshakeMethod>,
}
Expand description
SOCKS5 handshake request
+-----+----------+----------+
| VER | NMETHODS | METHODS |
+-----+----------+----------+
| 1 | 1 | 1 to 255 |
+-----+----------+----------|
Fields§
§methods: Vec<HandshakeMethod>
Implementations§
source§impl HandshakeRequest
impl HandshakeRequest
pub fn new(methods: Vec<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 HandshakeRequest
impl Clone for HandshakeRequest
source§fn clone(&self) -> HandshakeRequest
fn clone(&self) -> HandshakeRequest
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 HandshakeRequest
impl Send for HandshakeRequest
impl Sync for HandshakeRequest
impl Unpin for HandshakeRequest
impl UnwindSafe for HandshakeRequest
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