pub struct Selection { /* private fields */ }Expand description
Which of a DAR’s packages a crate emits.
Keys are package names or package ids, as for ExternalPackages,
and the name form is the one to prefer for the same reason.
Implementations§
Source§impl Selection
impl Selection
Sourcepub fn everything() -> Self
pub fn everything() -> Self
Emit every package in the DAR.
Sourcepub fn only<K: Into<String>>(keys: impl IntoIterator<Item = K>) -> Self
pub fn only<K: Into<String>>(keys: impl IntoIterator<Item = K>) -> Self
Emit only the packages named here.
Sourcepub fn and_prefixed<K: Into<String>>(
self,
prefixes: impl IntoIterator<Item = K>,
) -> Self
pub fn and_prefixed<K: Into<String>>( self, prefixes: impl IntoIterator<Item = K>, ) -> Self
Also emit every package whose name is prefix, or begins with
prefix-.
The standard library arrives as some thirty packages — daml-stdlib,
daml-stdlib-DA-Time-Types, daml-prim-GHC-Types, … — and which ones a
DAR carries depends on what its Daml source happened to touch. Listing
them by hand produces a list that is wrong for the next DAR; the family
is what is meant, so the family is what is written.
The - is required so that daml-prim does not also select a package
called daml-primary.
This narrows: applied to Selection::everything it stops meaning
“the whole DAR” and starts meaning “these families”.