#[non_exhaustive]pub enum AppInstanceType {
Show 163 variants
MlC512Xlarge,
MlC518Xlarge,
MlC524Xlarge,
MlC52Xlarge,
MlC54Xlarge,
MlC59Xlarge,
MlC5Large,
MlC5Xlarge,
MlC6I12Xlarge,
MlC6I16Xlarge,
MlC6I24Xlarge,
MlC6I2Xlarge,
MlC6I32Xlarge,
MlC6I4Xlarge,
MlC6I8Xlarge,
MlC6ILarge,
MlC6IXlarge,
MlC6Id12Xlarge,
MlC6Id16Xlarge,
MlC6Id24Xlarge,
MlC6Id2Xlarge,
MlC6Id32Xlarge,
MlC6Id4Xlarge,
MlC6Id8Xlarge,
MlC6IdLarge,
MlC6IdXlarge,
MlC7I12Xlarge,
MlC7I16Xlarge,
MlC7I24Xlarge,
MlC7I2Xlarge,
MlC7I48Xlarge,
MlC7I4Xlarge,
MlC7I8Xlarge,
MlC7ILarge,
MlC7IXlarge,
MlG4Dn12Xlarge,
MlG4Dn16Xlarge,
MlG4Dn2Xlarge,
MlG4Dn4Xlarge,
MlG4Dn8Xlarge,
MlG4DnXlarge,
MlG512Xlarge,
MlG516Xlarge,
MlG524Xlarge,
MlG52Xlarge,
MlG548Xlarge,
MlG54Xlarge,
MlG58Xlarge,
MlG5Xlarge,
MlG612Xlarge,
MlG616Xlarge,
MlG624Xlarge,
MlG62Xlarge,
MlG648Xlarge,
MlG64Xlarge,
MlG68Xlarge,
MlG6Xlarge,
MlG6E12Xlarge,
MlG6E16Xlarge,
MlG6E24Xlarge,
MlG6E2Xlarge,
MlG6E48Xlarge,
MlG6E4Xlarge,
MlG6E8Xlarge,
MlG6EXlarge,
MlGeospatialInteractive,
MlM512Xlarge,
MlM516Xlarge,
MlM524Xlarge,
MlM52Xlarge,
MlM54Xlarge,
MlM58Xlarge,
MlM5Large,
MlM5Xlarge,
MlM5D12Xlarge,
MlM5D16Xlarge,
MlM5D24Xlarge,
MlM5D2Xlarge,
MlM5D4Xlarge,
MlM5D8Xlarge,
MlM5DLarge,
MlM5DXlarge,
MlM6I12Xlarge,
MlM6I16Xlarge,
MlM6I24Xlarge,
MlM6I2Xlarge,
MlM6I32Xlarge,
MlM6I4Xlarge,
MlM6I8Xlarge,
MlM6ILarge,
MlM6IXlarge,
MlM6Id12Xlarge,
MlM6Id16Xlarge,
MlM6Id24Xlarge,
MlM6Id2Xlarge,
MlM6Id32Xlarge,
MlM6Id4Xlarge,
MlM6Id8Xlarge,
MlM6IdLarge,
MlM6IdXlarge,
MlM7I12Xlarge,
MlM7I16Xlarge,
MlM7I24Xlarge,
MlM7I2Xlarge,
MlM7I48Xlarge,
MlM7I4Xlarge,
MlM7I8Xlarge,
MlM7ILarge,
MlM7IXlarge,
MlP316Xlarge,
MlP32Xlarge,
MlP38Xlarge,
MlP3Dn24Xlarge,
MlP4D24Xlarge,
MlP4De24Xlarge,
MlP548Xlarge,
MlP5En48Xlarge,
MlR512Xlarge,
MlR516Xlarge,
MlR524Xlarge,
MlR52Xlarge,
MlR54Xlarge,
MlR58Xlarge,
MlR5Large,
MlR5Xlarge,
MlR6I12Xlarge,
MlR6I16Xlarge,
MlR6I24Xlarge,
MlR6I2Xlarge,
MlR6I32Xlarge,
MlR6I4Xlarge,
MlR6I8Xlarge,
MlR6ILarge,
MlR6IXlarge,
MlR6Id12Xlarge,
MlR6Id16Xlarge,
MlR6Id24Xlarge,
MlR6Id2Xlarge,
MlR6Id32Xlarge,
MlR6Id4Xlarge,
MlR6Id8Xlarge,
MlR6IdLarge,
MlR6IdXlarge,
MlR7I12Xlarge,
MlR7I16Xlarge,
MlR7I24Xlarge,
MlR7I2Xlarge,
MlR7I48Xlarge,
MlR7I4Xlarge,
MlR7I8Xlarge,
MlR7ILarge,
MlR7IXlarge,
MlT32Xlarge,
MlT3Large,
MlT3Medium,
MlT3Micro,
MlT3Small,
MlT3Xlarge,
MlTrn12Xlarge,
MlTrn132Xlarge,
MlTrn1N32Xlarge,
System,
Unknown(UnknownVariantValue),
}
Expand description
When writing a match expression against AppInstanceType
, it is important to ensure
your code is forward-compatible. That is, if a match arm handles a case for a
feature that is supported by the service but has not been represented as an enum
variant in a current version of SDK, your code should continue to work when you
upgrade SDK to a future version in which the enum does include a variant for that
feature.
Here is an example of how you can make a match expression forward-compatible:
# let appinstancetype = unimplemented!();
match appinstancetype {
AppInstanceType::MlC512Xlarge => { /* ... */ },
AppInstanceType::MlC518Xlarge => { /* ... */ },
AppInstanceType::MlC524Xlarge => { /* ... */ },
AppInstanceType::MlC52Xlarge => { /* ... */ },
AppInstanceType::MlC54Xlarge => { /* ... */ },
AppInstanceType::MlC59Xlarge => { /* ... */ },
AppInstanceType::MlC5Large => { /* ... */ },
AppInstanceType::MlC5Xlarge => { /* ... */ },
AppInstanceType::MlC6I12Xlarge => { /* ... */ },
AppInstanceType::MlC6I16Xlarge => { /* ... */ },
AppInstanceType::MlC6I24Xlarge => { /* ... */ },
AppInstanceType::MlC6I2Xlarge => { /* ... */ },
AppInstanceType::MlC6I32Xlarge => { /* ... */ },
AppInstanceType::MlC6I4Xlarge => { /* ... */ },
AppInstanceType::MlC6I8Xlarge => { /* ... */ },
AppInstanceType::MlC6ILarge => { /* ... */ },
AppInstanceType::MlC6IXlarge => { /* ... */ },
AppInstanceType::MlC6Id12Xlarge => { /* ... */ },
AppInstanceType::MlC6Id16Xlarge => { /* ... */ },
AppInstanceType::MlC6Id24Xlarge => { /* ... */ },
AppInstanceType::MlC6Id2Xlarge => { /* ... */ },
AppInstanceType::MlC6Id32Xlarge => { /* ... */ },
AppInstanceType::MlC6Id4Xlarge => { /* ... */ },
AppInstanceType::MlC6Id8Xlarge => { /* ... */ },
AppInstanceType::MlC6IdLarge => { /* ... */ },
AppInstanceType::MlC6IdXlarge => { /* ... */ },
AppInstanceType::MlC7I12Xlarge => { /* ... */ },
AppInstanceType::MlC7I16Xlarge => { /* ... */ },
AppInstanceType::MlC7I24Xlarge => { /* ... */ },
AppInstanceType::MlC7I2Xlarge => { /* ... */ },
AppInstanceType::MlC7I48Xlarge => { /* ... */ },
AppInstanceType::MlC7I4Xlarge => { /* ... */ },
AppInstanceType::MlC7I8Xlarge => { /* ... */ },
AppInstanceType::MlC7ILarge => { /* ... */ },
AppInstanceType::MlC7IXlarge => { /* ... */ },
AppInstanceType::MlG4Dn12Xlarge => { /* ... */ },
AppInstanceType::MlG4Dn16Xlarge => { /* ... */ },
AppInstanceType::MlG4Dn2Xlarge => { /* ... */ },
AppInstanceType::MlG4Dn4Xlarge => { /* ... */ },
AppInstanceType::MlG4Dn8Xlarge => { /* ... */ },
AppInstanceType::MlG4DnXlarge => { /* ... */ },
AppInstanceType::MlG512Xlarge => { /* ... */ },
AppInstanceType::MlG516Xlarge => { /* ... */ },
AppInstanceType::MlG524Xlarge => { /* ... */ },
AppInstanceType::MlG52Xlarge => { /* ... */ },
AppInstanceType::MlG548Xlarge => { /* ... */ },
AppInstanceType::MlG54Xlarge => { /* ... */ },
AppInstanceType::MlG58Xlarge => { /* ... */ },
AppInstanceType::MlG5Xlarge => { /* ... */ },
AppInstanceType::MlG612Xlarge => { /* ... */ },
AppInstanceType::MlG616Xlarge => { /* ... */ },
AppInstanceType::MlG624Xlarge => { /* ... */ },
AppInstanceType::MlG62Xlarge => { /* ... */ },
AppInstanceType::MlG648Xlarge => { /* ... */ },
AppInstanceType::MlG64Xlarge => { /* ... */ },
AppInstanceType::MlG68Xlarge => { /* ... */ },
AppInstanceType::MlG6Xlarge => { /* ... */ },
AppInstanceType::MlG6E12Xlarge => { /* ... */ },
AppInstanceType::MlG6E16Xlarge => { /* ... */ },
AppInstanceType::MlG6E24Xlarge => { /* ... */ },
AppInstanceType::MlG6E2Xlarge => { /* ... */ },
AppInstanceType::MlG6E48Xlarge => { /* ... */ },
AppInstanceType::MlG6E4Xlarge => { /* ... */ },
AppInstanceType::MlG6E8Xlarge => { /* ... */ },
AppInstanceType::MlG6EXlarge => { /* ... */ },
AppInstanceType::MlGeospatialInteractive => { /* ... */ },
AppInstanceType::MlM512Xlarge => { /* ... */ },
AppInstanceType::MlM516Xlarge => { /* ... */ },
AppInstanceType::MlM524Xlarge => { /* ... */ },
AppInstanceType::MlM52Xlarge => { /* ... */ },
AppInstanceType::MlM54Xlarge => { /* ... */ },
AppInstanceType::MlM58Xlarge => { /* ... */ },
AppInstanceType::MlM5Large => { /* ... */ },
AppInstanceType::MlM5Xlarge => { /* ... */ },
AppInstanceType::MlM5D12Xlarge => { /* ... */ },
AppInstanceType::MlM5D16Xlarge => { /* ... */ },
AppInstanceType::MlM5D24Xlarge => { /* ... */ },
AppInstanceType::MlM5D2Xlarge => { /* ... */ },
AppInstanceType::MlM5D4Xlarge => { /* ... */ },
AppInstanceType::MlM5D8Xlarge => { /* ... */ },
AppInstanceType::MlM5DLarge => { /* ... */ },
AppInstanceType::MlM5DXlarge => { /* ... */ },
AppInstanceType::MlM6I12Xlarge => { /* ... */ },
AppInstanceType::MlM6I16Xlarge => { /* ... */ },
AppInstanceType::MlM6I24Xlarge => { /* ... */ },
AppInstanceType::MlM6I2Xlarge => { /* ... */ },
AppInstanceType::MlM6I32Xlarge => { /* ... */ },
AppInstanceType::MlM6I4Xlarge => { /* ... */ },
AppInstanceType::MlM6I8Xlarge => { /* ... */ },
AppInstanceType::MlM6ILarge => { /* ... */ },
AppInstanceType::MlM6IXlarge => { /* ... */ },
AppInstanceType::MlM6Id12Xlarge => { /* ... */ },
AppInstanceType::MlM6Id16Xlarge => { /* ... */ },
AppInstanceType::MlM6Id24Xlarge => { /* ... */ },
AppInstanceType::MlM6Id2Xlarge => { /* ... */ },
AppInstanceType::MlM6Id32Xlarge => { /* ... */ },
AppInstanceType::MlM6Id4Xlarge => { /* ... */ },
AppInstanceType::MlM6Id8Xlarge => { /* ... */ },
AppInstanceType::MlM6IdLarge => { /* ... */ },
AppInstanceType::MlM6IdXlarge => { /* ... */ },
AppInstanceType::MlM7I12Xlarge => { /* ... */ },
AppInstanceType::MlM7I16Xlarge => { /* ... */ },
AppInstanceType::MlM7I24Xlarge => { /* ... */ },
AppInstanceType::MlM7I2Xlarge => { /* ... */ },
AppInstanceType::MlM7I48Xlarge => { /* ... */ },
AppInstanceType::MlM7I4Xlarge => { /* ... */ },
AppInstanceType::MlM7I8Xlarge => { /* ... */ },
AppInstanceType::MlM7ILarge => { /* ... */ },
AppInstanceType::MlM7IXlarge => { /* ... */ },
AppInstanceType::MlP316Xlarge => { /* ... */ },
AppInstanceType::MlP32Xlarge => { /* ... */ },
AppInstanceType::MlP38Xlarge => { /* ... */ },
AppInstanceType::MlP3Dn24Xlarge => { /* ... */ },
AppInstanceType::MlP4D24Xlarge => { /* ... */ },
AppInstanceType::MlP4De24Xlarge => { /* ... */ },
AppInstanceType::MlP548Xlarge => { /* ... */ },
AppInstanceType::MlP5En48Xlarge => { /* ... */ },
AppInstanceType::MlR512Xlarge => { /* ... */ },
AppInstanceType::MlR516Xlarge => { /* ... */ },
AppInstanceType::MlR524Xlarge => { /* ... */ },
AppInstanceType::MlR52Xlarge => { /* ... */ },
AppInstanceType::MlR54Xlarge => { /* ... */ },
AppInstanceType::MlR58Xlarge => { /* ... */ },
AppInstanceType::MlR5Large => { /* ... */ },
AppInstanceType::MlR5Xlarge => { /* ... */ },
AppInstanceType::MlR6I12Xlarge => { /* ... */ },
AppInstanceType::MlR6I16Xlarge => { /* ... */ },
AppInstanceType::MlR6I24Xlarge => { /* ... */ },
AppInstanceType::MlR6I2Xlarge => { /* ... */ },
AppInstanceType::MlR6I32Xlarge => { /* ... */ },
AppInstanceType::MlR6I4Xlarge => { /* ... */ },
AppInstanceType::MlR6I8Xlarge => { /* ... */ },
AppInstanceType::MlR6ILarge => { /* ... */ },
AppInstanceType::MlR6IXlarge => { /* ... */ },
AppInstanceType::MlR6Id12Xlarge => { /* ... */ },
AppInstanceType::MlR6Id16Xlarge => { /* ... */ },
AppInstanceType::MlR6Id24Xlarge => { /* ... */ },
AppInstanceType::MlR6Id2Xlarge => { /* ... */ },
AppInstanceType::MlR6Id32Xlarge => { /* ... */ },
AppInstanceType::MlR6Id4Xlarge => { /* ... */ },
AppInstanceType::MlR6Id8Xlarge => { /* ... */ },
AppInstanceType::MlR6IdLarge => { /* ... */ },
AppInstanceType::MlR6IdXlarge => { /* ... */ },
AppInstanceType::MlR7I12Xlarge => { /* ... */ },
AppInstanceType::MlR7I16Xlarge => { /* ... */ },
AppInstanceType::MlR7I24Xlarge => { /* ... */ },
AppInstanceType::MlR7I2Xlarge => { /* ... */ },
AppInstanceType::MlR7I48Xlarge => { /* ... */ },
AppInstanceType::MlR7I4Xlarge => { /* ... */ },
AppInstanceType::MlR7I8Xlarge => { /* ... */ },
AppInstanceType::MlR7ILarge => { /* ... */ },
AppInstanceType::MlR7IXlarge => { /* ... */ },
AppInstanceType::MlT32Xlarge => { /* ... */ },
AppInstanceType::MlT3Large => { /* ... */ },
AppInstanceType::MlT3Medium => { /* ... */ },
AppInstanceType::MlT3Micro => { /* ... */ },
AppInstanceType::MlT3Small => { /* ... */ },
AppInstanceType::MlT3Xlarge => { /* ... */ },
AppInstanceType::MlTrn12Xlarge => { /* ... */ },
AppInstanceType::MlTrn132Xlarge => { /* ... */ },
AppInstanceType::MlTrn1N32Xlarge => { /* ... */ },
AppInstanceType::System => { /* ... */ },
other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
_ => { /* ... */ },
}
The above code demonstrates that when appinstancetype
represents
NewFeature
, the execution path will lead to the second last match arm,
even though the enum does not contain a variant AppInstanceType::NewFeature
in the current version of SDK. The reason is that the variable other
,
created by the @
operator, is bound to
AppInstanceType::Unknown(UnknownVariantValue("NewFeature".to_owned()))
and calling as_str
on it yields "NewFeature"
.
This match expression is forward-compatible when executed with a newer
version of SDK where the variant AppInstanceType::NewFeature
is defined.
Specifically, when appinstancetype
represents NewFeature
,
the execution path will hit the second last match arm as before by virtue of
calling as_str
on AppInstanceType::NewFeature
also yielding "NewFeature"
.
Explicitly matching on the Unknown
variant should
be avoided for two reasons:
- The inner data
UnknownVariantValue
is opaque, and no further information can be extracted. - It might inadvertently shadow other intended match arms.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
MlC512Xlarge
MlC518Xlarge
MlC524Xlarge
MlC52Xlarge
MlC54Xlarge
MlC59Xlarge
MlC5Large
MlC5Xlarge
MlC6I12Xlarge
MlC6I16Xlarge
MlC6I24Xlarge
MlC6I2Xlarge
MlC6I32Xlarge
MlC6I4Xlarge
MlC6I8Xlarge
MlC6ILarge
MlC6IXlarge
MlC6Id12Xlarge
MlC6Id16Xlarge
MlC6Id24Xlarge
MlC6Id2Xlarge
MlC6Id32Xlarge
MlC6Id4Xlarge
MlC6Id8Xlarge
MlC6IdLarge
MlC6IdXlarge
MlC7I12Xlarge
MlC7I16Xlarge
MlC7I24Xlarge
MlC7I2Xlarge
MlC7I48Xlarge
MlC7I4Xlarge
MlC7I8Xlarge
MlC7ILarge
MlC7IXlarge
MlG4Dn12Xlarge
MlG4Dn16Xlarge
MlG4Dn2Xlarge
MlG4Dn4Xlarge
MlG4Dn8Xlarge
MlG4DnXlarge
MlG512Xlarge
MlG516Xlarge
MlG524Xlarge
MlG52Xlarge
MlG548Xlarge
MlG54Xlarge
MlG58Xlarge
MlG5Xlarge
MlG612Xlarge
MlG616Xlarge
MlG624Xlarge
MlG62Xlarge
MlG648Xlarge
MlG64Xlarge
MlG68Xlarge
MlG6Xlarge
MlG6E12Xlarge
MlG6E16Xlarge
MlG6E24Xlarge
MlG6E2Xlarge
MlG6E48Xlarge
MlG6E4Xlarge
MlG6E8Xlarge
MlG6EXlarge
MlGeospatialInteractive
MlM512Xlarge
MlM516Xlarge
MlM524Xlarge
MlM52Xlarge
MlM54Xlarge
MlM58Xlarge
MlM5Large
MlM5Xlarge
MlM5D12Xlarge
MlM5D16Xlarge
MlM5D24Xlarge
MlM5D2Xlarge
MlM5D4Xlarge
MlM5D8Xlarge
MlM5DLarge
MlM5DXlarge
MlM6I12Xlarge
MlM6I16Xlarge
MlM6I24Xlarge
MlM6I2Xlarge
MlM6I32Xlarge
MlM6I4Xlarge
MlM6I8Xlarge
MlM6ILarge
MlM6IXlarge
MlM6Id12Xlarge
MlM6Id16Xlarge
MlM6Id24Xlarge
MlM6Id2Xlarge
MlM6Id32Xlarge
MlM6Id4Xlarge
MlM6Id8Xlarge
MlM6IdLarge
MlM6IdXlarge
MlM7I12Xlarge
MlM7I16Xlarge
MlM7I24Xlarge
MlM7I2Xlarge
MlM7I48Xlarge
MlM7I4Xlarge
MlM7I8Xlarge
MlM7ILarge
MlM7IXlarge
MlP316Xlarge
MlP32Xlarge
MlP38Xlarge
MlP3Dn24Xlarge
MlP4D24Xlarge
MlP4De24Xlarge
MlP548Xlarge
MlP5En48Xlarge
MlR512Xlarge
MlR516Xlarge
MlR524Xlarge
MlR52Xlarge
MlR54Xlarge
MlR58Xlarge
MlR5Large
MlR5Xlarge
MlR6I12Xlarge
MlR6I16Xlarge
MlR6I24Xlarge
MlR6I2Xlarge
MlR6I32Xlarge
MlR6I4Xlarge
MlR6I8Xlarge
MlR6ILarge
MlR6IXlarge
MlR6Id12Xlarge
MlR6Id16Xlarge
MlR6Id24Xlarge
MlR6Id2Xlarge
MlR6Id32Xlarge
MlR6Id4Xlarge
MlR6Id8Xlarge
MlR6IdLarge
MlR6IdXlarge
MlR7I12Xlarge
MlR7I16Xlarge
MlR7I24Xlarge
MlR7I2Xlarge
MlR7I48Xlarge
MlR7I4Xlarge
MlR7I8Xlarge
MlR7ILarge
MlR7IXlarge
MlT32Xlarge
MlT3Large
MlT3Medium
MlT3Micro
MlT3Small
MlT3Xlarge
MlTrn12Xlarge
MlTrn132Xlarge
MlTrn1N32Xlarge
System
Unknown(UnknownVariantValue)
Unknown
. See the docs on this enum for the correct way to handle unknown variants.Unknown
contains new variants that have been added since this code was generated.
Implementations§
Source§impl AppInstanceType
impl AppInstanceType
Sourcepub fn try_parse(value: &str) -> Result<Self, UnknownVariantError>
pub fn try_parse(value: &str) -> Result<Self, UnknownVariantError>
Parses the enum value while disallowing unknown variants.
Unknown variants will result in an error.
Trait Implementations§
Source§impl AsRef<str> for AppInstanceType
impl AsRef<str> for AppInstanceType
Source§impl Clone for AppInstanceType
impl Clone for AppInstanceType
Source§fn clone(&self) -> AppInstanceType
fn clone(&self) -> AppInstanceType
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for AppInstanceType
impl Debug for AppInstanceType
Source§impl Display for AppInstanceType
impl Display for AppInstanceType
Source§impl From<&str> for AppInstanceType
impl From<&str> for AppInstanceType
Source§impl FromStr for AppInstanceType
impl FromStr for AppInstanceType
Source§impl Hash for AppInstanceType
impl Hash for AppInstanceType
Source§impl Ord for AppInstanceType
impl Ord for AppInstanceType
Source§fn cmp(&self, other: &AppInstanceType) -> Ordering
fn cmp(&self, other: &AppInstanceType) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for AppInstanceType
impl PartialEq for AppInstanceType
Source§impl PartialOrd for AppInstanceType
impl PartialOrd for AppInstanceType
impl Eq for AppInstanceType
impl StructuralPartialEq for AppInstanceType
Auto Trait Implementations§
impl Freeze for AppInstanceType
impl RefUnwindSafe for AppInstanceType
impl Send for AppInstanceType
impl Sync for AppInstanceType
impl Unpin for AppInstanceType
impl UnwindSafe for AppInstanceType
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§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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> 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 moreSource§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self
with the foreground set to
value
.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red()
and
green()
, which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg()
:
use yansi::{Paint, Color};
painted.fg(Color::White);
Set foreground color to white using white()
.
use yansi::Paint;
painted.white();
Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self
with the background set to
value
.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red()
and
on_green()
, which have the same functionality but
are pithier.
§Example
Set background color to red using fg()
:
use yansi::{Paint, Color};
painted.bg(Color::Red);
Set background color to red using on_red()
.
use yansi::Paint;
painted.on_red();
Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute
value
.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold()
and
underline()
, which have the same functionality
but are pithier.
§Example
Make text bold using attr()
:
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);
Make text bold using using bold()
.
use yansi::Paint;
painted.bold();
Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi
Quirk
value
.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask()
and
wrap()
, which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk()
:
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);
Enable wrapping using wrap()
.
use yansi::Paint;
painted.wrap();
Source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting()
due to conflicts with Vec::clear()
.
The clear()
method will be removed in a future release.
fn clear(&self) -> Painted<&T>
resetting()
due to conflicts with Vec::clear()
.
The clear()
method will be removed in a future release.Source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition
value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted
only when both stdout
and stderr
are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);