| 1 |
use serde_derive::Serialize; |
| 2 |
use std::ops::Range; |
| 3 |
|
| 4 |
use crate::{ |
| 5 |
Authors, Dependencies, Description, Homepage, Licenses, Producers, Revision, Source, Version, |
| 6 |
}; |
| 7 |
|
| 8 |
/// Metadata associated with a Wasm Component or Module |
| 9 |
#[derive(Debug, Serialize, Default)] |
| 10 |
#[serde(rename_all = "lowercase")] |
| 11 |
pub struct Metadata { |
| 12 |
/// The component name, if any. Found in the component-name section. |
| 13 |
pub name: Option<String>, |
| 14 |
/// The component's producers section, if any. |
| 15 |
pub producers: Option<Producers>, |
| 16 |
/// The component's authors section, if any. |
| 17 |
pub authors: Option<Authors>, |
| 18 |
/// Human-readable description of the binary |
| 19 |
pub description: Option<Description>, |
| 20 |
/// License(s) under which contained software is distributed as an SPDX License Expression. |
| 21 |
pub licenses: Option<Licenses>, |
| 22 |
/// URL to get source code for building the image |
| 23 |
pub source: Option<Source>, |
| 24 |
/// URL to find more information on the binary |
| 25 |
pub homepage: Option<Homepage>, |
| 26 |
/// Source control revision identifier for the packaged software. |
| 27 |
pub revision: Option<Revision>, |
| 28 |
/// Version of the packaged software |
| 29 |
pub version: Option<Version>, |
| 30 |
/// Byte range of the module in the parent binary |
| 31 |
pub range: Range<usize>, |
| 32 |
/// Dependencies of the component |
| 33 |
pub dependencies: Option<Dependencies>, |
| 34 |
} |