pub struct ProxyNode { /* private fields */ }Expand description
A validated proxy endpoint. Debug output omits credentials and display names.
Serialization includes credentials so caches can restore functioning clients.
Treat serialized nodes and Self::url as secrets.
Implementations§
Source§impl ProxyNode
impl ProxyNode
Sourcepub fn from_url(value: &str) -> Result<Self>
pub fn from_url(value: &str) -> Result<Self>
Parse an HTTP(S) or SOCKS5(H) URL. URI fragments become the display name.
Sourcepub fn with_name(self, name: impl Into<String>) -> Self
pub fn with_name(self, name: impl Into<String>) -> Self
Override the human-readable name; it has no effect on node identity.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ProxyNode
impl<'de> Deserialize<'de> for ProxyNode
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ProxyNode
impl StructuralPartialEq for ProxyNode
Auto Trait Implementations§
impl Freeze for ProxyNode
impl RefUnwindSafe for ProxyNode
impl Send for ProxyNode
impl Sync for ProxyNode
impl Unpin for ProxyNode
impl UnsafeUnpin for ProxyNode
impl UnwindSafe for ProxyNode
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