Skip to main content

DescriptionYml

Struct DescriptionYml 

Source
#[non_exhaustive]
pub struct DescriptionYml {
Show 16 fields pub name: String, pub description: String, pub version: Option<String>, pub language: String, pub build: String, pub license: String, pub requires_toolchains: String, pub excluded_platforms: String, pub opt_in_platforms: String, pub maintainers: Vec<String>, pub github: String, pub git_ref: String, pub git_ref_next: String, pub git_ref_variegata: String, pub git_ref_andium: String, pub warnings: Vec<String>,
}
Expand description

A validated representation of a DuckDB community extension description.yml.

Construct via parse_description_yml or validate_description_yml_str.

Every field was validated during construction. Things the community build accepts but that are probably not what the author meant — a licence outside quack-rs’s SPDX shortlist, a list-form excluded_platforms, the British spelling licence: — do not fail the parse; they are reported in warnings.

#[non_exhaustive]: new fields can be added without a breaking release, so read fields by name rather than destructuring.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§name: String

Extension name (validated: a lowercase letter, then lowercase letters, digits and underscores).

§description: String

One-line description of the extension.

§version: Option<String>

Extension version, when the file declares one (validated: see validate_extension_version).

Optional: the community build never reads it (scripts/build.py in duckdb/community-extensions takes the version from the extension’s own repository), and 12 of the 346 published files omit it.

§language: String

Implementation language (for Rust extensions: "Rust").

§build: String

Build system (for Rust extensions: "cargo").

§license: String

The declared license — an SPDX identifier or expression when the file follows the convention. Only presence is enforced; see warnings.

§requires_toolchains: String

Semicolon-separated required toolchains (must include "rust" for Rust extensions).

§excluded_platforms: String

Platforms to exclude from CI builds, semicolon-separated. Empty means no exclusions. A YAML list in the file is joined with ; here (and warned about: the community build passes a list through unsplit).

§opt_in_platforms: String

Opt-in platforms to build, semicolon-separated (extension.opt_in_platforms). Empty when absent.

The community build only builds the platforms in DUCKDB_OPT_IN_PLATFORMS when they are listed here. A name that is not one of them, or that is not a platform at all, is ignored by the build and reported in warnings.

§maintainers: Vec<String>

List of maintainer names (at least one required).

§github: String

GitHub repository in owner/repo format.

§git_ref: String

The git ref the community build checks out: a commit hash. A branch or tag is accepted with a warning in DescriptionYml::warnings.

§git_ref_next: String

repo.ref_next — a revision compatible with DuckDB’s main branch, empty when absent.

Optional, and documented by DuckDB for the window while a new release is being prepared: the community repository tests an extension against both the latest stable release and main, and once the release hash is set ref_next is swapped in for ref.

§git_ref_variegata: String

repo.variegata — the revision the community build checks out when it builds for DuckDB v1.5.6 (the v1.5-variegata release line) instead of git_ref; empty when absent. 133 of the 395 published descriptors set it.

ref is built for the newest release (v2.0.0). An extension stamped for one exact DuckDB 1.x release (C_STRUCT_UNSTABLE) needs its v1.5.6 build here, from a revision whose Makefile targets v1.5.6.

§git_ref_andium: String

repo.andium — as git_ref_variegata, for DuckDB v1.4.5 (the v1.4-andium line); empty when absent.

§warnings: Vec<String>

Non-fatal findings, one human-readable sentence each: the file is accepted, but something in it is unusual enough to be worth a look.

Trait Implementations§

Source§

impl Clone for DescriptionYml

Source§

fn clone(&self) -> DescriptionYml

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for DescriptionYml

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for DescriptionYml

Source§

impl PartialEq for DescriptionYml

Source§

fn eq(&self, other: &DescriptionYml) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for DescriptionYml

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.