#[non_exhaustive]pub enum ParseCommandError {
Show 41 variants
UnknownCommandType,
MissingStartTime,
InvalidStartTime,
MissingLoopCount,
InvalidLoopCount,
MissingTriggerType,
InvalidTriggerType,
InvalidGroupNumber,
MissingEndTime,
InvalidEndTime,
MissingEasing,
InvalidEasing,
MissingRed,
MissingGreen,
MissingBlue,
InvalidRed,
InvalidGreen,
InvalidBlue,
InvalidContinuingColours,
MissingParameterType,
InvalidParameterType,
InvalidContinuingParameters,
MissingMoveX,
InvalidMoveX,
MissingMoveY,
InvalidMoveY,
InvalidContinuingMove,
MissingScaleX,
InvalidScaleX,
MissingScaleY,
InvalidScaleY,
InvalidContinuingScales,
MissingStartOpacity,
InvalidStartOpacity,
InvalidContinuingOpacities,
MissingStartScale,
InvalidStartScale,
InvalidContinuingScale,
MissingStartRotation,
InvalidStartRotation,
InvalidContinuingRotation,
}
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
UnknownCommandType
Unknown command type
MissingStartTime
Missing start_time
field.
InvalidStartTime
Invalid start_time
value.
MissingLoopCount
Missing loop_count
field.
InvalidLoopCount
Invalid loop_count
value.
MissingTriggerType
Missing “trigger_type” field.
InvalidTriggerType
Invalid trigger_type
value.
InvalidGroupNumber
Invalid group_number
value.
MissingEndTime
Missing end_time
field.
InvalidEndTime
Invalid end_time
value.
MissingEasing
Missing easing
field.
InvalidEasing
Invalid easing
value.
MissingRed
Missing colour’s red
field.
MissingGreen
Missing colour’s green
field.
MissingBlue
Missing colour’s blue
field.
InvalidRed
Invalid red
value.
InvalidGreen
Invalid green
value.
InvalidBlue
Invalid blue
value.
InvalidContinuingColours
Invalid continuing colour value.
MissingParameterType
Missing parameter’s parameter_type
field.
InvalidParameterType
Invalid parameter_type
value.
InvalidContinuingParameters
Invalid continuing parameter value.
MissingMoveX
Missing move_x
field.
InvalidMoveX
Invalid move_x
value.
MissingMoveY
Missing move_y
field.
InvalidMoveY
Invalid move_y
value.
InvalidContinuingMove
Invalid continuing move value.
MissingScaleX
Missing scale_x
field.
InvalidScaleX
Invalid scale_x
value.
MissingScaleY
Missing scale_y
field.
InvalidScaleY
Invalid scale_y
value.
InvalidContinuingScales
Invalid continuing scale value.
MissingStartOpacity
Missing start_opacity
field.
InvalidStartOpacity
Invalid start_opacity
value.
InvalidContinuingOpacities
Invalid continuing opacity value.
MissingStartScale
Missing start_scale
field.
InvalidStartScale
Invalid start_scale
value.
InvalidContinuingScale
Invalid continuing scale value.
MissingStartRotation
Missing start_rotation
field.
InvalidStartRotation
Invalid start_rotation
value.
InvalidContinuingRotation
Invalid continuing rotation value.
Trait Implementations§
Source§impl Debug for ParseCommandError
impl Debug for ParseCommandError
Source§impl Display for ParseCommandError
impl Display for ParseCommandError
Source§impl Error for ParseCommandError
impl Error for ParseCommandError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§impl<'_derivative_strum> From<&'_derivative_strum ParseCommandError> for &'static str
impl<'_derivative_strum> From<&'_derivative_strum ParseCommandError> for &'static str
Source§fn from(x: &'_derivative_strum ParseCommandError) -> &'static str
fn from(x: &'_derivative_strum ParseCommandError) -> &'static str
Source§impl From<Err<VerboseError<&str>>> for ParseCommandError
impl From<Err<VerboseError<&str>>> for ParseCommandError
Source§impl From<ParseCommandError> for &'static str
impl From<ParseCommandError> for &'static str
Source§fn from(x: ParseCommandError) -> &'static str
fn from(x: ParseCommandError) -> &'static str
Source§impl From<ParseCommandError> for ParseError
impl From<ParseCommandError> for ParseError
Source§fn from(source: ParseCommandError) -> Self
fn from(source: ParseCommandError) -> Self
Source§impl FromStr for ParseCommandError
impl FromStr for ParseCommandError
Auto Trait Implementations§
impl Freeze for ParseCommandError
impl RefUnwindSafe for ParseCommandError
impl Send for ParseCommandError
impl Sync for ParseCommandError
impl Unpin for ParseCommandError
impl UnwindSafe for ParseCommandError
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> 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);