Struct zebra_test::command::TestChild
source · pub struct TestChild<T> {
pub dir: Option<T>,
pub cmd: String,
pub command_path: String,
pub child: Option<Child>,
pub stdout: Option<Box<dyn IteratorDebug<Item = Result<String>> + Send>>,
pub stderr: Option<Box<dyn IteratorDebug<Item = Result<String>> + Send>>,
failure_regexes: RegexSet,
ignore_regexes: RegexSet,
pub deadline: Option<Instant>,
pub timeout: Option<Duration>,
bypass_test_capture: bool,
}
Expand description
A test command child process.
Fields§
§dir: Option<T>
The working directory of the command.
None
when the command has been waited on,
and its output has been taken.
cmd: String
The full command string, including arguments and working directory.
command_path: String
The path of the command, as passed to spawn2().
child: Option<Child>
The child process itself.
None
when the command has been waited on,
and its output has been taken.
stdout: Option<Box<dyn IteratorDebug<Item = Result<String>> + Send>>
The standard output stream of the child process.
TODO: replace with `Option<ChildOutput { stdout, stderr }>.
stderr: Option<Box<dyn IteratorDebug<Item = Result<String>> + Send>>
The standard error stream of the child process.
failure_regexes: RegexSet
Command outputs which indicate test failure.
This list of regexes is matches against stdout
or stderr
,
in every method that reads command output.
If any line matches any failure regex, the test fails.
ignore_regexes: RegexSet
Command outputs which are ignored when checking for test failure.
These regexes override failure_regexes
.
This list of regexes is matches against stdout
or stderr
,
in every method that reads command output.
If a line matches any ignore regex, the failure regex check is skipped for that line.
deadline: Option<Instant>
The deadline for this command to finish.
Only checked when the command outputs each new line (#1140).
timeout: Option<Duration>
The timeout for this command to finish.
Only used for debugging output.
bypass_test_capture: bool
If true, write child output directly to standard output, bypassing the Rust test harness output capture.
Implementations§
source§impl<T> TestChild<T>
impl<T> TestChild<T>
sourcepub fn with_failure_regex_set<F, X>(
self,
failure_regexes: F,
ignore_regexes: X,
) -> Selfwhere
F: ToRegexSet,
X: ToRegexSet,
pub fn with_failure_regex_set<F, X>(
self,
failure_regexes: F,
ignore_regexes: X,
) -> Selfwhere
F: ToRegexSet,
X: ToRegexSet,
Sets up command output so each line is checked against a failure regex set, unless it matches any of the ignore regexes.
The failure regexes are ignored by wait_with_output
.
To never match any log lines, use RegexSet::empty()
.
This method is a TestChild::with_failure_regexes
wrapper for
strings, Regex
es, and [RegexSet
]s.
§Panics
- adds a panic to any method that reads output, if any stdout or stderr lines match any failure regex
sourcepub fn with_failure_regex_iter<F, X>(
self,
failure_regexes: F,
ignore_regexes: X,
) -> Selfwhere
F: CollectRegexSet,
X: CollectRegexSet,
pub fn with_failure_regex_iter<F, X>(
self,
failure_regexes: F,
ignore_regexes: X,
) -> Selfwhere
F: CollectRegexSet,
X: CollectRegexSet,
Sets up command output so each line is checked against a failure regex set, unless it matches any of the ignore regexes.
The failure regexes are ignored by wait_with_output
.
To never match any log lines, use NO_MATCHES_REGEX_ITER
.
This method is a TestChild::with_failure_regexes
wrapper for
regular expression iterators.
§Panics
- adds a panic to any method that reads output, if any stdout or stderr lines match any failure regex
sourcepub fn with_failure_regexes(
self,
failure_regexes: RegexSet,
ignore_regexes: impl Into<Option<RegexSet>>,
) -> Self
pub fn with_failure_regexes( self, failure_regexes: RegexSet, ignore_regexes: impl Into<Option<RegexSet>>, ) -> Self
Sets up command output so each line is checked against a failure regex set, unless it matches any of the ignore regexes.
The failure regexes are ignored by wait_with_output
.
§Panics
- adds a panic to any method that reads output, if any stdout or stderr lines match any failure regex
sourcepub fn apply_failure_regexes_to_outputs(&mut self)
pub fn apply_failure_regexes_to_outputs(&mut self)
Applies the failure and ignore regex sets to command output.
The failure regexes are ignored by wait_with_output
.
§Panics
- adds a panic to any method that reads output, if any stdout or stderr lines match any failure regex
sourcefn map_into_string_lines<R>(
&self,
reader: R,
) -> Box<dyn IteratorDebug<Item = Result<String>> + Send>
fn map_into_string_lines<R>( &self, reader: R, ) -> Box<dyn IteratorDebug<Item = Result<String>> + Send>
Maps a reader into a string line iterator, and applies the failure and ignore regex sets to it.
sourcepub fn kill(&mut self, ignore_exited: bool) -> Result<()>
pub fn kill(&mut self, ignore_exited: bool) -> Result<()>
Kill the child process.
If ignore_exited
is true
, log “can’t kill an exited process” errors,
rather than returning them.
Returns the result of the kill.
§BUGS
On Windows (and possibly macOS), this function can return Ok
for
processes that have panicked. See #1781.
sourcepub fn kill_and_consume_output(&mut self, ignore_exited: bool) -> Result<()>
pub fn kill_and_consume_output(&mut self, ignore_exited: bool) -> Result<()>
Kill the process, and consume all its remaining output.
If ignore_exited
is true
, log “can’t kill an exited process” errors,
rather than returning them.
Returns the result of the kill.
sourcepub fn kill_and_return_output(&mut self, ignore_exited: bool) -> Result<String>
pub fn kill_and_return_output(&mut self, ignore_exited: bool) -> Result<String>
Kill the process, and return all its remaining standard output and standard error output.
If ignore_exited
is true
, log “can’t kill an exited process” errors,
rather than returning them.
Returns Ok(output)
, or an error if the kill failed.
sourcepub fn wait_for_stdout_line<OptS>(&mut self, write_context: OptS) -> bool
pub fn wait_for_stdout_line<OptS>(&mut self, write_context: OptS) -> bool
Waits until a line of standard output is available, then consumes it.
If there is a line, and write_context
is Some
, writes the context to the test logs.
Always writes the line to the test logs.
Returns true
if a line was available,
or false
if the standard output has finished.
sourcepub fn wait_for_stderr_line<OptS>(&mut self, write_context: OptS) -> bool
pub fn wait_for_stderr_line<OptS>(&mut self, write_context: OptS) -> bool
Waits until a line of standard error is available, then consumes it.
If there is a line, and write_context
is Some
, writes the context to the test logs.
Always writes the line to the test logs.
Returns true
if a line was available,
or false
if the standard error has finished.
sourcefn wait_and_return_output_line(
output: impl Iterator<Item = Result<String>>,
bypass_test_capture: bool,
) -> Option<String>
fn wait_and_return_output_line( output: impl Iterator<Item = Result<String>>, bypass_test_capture: bool, ) -> Option<String>
Waits until a line of output
is available, then returns it.
If there is a line, and write_context
is Some
, writes the context to the test logs.
Always writes the line to the test logs.
Returns true
if a line was available,
or false
if the standard output has finished.
sourcepub fn wait_with_output(self) -> Result<TestOutput<T>>
pub fn wait_with_output(self) -> Result<TestOutput<T>>
Waits for the child process to exit, then returns its output.
§Correctness
The other test child output methods take one or both outputs, making them unavailable to this method.
Ignores any configured timeouts.
Returns an error if the child has already been taken. TODO: return an error if both outputs have already been taken.
sourcepub fn with_timeout(self, timeout: Duration) -> Self
pub fn with_timeout(self, timeout: Duration) -> Self
Set a timeout for expect_stdout_line_matches
or expect_stderr_line_matches
.
Does not apply to wait_with_output
.
sourcepub fn bypass_test_capture(self, cond: bool) -> Self
pub fn bypass_test_capture(self, cond: bool) -> Self
Configures this test runner to forward stdout and stderr to the true stdout, rather than the fakestdout used by cargo tests.
sourcepub fn expect_stdout_line_matches<R>(
&mut self,
success_regex: R,
) -> Result<String>where
R: ToRegexSet + Debug,
pub fn expect_stdout_line_matches<R>(
&mut self,
success_regex: R,
) -> Result<String>where
R: ToRegexSet + Debug,
Checks each line of the child’s stdout against any regex in success_regex
,
and returns the first matching line. Prints all stdout lines.
Kills the child on error, or after the configured timeout has elapsed.
See Self::expect_line_matching_regex_set
for details.
sourcepub fn expect_stderr_line_matches<R>(
&mut self,
success_regex: R,
) -> Result<String>where
R: ToRegexSet + Debug,
pub fn expect_stderr_line_matches<R>(
&mut self,
success_regex: R,
) -> Result<String>where
R: ToRegexSet + Debug,
Checks each line of the child’s stderr against any regex in success_regex
,
and returns the first matching line. Prints all stderr lines to stdout.
Kills the child on error, or after the configured timeout has elapsed.
See Self::expect_line_matching_regex_set
for details.
sourcepub fn expect_stdout_line_matches_all_unordered<RegexList>(
&mut self,
unordered_regexes: RegexList,
) -> Result<Vec<String>>
pub fn expect_stdout_line_matches_all_unordered<RegexList>( &mut self, unordered_regexes: RegexList, ) -> Result<Vec<String>>
Checks each line of the child’s stdout, until it finds every regex in unordered_regexes
,
and returns all lines matched by any regex, until each regex has been matched at least once.
If the output finishes or the command times out before all regexes are matched, returns an error with
a list of unmatched regexes. Prints all stdout lines.
Kills the child on error, or after the configured timeout has elapsed.
See Self::expect_line_matching_regex_set
for details.
sourcepub fn expect_stderr_line_matches_all_unordered<RegexList>(
&mut self,
unordered_regexes: RegexList,
) -> Result<Vec<String>>
pub fn expect_stderr_line_matches_all_unordered<RegexList>( &mut self, unordered_regexes: RegexList, ) -> Result<Vec<String>>
Checks each line of the child’s stderr, until it finds every regex in unordered_regexes
,
and returns all lines matched by any regex, until each regex has been matched at least once.
If the output finishes or the command times out before all regexes are matched, returns an error with
a list of unmatched regexes. Prints all stderr lines.
Kills the child on error, or after the configured timeout has elapsed.
See Self::expect_line_matching_regex_set
for details.
sourcepub fn expect_stdout_line_matches_silent<R>(
&mut self,
success_regex: R,
) -> Result<String>where
R: ToRegexSet + Debug,
pub fn expect_stdout_line_matches_silent<R>(
&mut self,
success_regex: R,
) -> Result<String>where
R: ToRegexSet + Debug,
Checks each line of the child’s stdout against success_regex
,
and returns the first matching line. Does not print any output.
Kills the child on error, or after the configured timeout has elapsed.
See Self::expect_line_matching_regex_set
for details.
sourcepub fn expect_stderr_line_matches_silent<R>(
&mut self,
success_regex: R,
) -> Result<String>where
R: ToRegexSet + Debug,
pub fn expect_stderr_line_matches_silent<R>(
&mut self,
success_regex: R,
) -> Result<String>where
R: ToRegexSet + Debug,
Checks each line of the child’s stderr against success_regex
,
and returns the first matching line. Does not print any output.
Kills the child on error, or after the configured timeout has elapsed.
See Self::expect_line_matching_regex_set
for details.
sourcepub fn expect_line_matching_regex_set<L, R>(
&mut self,
lines: &mut L,
success_regexes: R,
stream_name: &str,
write_to_logs: bool,
) -> Result<String>
pub fn expect_line_matching_regex_set<L, R>( &mut self, lines: &mut L, success_regexes: R, stream_name: &str, write_to_logs: bool, ) -> Result<String>
Checks each line in lines
against a regex set, and returns Ok if a line matches.
Self::expect_line_matching_regexes
wrapper for strings,
Regex
es, and [RegexSet
]s.
sourcepub fn expect_line_matching_regex_iter<L, I>(
&mut self,
lines: &mut L,
success_regexes: I,
stream_name: &str,
write_to_logs: bool,
) -> Result<String>
pub fn expect_line_matching_regex_iter<L, I>( &mut self, lines: &mut L, success_regexes: I, stream_name: &str, write_to_logs: bool, ) -> Result<String>
Checks each line in lines
against a regex set, and returns Ok if a line matches.
Self::expect_line_matching_regexes
wrapper for regular expression iterators.
sourcepub fn expect_line_matching_regexes<L>(
&mut self,
lines: &mut L,
success_regexes: RegexSet,
stream_name: &str,
write_to_logs: bool,
) -> Result<String>
pub fn expect_line_matching_regexes<L>( &mut self, lines: &mut L, success_regexes: RegexSet, stream_name: &str, write_to_logs: bool, ) -> Result<String>
Checks each line in lines
against success_regexes
, and returns Ok if a line
matches. Uses stream_name
as the name for lines
in error reports.
Kills the child on error, or after the configured timeout has elapsed.
Note: the timeout is only checked after each full line is received from the child (#1140).
sourcefn write_to_test_logs<S>(line: S, bypass_test_capture: bool)
fn write_to_test_logs<S>(line: S, bypass_test_capture: bool)
Write line
to stdout, so it can be seen in the test logs.
Use bypass_test_capture(true) or
cargo test -- --nocapture
to see this output.
May cause weird reordering for stdout / stderr. Uses stdout even if the original lines were from stderr.
sourcepub fn kill_on_error<V, E>(
self,
result: Result<V, E>,
) -> Result<(V, Self), Report>
pub fn kill_on_error<V, E>( self, result: Result<V, E>, ) -> Result<(V, Self), Report>
Kill child
, wait for its output, and use that output as the context for
an error report based on error
.
fn past_deadline(&self) -> bool
sourcepub fn is_running(&mut self) -> bool
pub fn is_running(&mut self) -> bool
Trait Implementations§
source§impl<T> ContextFrom<&mut TestChild<T>> for Report
impl<T> ContextFrom<&mut TestChild<T>> for Report
Auto Trait Implementations§
impl<T> Freeze for TestChild<T>where
T: Freeze,
impl<T> !RefUnwindSafe for TestChild<T>
impl<T> Send for TestChild<T>where
T: Send,
impl<T> !Sync for TestChild<T>
impl<T> Unpin for TestChild<T>where
T: Unpin,
impl<T> !UnwindSafe for TestChild<T>
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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_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§fn fg_rgb<const R: u8, const G: u8, const B: u8>(
&self,
) -> FgColorDisplay<'_, CustomColor<R, G, B>, Self>
fn fg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> FgColorDisplay<'_, CustomColor<R, G, B>, Self>
§fn bg_rgb<const R: u8, const G: u8, const B: u8>(
&self,
) -> BgColorDisplay<'_, CustomColor<R, G, B>, Self>
fn bg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> BgColorDisplay<'_, CustomColor<R, G, B>, Self>
§fn truecolor(&self, r: u8, g: u8, b: u8) -> FgDynColorDisplay<'_, Rgb, Self>
fn truecolor(&self, r: u8, g: u8, b: u8) -> FgDynColorDisplay<'_, Rgb, Self>
§fn on_truecolor(&self, r: u8, g: u8, b: u8) -> BgDynColorDisplay<'_, Rgb, Self>
fn on_truecolor(&self, r: u8, g: u8, b: u8) -> BgDynColorDisplay<'_, Rgb, Self>
§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§fn fg_rgb<const R: u8, const G: u8, const B: u8>(
&self,
) -> FgColorDisplay<'_, CustomColor<R, G, B>, Self>
fn fg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> FgColorDisplay<'_, CustomColor<R, G, B>, Self>
§fn bg_rgb<const R: u8, const G: u8, const B: u8>(
&self,
) -> BgColorDisplay<'_, CustomColor<R, G, B>, Self>
fn bg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> BgColorDisplay<'_, CustomColor<R, G, B>, Self>
§fn truecolor(&self, r: u8, g: u8, b: u8) -> FgDynColorDisplay<'_, Rgb, Self>
fn truecolor(&self, r: u8, g: u8, b: u8) -> FgDynColorDisplay<'_, Rgb, Self>
§fn on_truecolor(&self, r: u8, g: u8, b: u8) -> BgDynColorDisplay<'_, Rgb, Self>
fn on_truecolor(&self, r: u8, g: u8, b: u8) -> BgDynColorDisplay<'_, Rgb, Self>
source§impl<Response, Error> ResponseResult<Response, Error> for Response
impl<Response, Error> ResponseResult<Response, Error> for Response
source§fn into_result(self) -> Result<Response, Error>
fn into_result(self) -> Result<Response, Error>
Result
that can be sent as a response.