pub struct RootManifest {
pub metadata_url: Option<String>,
pub available_packages: Option<Vec<String>>,
pub available_package_patterns: Option<Vec<String>>,
pub providers_url: Option<String>,
pub extra: Map<String, Value>,
}Expand description
The root packages.json of a Composer v2 repository. Tells a client
where to fetch per-package metadata (metadata_url,
a template with a %package% placeholder) and, optionally, which
packages exist. Unknown root keys round-trip through
extra.
Fields§
§metadata_url: Option<String>metadata-url — the per-package metadata template, e.g.
https://repo.test/p2/%package%.json.
available_packages: Option<Vec<String>>available-packages — the full list of package names served.
available_package_patterns: Option<Vec<String>>available-package-patterns — wildcard patterns for served names.
providers_url: Option<String>providers-url — the legacy v1 provider template, if advertised.
extra: Map<String, Value>Any other root keys (e.g. notify-batch, search, mirrors,
provider-includes), preserved verbatim on round-trip.
Implementations§
Source§impl RootManifest
impl RootManifest
Sourcepub fn metadata_template(base_url: &str) -> String
pub fn metadata_template(base_url: &str) -> String
The v2 metadata-url template for a repository served at
base_url: <base>/p2/%package%.json (trailing slash trimmed).
Trait Implementations§
Source§impl Clone for RootManifest
impl Clone for RootManifest
Source§fn clone(&self) -> RootManifest
fn clone(&self) -> RootManifest
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RootManifest
impl Debug for RootManifest
Source§impl Default for RootManifest
impl Default for RootManifest
Source§fn default() -> RootManifest
fn default() -> RootManifest
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for RootManifest
impl<'de> Deserialize<'de> for RootManifest
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 RootManifest
impl RefUnwindSafe for RootManifest
impl Send for RootManifest
impl Sync for RootManifest
impl Unpin for RootManifest
impl UnsafeUnpin for RootManifest
impl UnwindSafe for RootManifest
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