pub struct PackageIndexConfig {
pub base_url: String,
}Expand description
Configuration for the package-index client.
Pure data — the HTTP client that consumes it lives in zlayer-toolchain.
Construct with PackageIndexConfig::from_env to honor
PACKAGE_INDEX_URL_ENV, falling back to DEFAULT_PACKAGE_INDEX_URL.
Fields§
§base_url: StringBase URL of the index (no trailing slash), e.g. https://packages.zlayer.dev.
Implementations§
Source§impl PackageIndexConfig
impl PackageIndexConfig
Sourcepub fn new(base_url: impl Into<String>) -> Self
pub fn new(base_url: impl Into<String>) -> Self
Build a config from an explicit base URL (trailing slashes trimmed).
Sourcepub fn from_env() -> Self
pub fn from_env() -> Self
Build a config from PACKAGE_INDEX_URL_ENV, defaulting to
DEFAULT_PACKAGE_INDEX_URL when the variable is unset or empty.
Sourcepub fn linux_request_url(&self) -> String
pub fn linux_request_url(&self) -> String
URL of the Linux “unfulfilled request” endpoint ({base_url}/linux/request).
The builder’s cross-search harvest POSTs here (HMAC-signed) when a Linux package name maps to no Homebrew/Chocolatey equivalent, so the index can backfill the mapping for a future native build.
Sourcepub fn choco_hint_url(&self) -> String
pub fn choco_hint_url(&self) -> String
URL of the Chocolatey cache-warm hint endpoint ({base_url}/choco-hint).
The Windows image resolver POSTs here (HMAC-signed) to nudge the index to keep a distro/shard’s Chocolatey mappings warm.
Trait Implementations§
Source§impl Clone for PackageIndexConfig
impl Clone for PackageIndexConfig
Source§fn clone(&self) -> PackageIndexConfig
fn clone(&self) -> PackageIndexConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PackageIndexConfig
impl Debug for PackageIndexConfig
Source§impl Default for PackageIndexConfig
impl Default for PackageIndexConfig
Source§impl<'de> Deserialize<'de> for PackageIndexConfig
impl<'de> Deserialize<'de> for PackageIndexConfig
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>,
impl Eq for PackageIndexConfig
Source§impl PartialEq for PackageIndexConfig
impl PartialEq for PackageIndexConfig
Source§fn eq(&self, other: &PackageIndexConfig) -> bool
fn eq(&self, other: &PackageIndexConfig) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for PackageIndexConfig
impl Serialize for PackageIndexConfig
impl StructuralPartialEq for PackageIndexConfig
Auto Trait Implementations§
impl Freeze for PackageIndexConfig
impl RefUnwindSafe for PackageIndexConfig
impl Send for PackageIndexConfig
impl Sync for PackageIndexConfig
impl Unpin for PackageIndexConfig
impl UnsafeUnpin for PackageIndexConfig
impl UnwindSafe for PackageIndexConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.