pub struct Entry {
pub source: Source,
pub version: Option<String>,
pub subpath: Option<SourceSubpath>,
pub dialect: Option<Dialect>,
pub plugin: Option<String>,
pub filter: FilterConfig,
pub unknown: BTreeMap<String, Value>,
}Expand description
One dependency entry. It serializes in the spelling of the file (url or path, version,
subpath, dialect, plugin, the filter keys), so a consumer’s mars.toml writes it back as
it was authored. version is a git source’s constraint; a path source has none and ignores it.
Fields§
§source: Source§version: Option<String>§subpath: Option<SourceSubpath>§dialect: Option<Dialect>Inbound lift dialect for the package.
plugin: Option<String>The plugin to install from the marketplace at this source.
filter: FilterConfig§unknown: BTreeMap<String, Value>Keys Mars does not read here, kept so the file round-trips and a caller can warn.
Implementations§
Source§impl Entry
impl Entry
Sourcepub fn from_source(source: Source) -> Self
pub fn from_source(source: Source) -> Self
An entry for source with no selector, version or filter.
Sourcepub fn read(
name: &str,
raw: RawEntry,
strictness: Strictness,
) -> Result<(Self, Vec<EntryWarning>), EntryError>
pub fn read( name: &str, raw: RawEntry, strictness: Strictness, ) -> Result<(Self, Vec<EntryWarning>), EntryError>
Read an authored entry under every rule: exactly one of url and path, a bare
host/path URL spelled with https:// (see crate::git_url::with_default_scheme), a
plugin selector that does not contradict subpath or dialect, and a consistent filter
(FilterConfig::validate). strictness decides whether a broken filter or a plugin
with dialect refuses or warns; the rest refuse for every reader.