pub struct AuthMethodAdvertisementOption {
pub initial_data_length: u16,
pub methods: Vec<AuthMethod>,
}
Expand description
Represents the authentication methods supported by the server.
Fields§
§initial_data_length: u16
§methods: Vec<AuthMethod>
Implementations§
Source§impl AuthMethodAdvertisementOption
impl AuthMethodAdvertisementOption
Sourcepub fn new(initial_data_length: u16, methods: Vec<AuthMethod>) -> Self
pub fn new(initial_data_length: u16, methods: Vec<AuthMethod>) -> Self
Constructs a new AuthMethodAdvertisementOption
.
Sourcepub fn wrap(self) -> SocksOption
pub fn wrap(self) -> SocksOption
Wraps the instance into a SocksOption
.
Sourcepub fn from_socks_bytes(bytes: Vec<u8>) -> Result<SocksOption>
pub fn from_socks_bytes(bytes: Vec<u8>) -> Result<SocksOption>
Deserializes the option from bytes.
Sourcepub fn into_socks_bytes(self) -> Vec<u8>
pub fn into_socks_bytes(self) -> Vec<u8>
Serializes the option into bytes.
Trait Implementations§
Source§impl Clone for AuthMethodAdvertisementOption
impl Clone for AuthMethodAdvertisementOption
Source§fn clone(&self) -> AuthMethodAdvertisementOption
fn clone(&self) -> AuthMethodAdvertisementOption
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 Freeze for AuthMethodAdvertisementOption
impl RefUnwindSafe for AuthMethodAdvertisementOption
impl Send for AuthMethodAdvertisementOption
impl Sync for AuthMethodAdvertisementOption
impl Unpin for AuthMethodAdvertisementOption
impl UnwindSafe for AuthMethodAdvertisementOption
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