pub struct Proxy { /* private fields */ }Expand description
The proxy of a host’s registries.
Implementations§
Source§impl Proxy
impl Proxy
Sourcepub fn new(options: Options, client: Client) -> Self
pub fn new(options: Options, client: Client) -> Self
The proxy of options’ registries, its tarballs no larger than its size cap, fetched with client.
Sourcepub fn answer(&self, path: &str, base: &str) -> Response<Vec<u8>>
pub fn answer(&self, path: &str, base: &str) -> Response<Vec<u8>>
The answer to a GET of path, what follows the proxy’s base, which is base in full (ending in /): a
pack’s metadata, its tarballs’ URLs rewritten to the proxy’s own, or a tarball’s bytes. A pack no registry is
configured for, or one the registry hasn’t, is 404; a registry that fails, 502.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Proxy
impl !UnwindSafe for Proxy
impl Forget for Proxy
impl Freeze for Proxywhere
*const LeafNode<String, String> is !null: Freeze,
PhantomData<(Owned, LeafOrInternal)>: Freeze,
PhantomData<Box<(String, String)>>: Freeze,
*const u8 is !null: Freeze,
PhantomData<Denied>: Freeze,
*const ArcInner<Config> is !null: Freeze,
PhantomData<ArcInner<Config>>: Freeze,
*const ArcInner<ConnectionPool> is !null: Freeze,
PhantomData<ArcInner<ConnectionPool>>: Freeze,
*const ArcInner<dyn Resolver> is !null: Freeze,
PhantomData<ArcInner<dyn Resolver>>: Freeze,
*const ArcInner<dyn Fn(&ConnectionDetails<'_>) -> Result<Box<dyn Transport>, Error> + Sync + Send> is !null: Freeze,
PhantomData<ArcInner<dyn Fn(&ConnectionDetails<'_>) -> Result<Box<dyn Transport>, Error> + Sync + Send>>: Freeze,
impl Move for Proxy
impl Send for Proxy
impl Sync for Proxy
impl Unpin for Proxy
impl UnsafeUnpin for Proxywhere
*const LeafNode<String, String> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(String, String)>>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<Denied>: UnsafeUnpin,
*const ArcInner<Config> is !null: UnsafeUnpin,
PhantomData<ArcInner<Config>>: UnsafeUnpin,
*const ArcInner<ConnectionPool> is !null: UnsafeUnpin,
PhantomData<ArcInner<ConnectionPool>>: UnsafeUnpin,
*const ArcInner<dyn Resolver> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn Resolver>>: UnsafeUnpin,
*const ArcInner<dyn Fn(&ConnectionDetails<'_>) -> Result<Box<dyn Transport>, Error> + Sync + Send> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn Fn(&ConnectionDetails<'_>) -> Result<Box<dyn Transport>, Error> + Sync + Send>>: UnsafeUnpin,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more