pub struct Socks5Credentials { /* private fields */ }Available on crate feature
socks5 only.Expand description
RFC 1929 username/password credentials.
The password is redacted from the Debug output.
Implementations§
Source§impl Socks5Credentials
impl Socks5Credentials
Sourcepub fn new(
username: &str,
password: &str,
) -> Result<Socks5Credentials, Socks5CredentialsError>
pub fn new( username: &str, password: &str, ) -> Result<Socks5Credentials, Socks5CredentialsError>
Builds credentials, validating both fields against the 255-byte limit RFC 1929 imposes on each.
Trait Implementations§
Source§impl Clone for Socks5Credentials
impl Clone for Socks5Credentials
Source§fn clone(&self) -> Socks5Credentials
fn clone(&self) -> Socks5Credentials
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 Socks5Credentials
impl RefUnwindSafe for Socks5Credentials
impl Send for Socks5Credentials
impl Sync for Socks5Credentials
impl Unpin for Socks5Credentials
impl UnsafeUnpin for Socks5Credentials
impl UnwindSafe for Socks5Credentials
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