Struct kitsune_p2p_proxy::ProxyUrl [−][src]
pub struct ProxyUrl { /* fields omitted */ }
Expand description
Utility for dealing with proxy urls. Proxy URLs are like super-urls… they need to be able to compose a sub or base-transport url, while adding a new scheme and a tls certificate digest, without shadowing any info.
We could do this by percent encoding the base-url into a query string or path segment, but that is not very user-friendly looking.
Instead, we extract some info from the base-url into path
segments, and include everything else after a special path segment marker
--
.
Optional extracted items (order matters):
h
- host:/h/[host-name-here]
p
- port:/p/[port-here]
u
- username:/u/[user-name-here]
w
- password:/w/[password-here]
Implementations
Create a new proxy url from a full url str.
Create a new proxy url from a base + tls cert digest.
Get the base url this proxy is addressable at as a &str reference.
Get the full url referencing this proxy as a &str reference.
Convert this proxy url instance into a (BaseUrl, FullUrl) tuple.
Methods from Deref<Target = Url2>
Trait Implementations
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Auto Trait Implementations
impl RefUnwindSafe for ProxyUrl
impl UnwindSafe for ProxyUrl
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.
fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more