pub struct Trace<PT: ProtocolTypes> {
pub descriptors: Vec<AgentDescriptor<PT::PUTConfig>>,
pub steps: Vec<Step<PT>>,
pub prior_traces: Vec<Trace<PT>>,
pub metadata_trace: MetadataTrace,
}Fields§
§descriptors: Vec<AgentDescriptor<PT::PUTConfig>>§steps: Vec<Step<PT>>§prior_traces: Vec<Trace<PT>>§metadata_trace: MetadataTraceImplementations§
Source§impl<PT: ProtocolTypes> Trace<PT>
impl<PT: ProtocolTypes> Trace<PT>
Source§impl<PT: ProtocolTypes> Trace<PT>
impl<PT: ProtocolTypes> Trace<PT>
pub fn count_functions_by_name(&self, find_name: &'static str) -> usize
pub fn count_functions(&self) -> usize
pub fn write_plots(&self, i: u16)
Source§impl<PT: ProtocolTypes> Trace<PT>
A Trace consists of several Steps. Each has either a OutputAction or an
InputAction. Each Steps references an Agent by name. Furthermore, a trace also has a
list of AgentDescriptors which act like a blueprint to spawn Agents with a corresponding
server or client role and a specific TLs version. Essentially they are an Agent without a
stream.
impl<PT: ProtocolTypes> Trace<PT>
A Trace consists of several Steps. Each has either a OutputAction or an
InputAction. Each Steps references an Agent by name. Furthermore, a trace also has a
list of AgentDescriptors which act like a blueprint to spawn Agents with a corresponding
server or client role and a specific TLs version. Essentially they are an Agent without a
stream.
Sourcepub fn all_descriptors(&self) -> Vec<&AgentDescriptor<PT::PUTConfig>>
pub fn all_descriptors(&self) -> Vec<&AgentDescriptor<PT::PUTConfig>>
Recursively collect all agent descriptors from this trace and its prior traces. This is needed for differential testing: agents in prior traces must also be mapped to the correct PUT, otherwise they silently fall back to the default.
pub fn spawn_agents<PB: ProtocolBehavior<ProtocolTypes = PT>>( &self, ctx: &mut TraceContext<PB>, ) -> Result<(), Error>
pub fn execute_until_step_wrap<PB>(
&self,
ctx: &mut TraceContext<PB>,
stop_at_step: usize,
trace_number: &mut usize,
check_security_violation: bool,
) -> Result<(), Error>where
PB: ProtocolBehavior<ProtocolTypes = PT>,
pub fn execute_until_step<PB>(
&self,
ctx: &mut TraceContext<PB>,
stop_at_step: usize,
trace_number: &mut usize,
check_security_violation: bool,
) -> Result<(), Error>where
PB: ProtocolBehavior<ProtocolTypes = PT>,
pub fn execute<PB>(
&self,
ctx: &mut TraceContext<PB>,
trace_number: &mut usize,
check_security_violation: bool,
) -> Result<(), Error>where
PB: ProtocolBehavior<ProtocolTypes = PT>,
pub fn serialize_postcard(&self) -> Result<Vec<u8>, Error>
pub fn deserialize_postcard(slice: &[u8]) -> Result<Self, Error>
pub fn all_payloads(&self) -> Vec<&Payloads>
pub fn all_payloads_mut(&mut self) -> Vec<&mut Payloads>
pub fn is_symbolic(&self) -> bool
Sourcepub fn truncate_at_step(&mut self, after_step: usize)
pub fn truncate_at_step(&mut self, after_step: usize)
Remove the steps after (excluding) after_step
Sourcepub fn set_focus(&mut self, trace_path: TracePath)
pub fn set_focus(&mut self, trace_path: TracePath)
Sets in the metadata the focus of the trace to a specific TracePath.
Sourcepub fn clear_focus(&mut self)
pub fn clear_focus(&mut self)
Clear from the metadata any focus
Trait Implementations§
Source§impl<PT: ProtocolTypes> Debug for Trace<PT>
impl<PT: ProtocolTypes> Debug for Trace<PT>
Source§impl<PT: ProtocolTypes> Default for Trace<PT>
impl<PT: ProtocolTypes> Default for Trace<PT>
Source§impl<'de, PT> Deserialize<'de> for Trace<PT>where
PT: ProtocolTypes,
impl<'de, PT> Deserialize<'de> for Trace<PT>where
PT: ProtocolTypes,
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<PT: ProtocolTypes> Display for Trace<PT>
impl<PT: ProtocolTypes> Display for Trace<PT>
Source§impl<EM, OT, SC, PT> Feedback<EM, Trace<PT>, OT, SC> for MinimizingFeedback<SC, PT>where
SC: HasRand + HasMaxSize,
PT: ProtocolTypes + 'static,
EM: EventFirer<Trace<PT>, SC>,
OT: ObserversTuple<Trace<PT>, SC>,
impl<EM, OT, SC, PT> Feedback<EM, Trace<PT>, OT, SC> for MinimizingFeedback<SC, PT>where
SC: HasRand + HasMaxSize,
PT: ProtocolTypes + 'static,
EM: EventFirer<Trace<PT>, SC>,
OT: ObserversTuple<Trace<PT>, SC>,
Source§fn append_metadata(
&mut self,
_state: &mut SC,
_manager: &mut EM,
_observers: &OT,
testcase: &mut Testcase<Trace<PT>>,
) -> Result<(), Error>
fn append_metadata( &mut self, _state: &mut SC, _manager: &mut EM, _observers: &OT, testcase: &mut Testcase<Trace<PT>>, ) -> Result<(), Error>
Append to the testcase the generated metadata in case of a new corpus item
Source§impl<PT: ProtocolTypes> HasLen for Trace<PT>
impl<PT: ProtocolTypes> HasLen for Trace<PT>
Source§impl<PT: ProtocolTypes> Input for Trace<PT>
impl<PT: ProtocolTypes> Input for Trace<PT>
Source§impl<'a, S, PB: ProtocolBehavior> Mutator<Trace<<PB as ProtocolBehavior>::ProtocolTypes>, S> for GenerateMutator<'a, S, PB>where
S: HasRand,
impl<'a, S, PB: ProtocolBehavior> Mutator<Trace<<PB as ProtocolBehavior>::ProtocolTypes>, S> for GenerateMutator<'a, S, PB>where
S: HasRand,
Source§impl<S, PT> Mutator<Trace<PT>, S> for BitFlipMutatorDY<S, PT>where
S: HasRand + HasMaxSize,
PT: ProtocolTypes,
impl<S, PT> Mutator<Trace<PT>, S> for BitFlipMutatorDY<S, PT>where
S: HasRand + HasMaxSize,
PT: ProtocolTypes,
Source§impl<S, PT> Mutator<Trace<PT>, S> for ByteAddMutatorDY<S, PT>where
S: HasRand + HasMaxSize,
PT: ProtocolTypes,
impl<S, PT> Mutator<Trace<PT>, S> for ByteAddMutatorDY<S, PT>where
S: HasRand + HasMaxSize,
PT: ProtocolTypes,
Source§impl<S, PT> Mutator<Trace<PT>, S> for ByteDecMutatorDY<S, PT>where
S: HasRand + HasMaxSize,
PT: ProtocolTypes,
impl<S, PT> Mutator<Trace<PT>, S> for ByteDecMutatorDY<S, PT>where
S: HasRand + HasMaxSize,
PT: ProtocolTypes,
Source§impl<S, PT> Mutator<Trace<PT>, S> for ByteFlipMutatorDY<S, PT>where
S: HasRand + HasMaxSize,
PT: ProtocolTypes,
impl<S, PT> Mutator<Trace<PT>, S> for ByteFlipMutatorDY<S, PT>where
S: HasRand + HasMaxSize,
PT: ProtocolTypes,
Source§impl<S, PT> Mutator<Trace<PT>, S> for ByteIncMutatorDY<S, PT>where
S: HasRand + HasMaxSize,
PT: ProtocolTypes,
impl<S, PT> Mutator<Trace<PT>, S> for ByteIncMutatorDY<S, PT>where
S: HasRand + HasMaxSize,
PT: ProtocolTypes,
Source§impl<S, PT> Mutator<Trace<PT>, S> for ByteInterestingMutatorDY<S, PT>where
S: HasRand + HasMaxSize,
PT: ProtocolTypes,
impl<S, PT> Mutator<Trace<PT>, S> for ByteInterestingMutatorDY<S, PT>where
S: HasRand + HasMaxSize,
PT: ProtocolTypes,
Source§impl<S, PT> Mutator<Trace<PT>, S> for ByteNegMutatorDY<S, PT>where
S: HasRand + HasMaxSize,
PT: ProtocolTypes,
impl<S, PT> Mutator<Trace<PT>, S> for ByteNegMutatorDY<S, PT>where
S: HasRand + HasMaxSize,
PT: ProtocolTypes,
Source§impl<S, PT> Mutator<Trace<PT>, S> for ByteRandMutatorDY<S, PT>where
S: HasRand + HasMaxSize,
PT: ProtocolTypes,
impl<S, PT> Mutator<Trace<PT>, S> for ByteRandMutatorDY<S, PT>where
S: HasRand + HasMaxSize,
PT: ProtocolTypes,
Source§impl<S, PT> Mutator<Trace<PT>, S> for BytesCopyMutatorDY<S, PT>where
S: HasRand + HasMaxSize,
PT: ProtocolTypes,
impl<S, PT> Mutator<Trace<PT>, S> for BytesCopyMutatorDY<S, PT>where
S: HasRand + HasMaxSize,
PT: ProtocolTypes,
Source§impl<S, PT> Mutator<Trace<PT>, S> for BytesDeleteMutatorDY<S, PT>where
S: HasRand + HasMaxSize,
PT: ProtocolTypes,
impl<S, PT> Mutator<Trace<PT>, S> for BytesDeleteMutatorDY<S, PT>where
S: HasRand + HasMaxSize,
PT: ProtocolTypes,
Source§impl<S, PT> Mutator<Trace<PT>, S> for BytesExpandMutatorDY<S, PT>where
S: HasRand + HasMaxSize,
PT: ProtocolTypes,
impl<S, PT> Mutator<Trace<PT>, S> for BytesExpandMutatorDY<S, PT>where
S: HasRand + HasMaxSize,
PT: ProtocolTypes,
Source§impl<S, PT> Mutator<Trace<PT>, S> for BytesInsertCopyMutatorDY<S>where
S: HasRand + HasMaxSize,
PT: ProtocolTypes,
impl<S, PT> Mutator<Trace<PT>, S> for BytesInsertCopyMutatorDY<S>where
S: HasRand + HasMaxSize,
PT: ProtocolTypes,
Source§impl<S, PT> Mutator<Trace<PT>, S> for BytesInsertMutatorDY<S, PT>where
S: HasRand + HasMaxSize,
PT: ProtocolTypes,
impl<S, PT> Mutator<Trace<PT>, S> for BytesInsertMutatorDY<S, PT>where
S: HasRand + HasMaxSize,
PT: ProtocolTypes,
Source§impl<S, PT> Mutator<Trace<PT>, S> for BytesLargeExpandMutatorDY<S, PT>where
S: HasRand + HasMaxSize,
PT: ProtocolTypes,
impl<S, PT> Mutator<Trace<PT>, S> for BytesLargeExpandMutatorDY<S, PT>where
S: HasRand + HasMaxSize,
PT: ProtocolTypes,
Source§impl<S, PT> Mutator<Trace<PT>, S> for BytesRandInsertMutatorDY<S, PT>where
S: HasRand + HasMaxSize,
PT: ProtocolTypes,
impl<S, PT> Mutator<Trace<PT>, S> for BytesRandInsertMutatorDY<S, PT>where
S: HasRand + HasMaxSize,
PT: ProtocolTypes,
Source§impl<S, PT> Mutator<Trace<PT>, S> for BytesRandSetMutatorDY<S, PT>where
S: HasRand + HasMaxSize,
PT: ProtocolTypes,
impl<S, PT> Mutator<Trace<PT>, S> for BytesRandSetMutatorDY<S, PT>where
S: HasRand + HasMaxSize,
PT: ProtocolTypes,
Source§impl<S, PT> Mutator<Trace<PT>, S> for BytesSetMutatorDY<S, PT>where
S: HasRand + HasMaxSize,
PT: ProtocolTypes,
impl<S, PT> Mutator<Trace<PT>, S> for BytesSetMutatorDY<S, PT>where
S: HasRand + HasMaxSize,
PT: ProtocolTypes,
Source§impl<S, PT> Mutator<Trace<PT>, S> for BytesSwapMutatorDY<S>where
S: HasRand + HasMaxSize,
PT: ProtocolTypes,
impl<S, PT> Mutator<Trace<PT>, S> for BytesSwapMutatorDY<S>where
S: HasRand + HasMaxSize,
PT: ProtocolTypes,
Source§impl<S, PT> Mutator<Trace<PT>, S> for CrossoverInsertMutatorDY<S, PT>where
S: HasCorpus<Trace<PT>> + HasRand + HasMaxSize,
PT: ProtocolTypes,
impl<S, PT> Mutator<Trace<PT>, S> for CrossoverInsertMutatorDY<S, PT>where
S: HasCorpus<Trace<PT>> + HasRand + HasMaxSize,
PT: ProtocolTypes,
Source§impl<S, PT> Mutator<Trace<PT>, S> for CrossoverReplaceMutatorDY<S, PT>where
S: HasCorpus<Trace<PT>> + HasRand + HasMaxSize,
PT: ProtocolTypes,
impl<S, PT> Mutator<Trace<PT>, S> for CrossoverReplaceMutatorDY<S, PT>where
S: HasCorpus<Trace<PT>> + HasRand + HasMaxSize,
PT: ProtocolTypes,
Source§impl<S, PT> Mutator<Trace<PT>, S> for DwordAddMutatorDY<S, PT>where
S: HasRand + HasMaxSize,
PT: ProtocolTypes,
impl<S, PT> Mutator<Trace<PT>, S> for DwordAddMutatorDY<S, PT>where
S: HasRand + HasMaxSize,
PT: ProtocolTypes,
Source§impl<S, PT> Mutator<Trace<PT>, S> for DwordInterestingMutatorDY<S, PT>where
S: HasRand + HasMaxSize,
PT: ProtocolTypes,
impl<S, PT> Mutator<Trace<PT>, S> for DwordInterestingMutatorDY<S, PT>where
S: HasRand + HasMaxSize,
PT: ProtocolTypes,
Source§impl<'a, S, PT: ProtocolTypes, PB> Mutator<Trace<PT>, S> for MakeMessage<'a, PB>where
S: HasRand,
PB: ProtocolBehavior<ProtocolTypes = PT>,
impl<'a, S, PT: ProtocolTypes, PB> Mutator<Trace<PT>, S> for MakeMessage<'a, PB>where
S: HasRand,
PB: ProtocolBehavior<ProtocolTypes = PT>,
Source§impl<S, PT> Mutator<Trace<PT>, S> for QwordAddMutatorDY<S, PT>where
S: HasRand + HasMaxSize,
PT: ProtocolTypes,
impl<S, PT> Mutator<Trace<PT>, S> for QwordAddMutatorDY<S, PT>where
S: HasRand + HasMaxSize,
PT: ProtocolTypes,
Source§impl<'a, S, PT: ProtocolTypes, PB> Mutator<Trace<PT>, S> for ReadMessage<'a, PB>where
S: HasRand,
PB: ProtocolBehavior<ProtocolTypes = PT>,
impl<'a, S, PT: ProtocolTypes, PB> Mutator<Trace<PT>, S> for ReadMessage<'a, PB>where
S: HasRand,
PB: ProtocolBehavior<ProtocolTypes = PT>,
Source§impl<S, PT: ProtocolTypes> Mutator<Trace<PT>, S> for RemoveAndLiftMutator<S>where
S: HasRand,
impl<S, PT: ProtocolTypes> Mutator<Trace<PT>, S> for RemoveAndLiftMutator<S>where
S: HasRand,
Source§impl<S, PT: ProtocolTypes> Mutator<Trace<PT>, S> for RepeatMutator<S>where
S: HasRand,
impl<S, PT: ProtocolTypes> Mutator<Trace<PT>, S> for RepeatMutator<S>where
S: HasRand,
Source§impl<S, PT: ProtocolTypes> Mutator<Trace<PT>, S> for ReplaceMatchMutator<S, PT>where
S: HasRand,
impl<S, PT: ProtocolTypes> Mutator<Trace<PT>, S> for ReplaceMatchMutator<S, PT>where
S: HasRand,
Source§impl<S, PT: ProtocolTypes> Mutator<Trace<PT>, S> for ReplaceReuseMutator<S>where
S: HasRand,
impl<S, PT: ProtocolTypes> Mutator<Trace<PT>, S> for ReplaceReuseMutator<S>where
S: HasRand,
Source§impl<S, PT: ProtocolTypes> Mutator<Trace<PT>, S> for SkipMutator<S>where
S: HasRand,
impl<S, PT: ProtocolTypes> Mutator<Trace<PT>, S> for SkipMutator<S>where
S: HasRand,
Source§impl<S, PT> Mutator<Trace<PT>, S> for SpliceMutatorDY<S, PT>where
S: HasCorpus<Trace<PT>> + HasRand + HasMaxSize,
PT: ProtocolTypes,
impl<S, PT> Mutator<Trace<PT>, S> for SpliceMutatorDY<S, PT>where
S: HasCorpus<Trace<PT>> + HasRand + HasMaxSize,
PT: ProtocolTypes,
Source§impl<S, PT, M> Mutator<Trace<PT>, S> for StepLockedStackMutator<PT, M>where
S: HasRand,
PT: ProtocolTypes,
M: Mutator<Trace<PT>, S>,
impl<S, PT, M> Mutator<Trace<PT>, S> for StepLockedStackMutator<PT, M>where
S: HasRand,
PT: ProtocolTypes,
M: Mutator<Trace<PT>, S>,
Source§impl<S, PT: ProtocolTypes> Mutator<Trace<PT>, S> for SwapMutator<S>where
S: HasRand,
impl<S, PT: ProtocolTypes> Mutator<Trace<PT>, S> for SwapMutator<S>where
S: HasRand,
Source§impl<S, PT> Mutator<Trace<PT>, S> for WordAddMutatorDY<S, PT>where
S: HasRand + HasMaxSize,
PT: ProtocolTypes,
impl<S, PT> Mutator<Trace<PT>, S> for WordAddMutatorDY<S, PT>where
S: HasRand + HasMaxSize,
PT: ProtocolTypes,
Auto Trait Implementations§
impl<PT> Freeze for Trace<PT>
impl<PT> !RefUnwindSafe for Trace<PT>
impl<PT> Send for Trace<PT>
impl<PT> Sync for Trace<PT>
impl<PT> Unpin for Trace<PT>
impl<PT> !UnwindSafe for Trace<PT>
Blanket Implementations§
§impl<Head, T> Append<T> for Head
impl<Head, T> Append<T> for Head
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> CloneAny for T
impl<T> CloneAny for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
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<I, S> MutatedTransform<I, S> for Iwhere
I: Clone,
S: HasCorpus<I>,
impl<I, S> MutatedTransform<I, S> for Iwhere
I: Clone,
S: HasCorpus<I>,
§fn try_transform_from(base: &mut Testcase<I>, state: &S) -> Result<I, Error>
fn try_transform_from(base: &mut Testcase<I>, state: &S) -> Result<I, Error>
§fn try_transform_into(
self,
_state: &S,
) -> Result<(I, <I as MutatedTransform<I, S>>::Post), Error>
fn try_transform_into( self, _state: &S, ) -> Result<(I, <I as MutatedTransform<I, S>>::Post), Error>
§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
§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();§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
§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();§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
§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();§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
§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();§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.§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);§impl<Tail, T> Prepend<T> for Tail
impl<Tail, T> Prepend<T> for Tail
Source§impl<T> Serialize for T
impl<T> Serialize for T
fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<(), Error>
fn do_erased_serialize( &self, serializer: &mut dyn Serializer, ) -> Result<(), ErrorImpl>
§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string()] Read more§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString]. Read more