MCPcopy Create free account
hub / github.com/Recordscript/recordscript / maybe_auth

Method maybe_auth

libs/hbb_common/src/proxy.rs:151–157  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

149
150impl ProxyScheme {
151 pub fn maybe_auth(&self) -> Option<&Auth> {
152 match self {
153 ProxyScheme::Http { auth, .. }
154 | ProxyScheme::Https { auth, .. }
155 | ProxyScheme::Socks5 { auth, .. } => auth.as_ref(),
156 }
157 }
158
159 fn socks5(addr: SocketAddr) -> Result<Self, ProxyError> {
160 Ok(ProxyScheme::Socks5 {

Callers 2

connectMethod · 0.80
make_requestMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected