pub struct Metadata {Show 17 fields
pub name: String,
pub home: String,
pub sources: Vec<String>,
pub version: String,
pub description: String,
pub keywords: Vec<String>,
pub maintainers: Vec<Option<Maintainer>>,
pub icon: String,
pub api_version: String,
pub condition: String,
pub tags: String,
pub app_version: String,
pub deprecated: bool,
pub annotations: BTreeMap<String, String>,
pub kube_version: String,
pub dependencies: Vec<Option<Dependency>>,
pub chart_type: String,
}Expand description
The Chart.yaml model. A YAML null inside maintainers or dependencies is kept as
None so that Metadata::validate can reject it like Helm.
Fields§
§name: StringChart name. Required.
home: StringProject home page.
sources: Vec<String>Source code URLs.
version: StringChart version, semver 2 (leniently: 1, v1.2 are accepted). Required.
description: StringOne-sentence description.
keywords: Vec<String>Keywords.
maintainers: Vec<Option<Maintainer>>Maintainers.
icon: StringIcon URL.
api_version: StringChart API version: v1, v2 (v3 loads but Helm 4.3 actions reject it). Required.
condition: StringCondition that enables the chart (a string, as in Helm’s Metadata).
Tags that enable the chart (a string, as in Helm’s Metadata).
app_version: StringVersion of the application the chart deploys.
deprecated: boolWhether the chart is deprecated.
annotations: BTreeMap<String, String>Annotations, uninterpreted by Helm.
kube_version: StringSemver constraint on the Kubernetes version.
dependencies: Vec<Option<Dependency>>Dependencies (apiVersion v2; v1 charts use requirements.yaml).
chart_type: Stringapplication (default) or library.
Implementations§
Source§impl Metadata
impl Metadata
Sourcepub fn validate(&mut self) -> Result<(), ValidationError>
pub fn validate(&mut self) -> Result<(), ValidationError>
Sanitises string fields and checks the metadata like Helm’s Metadata.Validate.
Like Helm this normalises in place (whitespace becomes a space, non-printable characters
are dropped) before checking apiVersion, name (., .. and path separators are
rejected), semver version, type, maintainers and dependencies (alias characters, a name
or alias used twice).
§Errors
The first violation, with Helm’s message.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Metadata
impl<'de> Deserialize<'de> for Metadata
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 StructuralPartialEq for Metadata
Auto Trait Implementations§
impl Forget for Metadata
impl Freeze for Metadatawhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<String>: Freeze,
PhantomData<Option<Maintainer>>: Freeze,
*const LeafNode<String, String> is !null: Freeze,
PhantomData<(Owned, LeafOrInternal)>: Freeze,
PhantomData<Box<(String, String)>>: Freeze,
PhantomData<Option<Dependency>>: Freeze,
impl Move for Metadata
impl RefUnwindSafe for Metadata
impl Send for Metadata
impl Sync for Metadata
impl Unpin for Metadata
impl UnsafeUnpin for Metadatawhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
PhantomData<Option<Maintainer>>: UnsafeUnpin,
*const LeafNode<String, String> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(String, String)>>: UnsafeUnpin,
PhantomData<Option<Dependency>>: UnsafeUnpin,
impl UnwindSafe for Metadatawhere
RawVecInner: UnwindSafe,
BTreeMap<String, String>: UnwindSafe,
BTreeMap<String, Value>: UnwindSafe,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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<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> ⓘ
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> ⓘ
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