#[non_exhaustive]pub struct HakariBuilderSummary {
pub hakari_package: Option<String>,
pub resolver: CargoResolverVersion,
pub unify_target_host: UnifyTargetHost,
pub output_single_feature: bool,
pub dep_format_version: DepFormatVersion,
pub workspace_hack_line_style: WorkspaceHackLineStyle,
pub platforms: Vec<String>,
pub traversal_excludes: PackageSetSummary,
pub final_excludes: PackageSetSummary,
pub registries: BTreeMap<String, String>,
}Expand description
A HakariBuilder in serializable form. This forms the configuration file format for hakari.
For an example, see the cargo-hakari README.
Requires the cli-support feature to be enabled.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.hakari_package: Option<String>The name of the Hakari package in the workspace.
resolver: CargoResolverVersionThe Cargo resolver version used.
For more information, see the documentation for [CargoResolverVersion].
unify_target_host: UnifyTargetHostUnification across target and host.
output_single_feature: boolWhether all dependencies were unified.
dep_format_version: DepFormatVersionFormat version for hakari.
workspace_hack_line_style: WorkspaceHackLineStyleFormat kind for workspace-hack = { ... } lines.
platforms: Vec<String>The platforms used by the HakariBuilder.
traversal_excludes: PackageSetSummaryThe list of packages excluded during graph traversals.
final_excludes: PackageSetSummaryThe list of packages excluded from the final output.
registries: BTreeMap<String, String>The list of alternate registries, as a map of name to URL.
This is a temporary workaround until Cargo issue #9052 is resolved.
Implementations§
Source§impl HakariBuilderSummary
impl HakariBuilderSummary
Sourcepub fn new(builder: &HakariBuilder<'_>) -> Result<Self, TargetSpecError>
pub fn new(builder: &HakariBuilder<'_>) -> Result<Self, TargetSpecError>
Creates a new HakariBuilderSummary from a builder.
Requires the cli-support feature to be enabled.
Returns an error if there are any custom platforms. Serializing custom platforms is currently unsupported.
Sourcepub fn to_hakari_builder<'g>(
&self,
graph: &'g PackageGraph,
) -> Result<HakariBuilder<'g>, Error>
pub fn to_hakari_builder<'g>( &self, graph: &'g PackageGraph, ) -> Result<HakariBuilder<'g>, Error>
Creates a HakariBuilder from this summary and a PackageGraph.
Returns an error if this summary references a package that’s not present, or if there was
some other issue while creating a HakariBuilder from this summary.
Sourcepub fn to_string(&self) -> Result<String, Error>
pub fn to_string(&self) -> Result<String, Error>
Serializes this summary to a TOML string.
Returns an error if writing out the TOML was unsuccessful.
Sourcepub fn write_comment(&self, out: impl Write) -> Result<(), TomlOutError>
pub fn write_comment(&self, out: impl Write) -> Result<(), TomlOutError>
Serializes this summary to a TOML string, and adds # comment markers to the beginning of
each line.
Returns an error if writing out the TOML was unsuccessful.
Sourcepub fn write_to_string(&self, dst: &mut String) -> Result<(), Error>
pub fn write_to_string(&self, dst: &mut String) -> Result<(), Error>
Writes out the contents of this summary as TOML to the given string.
Returns an error if writing out the TOML was unsuccessful.
Trait Implementations§
Source§impl Clone for HakariBuilderSummary
impl Clone for HakariBuilderSummary
Source§fn clone(&self) -> HakariBuilderSummary
fn clone(&self) -> HakariBuilderSummary
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for HakariBuilderSummary
impl Debug for HakariBuilderSummary
Source§impl<'de> Deserialize<'de> for HakariBuilderSummary
impl<'de> Deserialize<'de> for HakariBuilderSummary
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>,
Source§impl PartialEq for HakariBuilderSummary
impl PartialEq for HakariBuilderSummary
Source§impl Serialize for HakariBuilderSummary
impl Serialize for HakariBuilderSummary
impl Eq for HakariBuilderSummary
impl StructuralPartialEq for HakariBuilderSummary
Auto Trait Implementations§
impl Freeze for HakariBuilderSummary
impl RefUnwindSafe for HakariBuilderSummary
impl Send for HakariBuilderSummary
impl Sync for HakariBuilderSummary
impl Unpin for HakariBuilderSummary
impl UnwindSafe for HakariBuilderSummary
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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§impl<D> OwoColorize for D
impl<D> OwoColorize for D
§fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
§fn on_yellow<'a>(&'a self) -> BgColorDisplay<'a, Yellow, Self>
fn on_yellow<'a>(&'a self) -> BgColorDisplay<'a, Yellow, Self>
§fn magenta<'a>(&'a self) -> FgColorDisplay<'a, Magenta, Self>
fn magenta<'a>(&'a self) -> FgColorDisplay<'a, Magenta, Self>
§fn on_magenta<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>
fn on_magenta<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>
§fn on_purple<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>
fn on_purple<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>
§fn default_color<'a>(&'a self) -> FgColorDisplay<'a, Default, Self>
fn default_color<'a>(&'a self) -> FgColorDisplay<'a, Default, Self>
§fn on_default_color<'a>(&'a self) -> BgColorDisplay<'a, Default, Self>
fn on_default_color<'a>(&'a self) -> BgColorDisplay<'a, Default, Self>
§fn bright_black<'a>(&'a self) -> FgColorDisplay<'a, BrightBlack, Self>
fn bright_black<'a>(&'a self) -> FgColorDisplay<'a, BrightBlack, Self>
§fn on_bright_black<'a>(&'a self) -> BgColorDisplay<'a, BrightBlack, Self>
fn on_bright_black<'a>(&'a self) -> BgColorDisplay<'a, BrightBlack, Self>
§fn bright_red<'a>(&'a self) -> FgColorDisplay<'a, BrightRed, Self>
fn bright_red<'a>(&'a self) -> FgColorDisplay<'a, BrightRed, Self>
§fn on_bright_red<'a>(&'a self) -> BgColorDisplay<'a, BrightRed, Self>
fn on_bright_red<'a>(&'a self) -> BgColorDisplay<'a, BrightRed, Self>
§fn bright_green<'a>(&'a self) -> FgColorDisplay<'a, BrightGreen, Self>
fn bright_green<'a>(&'a self) -> FgColorDisplay<'a, BrightGreen, Self>
§fn on_bright_green<'a>(&'a self) -> BgColorDisplay<'a, BrightGreen, Self>
fn on_bright_green<'a>(&'a self) -> BgColorDisplay<'a, BrightGreen, Self>
§fn bright_yellow<'a>(&'a self) -> FgColorDisplay<'a, BrightYellow, Self>
fn bright_yellow<'a>(&'a self) -> FgColorDisplay<'a, BrightYellow, Self>
§fn on_bright_yellow<'a>(&'a self) -> BgColorDisplay<'a, BrightYellow, Self>
fn on_bright_yellow<'a>(&'a self) -> BgColorDisplay<'a, BrightYellow, Self>
§fn bright_blue<'a>(&'a self) -> FgColorDisplay<'a, BrightBlue, Self>
fn bright_blue<'a>(&'a self) -> FgColorDisplay<'a, BrightBlue, Self>
§fn on_bright_blue<'a>(&'a self) -> BgColorDisplay<'a, BrightBlue, Self>
fn on_bright_blue<'a>(&'a self) -> BgColorDisplay<'a, BrightBlue, Self>
§fn bright_magenta<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
fn bright_magenta<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
§fn on_bright_magenta<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
fn on_bright_magenta<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
§fn bright_purple<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
fn bright_purple<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
§fn on_bright_purple<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
fn on_bright_purple<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
§fn bright_cyan<'a>(&'a self) -> FgColorDisplay<'a, BrightCyan, Self>
fn bright_cyan<'a>(&'a self) -> FgColorDisplay<'a, BrightCyan, Self>
§fn on_bright_cyan<'a>(&'a self) -> BgColorDisplay<'a, BrightCyan, Self>
fn on_bright_cyan<'a>(&'a self) -> BgColorDisplay<'a, BrightCyan, Self>
§fn bright_white<'a>(&'a self) -> FgColorDisplay<'a, BrightWhite, Self>
fn bright_white<'a>(&'a self) -> FgColorDisplay<'a, BrightWhite, Self>
§fn on_bright_white<'a>(&'a self) -> BgColorDisplay<'a, BrightWhite, Self>
fn on_bright_white<'a>(&'a self) -> BgColorDisplay<'a, BrightWhite, Self>
§fn blink_fast<'a>(&'a self) -> BlinkFastDisplay<'a, Self>
fn blink_fast<'a>(&'a self) -> BlinkFastDisplay<'a, Self>
§fn strikethrough<'a>(&'a self) -> StrikeThroughDisplay<'a, Self>
fn strikethrough<'a>(&'a self) -> StrikeThroughDisplay<'a, Self>
§fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::fg or
a color-specific method, such as OwoColorize::green, Read more§fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::bg or
a color-specific method, such as OwoColorize::on_yellow, Read more