#[non_exhaustive]pub struct TraceSummaryBuilder { /* private fields */ }
Expand description
A builder for TraceSummary
.
Implementations§
Source§impl TraceSummaryBuilder
impl TraceSummaryBuilder
Sourcepub fn id(self, input: impl Into<String>) -> Self
pub fn id(self, input: impl Into<String>) -> Self
The unique identifier for the request that generated the trace's segments and subsegments.
Sourcepub fn set_id(self, input: Option<String>) -> Self
pub fn set_id(self, input: Option<String>) -> Self
The unique identifier for the request that generated the trace's segments and subsegments.
Sourcepub fn get_id(&self) -> &Option<String>
pub fn get_id(&self) -> &Option<String>
The unique identifier for the request that generated the trace's segments and subsegments.
Sourcepub fn start_time(self, input: DateTime) -> Self
pub fn start_time(self, input: DateTime) -> Self
The start time of a trace, based on the earliest trace segment start time.
Sourcepub fn set_start_time(self, input: Option<DateTime>) -> Self
pub fn set_start_time(self, input: Option<DateTime>) -> Self
The start time of a trace, based on the earliest trace segment start time.
Sourcepub fn get_start_time(&self) -> &Option<DateTime>
pub fn get_start_time(&self) -> &Option<DateTime>
The start time of a trace, based on the earliest trace segment start time.
Sourcepub fn duration(self, input: f64) -> Self
pub fn duration(self, input: f64) -> Self
The length of time in seconds between the start time of the root segment and the end time of the last segment that completed.
Sourcepub fn set_duration(self, input: Option<f64>) -> Self
pub fn set_duration(self, input: Option<f64>) -> Self
The length of time in seconds between the start time of the root segment and the end time of the last segment that completed.
Sourcepub fn get_duration(&self) -> &Option<f64>
pub fn get_duration(&self) -> &Option<f64>
The length of time in seconds between the start time of the root segment and the end time of the last segment that completed.
Sourcepub fn response_time(self, input: f64) -> Self
pub fn response_time(self, input: f64) -> Self
The length of time in seconds between the start and end times of the root segment. If the service performs work asynchronously, the response time measures the time before the response is sent to the user, while the duration measures the amount of time before the last traced activity completes.
Sourcepub fn set_response_time(self, input: Option<f64>) -> Self
pub fn set_response_time(self, input: Option<f64>) -> Self
The length of time in seconds between the start and end times of the root segment. If the service performs work asynchronously, the response time measures the time before the response is sent to the user, while the duration measures the amount of time before the last traced activity completes.
Sourcepub fn get_response_time(&self) -> &Option<f64>
pub fn get_response_time(&self) -> &Option<f64>
The length of time in seconds between the start and end times of the root segment. If the service performs work asynchronously, the response time measures the time before the response is sent to the user, while the duration measures the amount of time before the last traced activity completes.
Sourcepub fn set_has_fault(self, input: Option<bool>) -> Self
pub fn set_has_fault(self, input: Option<bool>) -> Self
The root segment document has a 500 series error.
Sourcepub fn get_has_fault(&self) -> &Option<bool>
pub fn get_has_fault(&self) -> &Option<bool>
The root segment document has a 500 series error.
Sourcepub fn set_has_error(self, input: Option<bool>) -> Self
pub fn set_has_error(self, input: Option<bool>) -> Self
The root segment document has a 400 series error.
Sourcepub fn get_has_error(&self) -> &Option<bool>
pub fn get_has_error(&self) -> &Option<bool>
The root segment document has a 400 series error.
Sourcepub fn has_throttle(self, input: bool) -> Self
pub fn has_throttle(self, input: bool) -> Self
One or more of the segment documents has a 429 throttling error.
Sourcepub fn set_has_throttle(self, input: Option<bool>) -> Self
pub fn set_has_throttle(self, input: Option<bool>) -> Self
One or more of the segment documents has a 429 throttling error.
Sourcepub fn get_has_throttle(&self) -> &Option<bool>
pub fn get_has_throttle(&self) -> &Option<bool>
One or more of the segment documents has a 429 throttling error.
Sourcepub fn is_partial(self, input: bool) -> Self
pub fn is_partial(self, input: bool) -> Self
One or more of the segment documents is in progress.
Sourcepub fn set_is_partial(self, input: Option<bool>) -> Self
pub fn set_is_partial(self, input: Option<bool>) -> Self
One or more of the segment documents is in progress.
Sourcepub fn get_is_partial(&self) -> &Option<bool>
pub fn get_is_partial(&self) -> &Option<bool>
One or more of the segment documents is in progress.
Sourcepub fn set_http(self, input: Option<Http>) -> Self
pub fn set_http(self, input: Option<Http>) -> Self
Information about the HTTP request served by the trace.
Sourcepub fn get_http(&self) -> &Option<Http>
pub fn get_http(&self) -> &Option<Http>
Information about the HTTP request served by the trace.
Sourcepub fn annotations(
self,
k: impl Into<String>,
v: Vec<ValueWithServiceIds>,
) -> Self
pub fn annotations( self, k: impl Into<String>, v: Vec<ValueWithServiceIds>, ) -> Self
Adds a key-value pair to annotations
.
To override the contents of this collection use set_annotations
.
Annotations from the trace's segment documents.
Sourcepub fn set_annotations(
self,
input: Option<HashMap<String, Vec<ValueWithServiceIds>>>,
) -> Self
pub fn set_annotations( self, input: Option<HashMap<String, Vec<ValueWithServiceIds>>>, ) -> Self
Annotations from the trace's segment documents.
Sourcepub fn get_annotations(
&self,
) -> &Option<HashMap<String, Vec<ValueWithServiceIds>>>
pub fn get_annotations( &self, ) -> &Option<HashMap<String, Vec<ValueWithServiceIds>>>
Annotations from the trace's segment documents.
Sourcepub fn users(self, input: TraceUser) -> Self
pub fn users(self, input: TraceUser) -> Self
Appends an item to users
.
To override the contents of this collection use set_users
.
Users from the trace's segment documents.
Sourcepub fn set_users(self, input: Option<Vec<TraceUser>>) -> Self
pub fn set_users(self, input: Option<Vec<TraceUser>>) -> Self
Users from the trace's segment documents.
Sourcepub fn service_ids(self, input: ServiceId) -> Self
pub fn service_ids(self, input: ServiceId) -> Self
Appends an item to service_ids
.
To override the contents of this collection use set_service_ids
.
Service IDs from the trace's segment documents.
Sourcepub fn set_service_ids(self, input: Option<Vec<ServiceId>>) -> Self
pub fn set_service_ids(self, input: Option<Vec<ServiceId>>) -> Self
Service IDs from the trace's segment documents.
Sourcepub fn get_service_ids(&self) -> &Option<Vec<ServiceId>>
pub fn get_service_ids(&self) -> &Option<Vec<ServiceId>>
Service IDs from the trace's segment documents.
Sourcepub fn resource_arns(self, input: ResourceArnDetail) -> Self
pub fn resource_arns(self, input: ResourceArnDetail) -> Self
Appends an item to resource_arns
.
To override the contents of this collection use set_resource_arns
.
A list of resource ARNs for any resource corresponding to the trace segments.
Sourcepub fn set_resource_arns(self, input: Option<Vec<ResourceArnDetail>>) -> Self
pub fn set_resource_arns(self, input: Option<Vec<ResourceArnDetail>>) -> Self
A list of resource ARNs for any resource corresponding to the trace segments.
Sourcepub fn get_resource_arns(&self) -> &Option<Vec<ResourceArnDetail>>
pub fn get_resource_arns(&self) -> &Option<Vec<ResourceArnDetail>>
A list of resource ARNs for any resource corresponding to the trace segments.
Sourcepub fn instance_ids(self, input: InstanceIdDetail) -> Self
pub fn instance_ids(self, input: InstanceIdDetail) -> Self
Appends an item to instance_ids
.
To override the contents of this collection use set_instance_ids
.
A list of EC2 instance IDs for any instance corresponding to the trace segments.
Sourcepub fn set_instance_ids(self, input: Option<Vec<InstanceIdDetail>>) -> Self
pub fn set_instance_ids(self, input: Option<Vec<InstanceIdDetail>>) -> Self
A list of EC2 instance IDs for any instance corresponding to the trace segments.
Sourcepub fn get_instance_ids(&self) -> &Option<Vec<InstanceIdDetail>>
pub fn get_instance_ids(&self) -> &Option<Vec<InstanceIdDetail>>
A list of EC2 instance IDs for any instance corresponding to the trace segments.
Sourcepub fn availability_zones(self, input: AvailabilityZoneDetail) -> Self
pub fn availability_zones(self, input: AvailabilityZoneDetail) -> Self
Appends an item to availability_zones
.
To override the contents of this collection use set_availability_zones
.
A list of Availability Zones for any zone corresponding to the trace segments.
Sourcepub fn set_availability_zones(
self,
input: Option<Vec<AvailabilityZoneDetail>>,
) -> Self
pub fn set_availability_zones( self, input: Option<Vec<AvailabilityZoneDetail>>, ) -> Self
A list of Availability Zones for any zone corresponding to the trace segments.
Sourcepub fn get_availability_zones(&self) -> &Option<Vec<AvailabilityZoneDetail>>
pub fn get_availability_zones(&self) -> &Option<Vec<AvailabilityZoneDetail>>
A list of Availability Zones for any zone corresponding to the trace segments.
Sourcepub fn entry_point(self, input: ServiceId) -> Self
pub fn entry_point(self, input: ServiceId) -> Self
The root of a trace.
Sourcepub fn set_entry_point(self, input: Option<ServiceId>) -> Self
pub fn set_entry_point(self, input: Option<ServiceId>) -> Self
The root of a trace.
Sourcepub fn get_entry_point(&self) -> &Option<ServiceId>
pub fn get_entry_point(&self) -> &Option<ServiceId>
The root of a trace.
Sourcepub fn fault_root_causes(self, input: FaultRootCause) -> Self
pub fn fault_root_causes(self, input: FaultRootCause) -> Self
Appends an item to fault_root_causes
.
To override the contents of this collection use set_fault_root_causes
.
A collection of FaultRootCause structures corresponding to the trace segments.
Sourcepub fn set_fault_root_causes(self, input: Option<Vec<FaultRootCause>>) -> Self
pub fn set_fault_root_causes(self, input: Option<Vec<FaultRootCause>>) -> Self
A collection of FaultRootCause structures corresponding to the trace segments.
Sourcepub fn get_fault_root_causes(&self) -> &Option<Vec<FaultRootCause>>
pub fn get_fault_root_causes(&self) -> &Option<Vec<FaultRootCause>>
A collection of FaultRootCause structures corresponding to the trace segments.
Sourcepub fn error_root_causes(self, input: ErrorRootCause) -> Self
pub fn error_root_causes(self, input: ErrorRootCause) -> Self
Appends an item to error_root_causes
.
To override the contents of this collection use set_error_root_causes
.
A collection of ErrorRootCause structures corresponding to the trace segments.
Sourcepub fn set_error_root_causes(self, input: Option<Vec<ErrorRootCause>>) -> Self
pub fn set_error_root_causes(self, input: Option<Vec<ErrorRootCause>>) -> Self
A collection of ErrorRootCause structures corresponding to the trace segments.
Sourcepub fn get_error_root_causes(&self) -> &Option<Vec<ErrorRootCause>>
pub fn get_error_root_causes(&self) -> &Option<Vec<ErrorRootCause>>
A collection of ErrorRootCause structures corresponding to the trace segments.
Sourcepub fn response_time_root_causes(self, input: ResponseTimeRootCause) -> Self
pub fn response_time_root_causes(self, input: ResponseTimeRootCause) -> Self
Appends an item to response_time_root_causes
.
To override the contents of this collection use set_response_time_root_causes
.
A collection of ResponseTimeRootCause structures corresponding to the trace segments.
Sourcepub fn set_response_time_root_causes(
self,
input: Option<Vec<ResponseTimeRootCause>>,
) -> Self
pub fn set_response_time_root_causes( self, input: Option<Vec<ResponseTimeRootCause>>, ) -> Self
A collection of ResponseTimeRootCause structures corresponding to the trace segments.
Sourcepub fn get_response_time_root_causes(
&self,
) -> &Option<Vec<ResponseTimeRootCause>>
pub fn get_response_time_root_causes( &self, ) -> &Option<Vec<ResponseTimeRootCause>>
A collection of ResponseTimeRootCause structures corresponding to the trace segments.
Sourcepub fn set_revision(self, input: Option<i32>) -> Self
pub fn set_revision(self, input: Option<i32>) -> Self
The revision number of a trace.
Sourcepub fn get_revision(&self) -> &Option<i32>
pub fn get_revision(&self) -> &Option<i32>
The revision number of a trace.
Sourcepub fn matched_event_time(self, input: DateTime) -> Self
pub fn matched_event_time(self, input: DateTime) -> Self
The matched time stamp of a defined event.
Sourcepub fn set_matched_event_time(self, input: Option<DateTime>) -> Self
pub fn set_matched_event_time(self, input: Option<DateTime>) -> Self
The matched time stamp of a defined event.
Sourcepub fn get_matched_event_time(&self) -> &Option<DateTime>
pub fn get_matched_event_time(&self) -> &Option<DateTime>
The matched time stamp of a defined event.
Sourcepub fn build(self) -> TraceSummary
pub fn build(self) -> TraceSummary
Consumes the builder and constructs a TraceSummary
.
Trait Implementations§
Source§impl Clone for TraceSummaryBuilder
impl Clone for TraceSummaryBuilder
Source§fn clone(&self) -> TraceSummaryBuilder
fn clone(&self) -> TraceSummaryBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for TraceSummaryBuilder
impl Debug for TraceSummaryBuilder
Source§impl Default for TraceSummaryBuilder
impl Default for TraceSummaryBuilder
Source§fn default() -> TraceSummaryBuilder
fn default() -> TraceSummaryBuilder
Source§impl PartialEq for TraceSummaryBuilder
impl PartialEq for TraceSummaryBuilder
impl StructuralPartialEq for TraceSummaryBuilder
Auto Trait Implementations§
impl Freeze for TraceSummaryBuilder
impl RefUnwindSafe for TraceSummaryBuilder
impl Send for TraceSummaryBuilder
impl Sync for TraceSummaryBuilder
impl Unpin for TraceSummaryBuilder
impl UnwindSafe for TraceSummaryBuilder
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<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>
Returns self
with the
fg()
set to
Color::BrightBlack
.
§Example
println!("{}", value.bright_black());
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>
Returns self
with the
fg()
set to
Color::BrightGreen
.
§Example
println!("{}", value.bright_green());
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Returns self
with the
fg()
set to
Color::BrightYellow
.
§Example
println!("{}", value.bright_yellow());
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>
Returns self
with the
fg()
set to
Color::BrightMagenta
.
§Example
println!("{}", value.bright_magenta());
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>
Returns self
with the
fg()
set to
Color::BrightWhite
.
§Example
println!("{}", value.bright_white());
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>
Returns self
with the
bg()
set to
Color::BrightBlack
.
§Example
println!("{}", value.on_bright_black());
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>
Returns self
with the
bg()
set to
Color::BrightGreen
.
§Example
println!("{}", value.on_bright_green());
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Returns self
with the
bg()
set to
Color::BrightYellow
.
§Example
println!("{}", value.on_bright_yellow());
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Returns self
with the
bg()
set to
Color::BrightBlue
.
§Example
println!("{}", value.on_bright_blue());
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Returns self
with the
bg()
set to
Color::BrightMagenta
.
§Example
println!("{}", value.on_bright_magenta());
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Returns self
with the
bg()
set to
Color::BrightCyan
.
§Example
println!("{}", value.on_bright_cyan());
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Returns self
with the
bg()
set to
Color::BrightWhite
.
§Example
println!("{}", value.on_bright_white());
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 underline(&self) -> Painted<&T>
fn underline(&self) -> Painted<&T>
Returns self
with the
attr()
set to
Attribute::Underline
.
§Example
println!("{}", value.underline());
Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Returns self
with the
attr()
set to
Attribute::RapidBlink
.
§Example
println!("{}", value.rapid_blink());
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);