Struct nextest_runner::platform::BuildPlatforms
source · pub struct BuildPlatforms {
pub host: HostPlatform,
pub target: Option<TargetPlatform>,
}
Expand description
A representation of host and target platform.
Fields§
§host: HostPlatform
The host platform.
target: Option<TargetPlatform>
The target platform, if specified.
In the future, this will support multiple targets.
Implementations§
source§impl BuildPlatforms
impl BuildPlatforms
sourcepub fn new_with_no_target() -> Result<Self, UnknownHostPlatform>
pub fn new_with_no_target() -> Result<Self, UnknownHostPlatform>
Creates a new BuildPlatforms
with no libdirs or targets.
Used for testing.
sourcepub fn map_libdir(&self, mapper: &LibdirMapper) -> Self
pub fn map_libdir(&self, mapper: &LibdirMapper) -> Self
Maps libdir paths.
sourcepub fn to_cargo_target_arg(&self) -> Result<CargoTargetArg, TargetTripleError>
pub fn to_cargo_target_arg(&self) -> Result<CargoTargetArg, TargetTripleError>
Returns the argument to pass into cargo metadata --filter-platform <triple>
.
sourcepub fn to_summary(&self) -> BuildPlatformsSummary
pub fn to_summary(&self) -> BuildPlatformsSummary
Converts self to a summary.
sourcepub fn to_target_or_host_summary(&self) -> PlatformSummary
pub fn to_target_or_host_summary(&self) -> PlatformSummary
Converts self to a single summary.
Pairs with Self::from_target_summary
. Deprecated in favor of BuildPlatformsSummary
.
sourcepub fn to_summary_str(&self) -> Option<String>
pub fn to_summary_str(&self) -> Option<String>
Converts a target triple to a String
that can be stored in the build-metadata.
Only for backward compatibility. Deprecated in favor of BuildPlatformsSummary
.
sourcepub fn from_summary(
summary: BuildPlatformsSummary,
) -> Result<Self, RustBuildMetaParseError>
pub fn from_summary( summary: BuildPlatformsSummary, ) -> Result<Self, RustBuildMetaParseError>
Converts a summary to a BuildPlatforms
.
sourcepub fn from_target_summary(
summary: PlatformSummary,
) -> Result<Self, RustBuildMetaParseError>
pub fn from_target_summary( summary: PlatformSummary, ) -> Result<Self, RustBuildMetaParseError>
Creates a BuildPlatforms
from a single PlatformSummary
.
Only for backwards compatibility. Deprecated in favor of BuildPlatformsSummary
.
sourcepub fn from_summary_str(
summary: Option<String>,
) -> Result<Self, RustBuildMetaParseError>
pub fn from_summary_str( summary: Option<String>, ) -> Result<Self, RustBuildMetaParseError>
Creates a BuildPlatforms
from a target triple.
Only for backward compatibility. Deprecated in favor of BuildPlatformsSummary
.
Trait Implementations§
source§impl Clone for BuildPlatforms
impl Clone for BuildPlatforms
source§fn clone(&self) -> BuildPlatforms
fn clone(&self) -> BuildPlatforms
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for BuildPlatforms
impl Debug for BuildPlatforms
source§impl PartialEq for BuildPlatforms
impl PartialEq for BuildPlatforms
impl Eq for BuildPlatforms
impl StructuralPartialEq for BuildPlatforms
Auto Trait Implementations§
impl Freeze for BuildPlatforms
impl RefUnwindSafe for BuildPlatforms
impl Send for BuildPlatforms
impl Sync for BuildPlatforms
impl Unpin for BuildPlatforms
impl UnwindSafe for BuildPlatforms
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,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§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.source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
§fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
§fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
§fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
§fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
§fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
§fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
§fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
§fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
§fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
§fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
§fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
§fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
§fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
§fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
§fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
§fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
§fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
§fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
§fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
§fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
§fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
§fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
fn strikethrough(&self) -> StrikeThroughDisplay<'_, 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