pub struct TUIC {
pub host: String,
pub port: u32,
pub auth: String,
pub parameters: Option<HashMap<String, String>>,
}Expand description
Represents a TUIC proxy.
Fields§
§host: StringThe host address of the TUIC proxy.
port: u32The port number for the TUIC proxy.
auth: StringThe authentication string associated with the TUIC proxy.
parameters: Option<HashMap<String, String>>Additional parameters associated with the TUIC proxy.
Implementations§
Source§impl TUIC
impl TUIC
Sourcepub fn to_url(&self) -> String
pub fn to_url(&self) -> String
Converts the TUIC proxy information into a TUIC URL.
§Example
use proxy_scraper::tuic::TUIC;
use std::collections::HashMap;
let proxy = TUIC {
host: "example.com".to_string(),
port: 443,
auth: "auth123".to_string(),
parameters: Some(HashMap::new()), // Insert additional parameters here
};
let url = proxy.to_url();
assert_eq!(url, "tuic://auth123@example.com:443?");Trait Implementations§
Source§impl<'de> Deserialize<'de> for TUIC
impl<'de> Deserialize<'de> for TUIC
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
Auto Trait Implementations§
impl Freeze for TUIC
impl RefUnwindSafe for TUIC
impl Send for TUIC
impl Sync for TUIC
impl Unpin for TUIC
impl UnwindSafe for TUIC
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