Struct HistoryEvent

Source
#[non_exhaustive]
pub struct HistoryEvent {
Show 57 fields pub event_timestamp: DateTime, pub event_type: EventType, pub event_id: i64, pub workflow_execution_started_event_attributes: Option<WorkflowExecutionStartedEventAttributes>, pub workflow_execution_completed_event_attributes: Option<WorkflowExecutionCompletedEventAttributes>, pub complete_workflow_execution_failed_event_attributes: Option<CompleteWorkflowExecutionFailedEventAttributes>, pub workflow_execution_failed_event_attributes: Option<WorkflowExecutionFailedEventAttributes>, pub fail_workflow_execution_failed_event_attributes: Option<FailWorkflowExecutionFailedEventAttributes>, pub workflow_execution_timed_out_event_attributes: Option<WorkflowExecutionTimedOutEventAttributes>, pub workflow_execution_canceled_event_attributes: Option<WorkflowExecutionCanceledEventAttributes>, pub cancel_workflow_execution_failed_event_attributes: Option<CancelWorkflowExecutionFailedEventAttributes>, pub workflow_execution_continued_as_new_event_attributes: Option<WorkflowExecutionContinuedAsNewEventAttributes>, pub continue_as_new_workflow_execution_failed_event_attributes: Option<ContinueAsNewWorkflowExecutionFailedEventAttributes>, pub workflow_execution_terminated_event_attributes: Option<WorkflowExecutionTerminatedEventAttributes>, pub workflow_execution_cancel_requested_event_attributes: Option<WorkflowExecutionCancelRequestedEventAttributes>, pub decision_task_scheduled_event_attributes: Option<DecisionTaskScheduledEventAttributes>, pub decision_task_started_event_attributes: Option<DecisionTaskStartedEventAttributes>, pub decision_task_completed_event_attributes: Option<DecisionTaskCompletedEventAttributes>, pub decision_task_timed_out_event_attributes: Option<DecisionTaskTimedOutEventAttributes>, pub activity_task_scheduled_event_attributes: Option<ActivityTaskScheduledEventAttributes>, pub activity_task_started_event_attributes: Option<ActivityTaskStartedEventAttributes>, pub activity_task_completed_event_attributes: Option<ActivityTaskCompletedEventAttributes>, pub activity_task_failed_event_attributes: Option<ActivityTaskFailedEventAttributes>, pub activity_task_timed_out_event_attributes: Option<ActivityTaskTimedOutEventAttributes>, pub activity_task_canceled_event_attributes: Option<ActivityTaskCanceledEventAttributes>, pub activity_task_cancel_requested_event_attributes: Option<ActivityTaskCancelRequestedEventAttributes>, pub workflow_execution_signaled_event_attributes: Option<WorkflowExecutionSignaledEventAttributes>, pub marker_recorded_event_attributes: Option<MarkerRecordedEventAttributes>, pub record_marker_failed_event_attributes: Option<RecordMarkerFailedEventAttributes>, pub timer_started_event_attributes: Option<TimerStartedEventAttributes>, pub timer_fired_event_attributes: Option<TimerFiredEventAttributes>, pub timer_canceled_event_attributes: Option<TimerCanceledEventAttributes>, pub start_child_workflow_execution_initiated_event_attributes: Option<StartChildWorkflowExecutionInitiatedEventAttributes>, pub child_workflow_execution_started_event_attributes: Option<ChildWorkflowExecutionStartedEventAttributes>, pub child_workflow_execution_completed_event_attributes: Option<ChildWorkflowExecutionCompletedEventAttributes>, pub child_workflow_execution_failed_event_attributes: Option<ChildWorkflowExecutionFailedEventAttributes>, pub child_workflow_execution_timed_out_event_attributes: Option<ChildWorkflowExecutionTimedOutEventAttributes>, pub child_workflow_execution_canceled_event_attributes: Option<ChildWorkflowExecutionCanceledEventAttributes>, pub child_workflow_execution_terminated_event_attributes: Option<ChildWorkflowExecutionTerminatedEventAttributes>, pub signal_external_workflow_execution_initiated_event_attributes: Option<SignalExternalWorkflowExecutionInitiatedEventAttributes>, pub external_workflow_execution_signaled_event_attributes: Option<ExternalWorkflowExecutionSignaledEventAttributes>, pub signal_external_workflow_execution_failed_event_attributes: Option<SignalExternalWorkflowExecutionFailedEventAttributes>, pub external_workflow_execution_cancel_requested_event_attributes: Option<ExternalWorkflowExecutionCancelRequestedEventAttributes>, pub request_cancel_external_workflow_execution_initiated_event_attributes: Option<RequestCancelExternalWorkflowExecutionInitiatedEventAttributes>, pub request_cancel_external_workflow_execution_failed_event_attributes: Option<RequestCancelExternalWorkflowExecutionFailedEventAttributes>, pub schedule_activity_task_failed_event_attributes: Option<ScheduleActivityTaskFailedEventAttributes>, pub request_cancel_activity_task_failed_event_attributes: Option<RequestCancelActivityTaskFailedEventAttributes>, pub start_timer_failed_event_attributes: Option<StartTimerFailedEventAttributes>, pub cancel_timer_failed_event_attributes: Option<CancelTimerFailedEventAttributes>, pub start_child_workflow_execution_failed_event_attributes: Option<StartChildWorkflowExecutionFailedEventAttributes>, pub lambda_function_scheduled_event_attributes: Option<LambdaFunctionScheduledEventAttributes>, pub lambda_function_started_event_attributes: Option<LambdaFunctionStartedEventAttributes>, pub lambda_function_completed_event_attributes: Option<LambdaFunctionCompletedEventAttributes>, pub lambda_function_failed_event_attributes: Option<LambdaFunctionFailedEventAttributes>, pub lambda_function_timed_out_event_attributes: Option<LambdaFunctionTimedOutEventAttributes>, pub schedule_lambda_function_failed_event_attributes: Option<ScheduleLambdaFunctionFailedEventAttributes>, pub start_lambda_function_failed_event_attributes: Option<StartLambdaFunctionFailedEventAttributes>,
}
Expand description

Event within a workflow execution. A history event can be one of these types:

  • ActivityTaskCancelRequested – A RequestCancelActivityTask decision was received by the system.

  • ActivityTaskCanceled – The activity task was successfully canceled.

  • ActivityTaskCompleted – An activity worker successfully completed an activity task by calling RespondActivityTaskCompleted.

  • ActivityTaskFailed – An activity worker failed an activity task by calling RespondActivityTaskFailed.

  • ActivityTaskScheduled – An activity task was scheduled for execution.

  • ActivityTaskStarted – The scheduled activity task was dispatched to a worker.

  • ActivityTaskTimedOut – The activity task timed out.

  • CancelTimerFailed – Failed to process CancelTimer decision. This happens when the decision isn't configured properly, for example no timer exists with the specified timer Id.

  • CancelWorkflowExecutionFailed – A request to cancel a workflow execution failed.

  • ChildWorkflowExecutionCanceled – A child workflow execution, started by this workflow execution, was canceled and closed.

  • ChildWorkflowExecutionCompleted – A child workflow execution, started by this workflow execution, completed successfully and was closed.

  • ChildWorkflowExecutionFailed – A child workflow execution, started by this workflow execution, failed to complete successfully and was closed.

  • ChildWorkflowExecutionStarted – A child workflow execution was successfully started.

  • ChildWorkflowExecutionTerminated – A child workflow execution, started by this workflow execution, was terminated.

  • ChildWorkflowExecutionTimedOut – A child workflow execution, started by this workflow execution, timed out and was closed.

  • CompleteWorkflowExecutionFailed – The workflow execution failed to complete.

  • ContinueAsNewWorkflowExecutionFailed – The workflow execution failed to complete after being continued as a new workflow execution.

  • DecisionTaskCompleted – The decider successfully completed a decision task by calling RespondDecisionTaskCompleted.

  • DecisionTaskScheduled – A decision task was scheduled for the workflow execution.

  • DecisionTaskStarted – The decision task was dispatched to a decider.

  • DecisionTaskTimedOut – The decision task timed out.

  • ExternalWorkflowExecutionCancelRequested – Request to cancel an external workflow execution was successfully delivered to the target execution.

  • ExternalWorkflowExecutionSignaled – A signal, requested by this workflow execution, was successfully delivered to the target external workflow execution.

  • FailWorkflowExecutionFailed – A request to mark a workflow execution as failed, itself failed.

  • MarkerRecorded – A marker was recorded in the workflow history as the result of a RecordMarker decision.

  • RecordMarkerFailed – A RecordMarker decision was returned as failed.

  • RequestCancelActivityTaskFailed – Failed to process RequestCancelActivityTask decision. This happens when the decision isn't configured properly.

  • RequestCancelExternalWorkflowExecutionFailed – Request to cancel an external workflow execution failed.

  • RequestCancelExternalWorkflowExecutionInitiated – A request was made to request the cancellation of an external workflow execution.

  • ScheduleActivityTaskFailed – Failed to process ScheduleActivityTask decision. This happens when the decision isn't configured properly, for example the activity type specified isn't registered.

  • SignalExternalWorkflowExecutionFailed – The request to signal an external workflow execution failed.

  • SignalExternalWorkflowExecutionInitiated – A request to signal an external workflow was made.

  • StartActivityTaskFailed – A scheduled activity task failed to start.

  • StartChildWorkflowExecutionFailed – Failed to process StartChildWorkflowExecution decision. This happens when the decision isn't configured properly, for example the workflow type specified isn't registered.

  • StartChildWorkflowExecutionInitiated – A request was made to start a child workflow execution.

  • StartTimerFailed – Failed to process StartTimer decision. This happens when the decision isn't configured properly, for example a timer already exists with the specified timer Id.

  • TimerCanceled – A timer, previously started for this workflow execution, was successfully canceled.

  • TimerFired – A timer, previously started for this workflow execution, fired.

  • TimerStarted – A timer was started for the workflow execution due to a StartTimer decision.

  • WorkflowExecutionCancelRequested – A request to cancel this workflow execution was made.

  • WorkflowExecutionCanceled – The workflow execution was successfully canceled and closed.

  • WorkflowExecutionCompleted – The workflow execution was closed due to successful completion.

  • WorkflowExecutionContinuedAsNew – The workflow execution was closed and a new execution of the same type was created with the same workflowId.

  • WorkflowExecutionFailed – The workflow execution closed due to a failure.

  • WorkflowExecutionSignaled – An external signal was received for the workflow execution.

  • WorkflowExecutionStarted – The workflow execution was started.

  • WorkflowExecutionTerminated – The workflow execution was terminated.

  • WorkflowExecutionTimedOut – The workflow execution was closed because a time out was exceeded.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§event_timestamp: DateTime

The date and time when the event occurred.

§event_type: EventType

The type of the history event.

§event_id: i64

The system generated ID of the event. This ID uniquely identifies the event with in the workflow execution history.

§workflow_execution_started_event_attributes: Option<WorkflowExecutionStartedEventAttributes>

If the event is of type WorkflowExecutionStarted then this member is set and provides detailed information about the event. It isn't set for other event types.

§workflow_execution_completed_event_attributes: Option<WorkflowExecutionCompletedEventAttributes>

If the event is of type WorkflowExecutionCompleted then this member is set and provides detailed information about the event. It isn't set for other event types.

§complete_workflow_execution_failed_event_attributes: Option<CompleteWorkflowExecutionFailedEventAttributes>

If the event is of type CompleteWorkflowExecutionFailed then this member is set and provides detailed information about the event. It isn't set for other event types.

§workflow_execution_failed_event_attributes: Option<WorkflowExecutionFailedEventAttributes>

If the event is of type WorkflowExecutionFailed then this member is set and provides detailed information about the event. It isn't set for other event types.

§fail_workflow_execution_failed_event_attributes: Option<FailWorkflowExecutionFailedEventAttributes>

If the event is of type FailWorkflowExecutionFailed then this member is set and provides detailed information about the event. It isn't set for other event types.

§workflow_execution_timed_out_event_attributes: Option<WorkflowExecutionTimedOutEventAttributes>

If the event is of type WorkflowExecutionTimedOut then this member is set and provides detailed information about the event. It isn't set for other event types.

§workflow_execution_canceled_event_attributes: Option<WorkflowExecutionCanceledEventAttributes>

If the event is of type WorkflowExecutionCanceled then this member is set and provides detailed information about the event. It isn't set for other event types.

§cancel_workflow_execution_failed_event_attributes: Option<CancelWorkflowExecutionFailedEventAttributes>

If the event is of type CancelWorkflowExecutionFailed then this member is set and provides detailed information about the event. It isn't set for other event types.

§workflow_execution_continued_as_new_event_attributes: Option<WorkflowExecutionContinuedAsNewEventAttributes>

If the event is of type WorkflowExecutionContinuedAsNew then this member is set and provides detailed information about the event. It isn't set for other event types.

§continue_as_new_workflow_execution_failed_event_attributes: Option<ContinueAsNewWorkflowExecutionFailedEventAttributes>

If the event is of type ContinueAsNewWorkflowExecutionFailed then this member is set and provides detailed information about the event. It isn't set for other event types.

§workflow_execution_terminated_event_attributes: Option<WorkflowExecutionTerminatedEventAttributes>

If the event is of type WorkflowExecutionTerminated then this member is set and provides detailed information about the event. It isn't set for other event types.

§workflow_execution_cancel_requested_event_attributes: Option<WorkflowExecutionCancelRequestedEventAttributes>

If the event is of type WorkflowExecutionCancelRequested then this member is set and provides detailed information about the event. It isn't set for other event types.

§decision_task_scheduled_event_attributes: Option<DecisionTaskScheduledEventAttributes>

If the event is of type DecisionTaskScheduled then this member is set and provides detailed information about the event. It isn't set for other event types.

§decision_task_started_event_attributes: Option<DecisionTaskStartedEventAttributes>

If the event is of type DecisionTaskStarted then this member is set and provides detailed information about the event. It isn't set for other event types.

§decision_task_completed_event_attributes: Option<DecisionTaskCompletedEventAttributes>

If the event is of type DecisionTaskCompleted then this member is set and provides detailed information about the event. It isn't set for other event types.

§decision_task_timed_out_event_attributes: Option<DecisionTaskTimedOutEventAttributes>

If the event is of type DecisionTaskTimedOut then this member is set and provides detailed information about the event. It isn't set for other event types.

§activity_task_scheduled_event_attributes: Option<ActivityTaskScheduledEventAttributes>

If the event is of type ActivityTaskScheduled then this member is set and provides detailed information about the event. It isn't set for other event types.

§activity_task_started_event_attributes: Option<ActivityTaskStartedEventAttributes>

If the event is of type ActivityTaskStarted then this member is set and provides detailed information about the event. It isn't set for other event types.

§activity_task_completed_event_attributes: Option<ActivityTaskCompletedEventAttributes>

If the event is of type ActivityTaskCompleted then this member is set and provides detailed information about the event. It isn't set for other event types.

§activity_task_failed_event_attributes: Option<ActivityTaskFailedEventAttributes>

If the event is of type ActivityTaskFailed then this member is set and provides detailed information about the event. It isn't set for other event types.

§activity_task_timed_out_event_attributes: Option<ActivityTaskTimedOutEventAttributes>

If the event is of type ActivityTaskTimedOut then this member is set and provides detailed information about the event. It isn't set for other event types.

§activity_task_canceled_event_attributes: Option<ActivityTaskCanceledEventAttributes>

If the event is of type ActivityTaskCanceled then this member is set and provides detailed information about the event. It isn't set for other event types.

§activity_task_cancel_requested_event_attributes: Option<ActivityTaskCancelRequestedEventAttributes>

If the event is of type ActivityTaskcancelRequested then this member is set and provides detailed information about the event. It isn't set for other event types.

§workflow_execution_signaled_event_attributes: Option<WorkflowExecutionSignaledEventAttributes>

If the event is of type WorkflowExecutionSignaled then this member is set and provides detailed information about the event. It isn't set for other event types.

§marker_recorded_event_attributes: Option<MarkerRecordedEventAttributes>

If the event is of type MarkerRecorded then this member is set and provides detailed information about the event. It isn't set for other event types.

§record_marker_failed_event_attributes: Option<RecordMarkerFailedEventAttributes>

If the event is of type DecisionTaskFailed then this member is set and provides detailed information about the event. It isn't set for other event types.

§timer_started_event_attributes: Option<TimerStartedEventAttributes>

If the event is of type TimerStarted then this member is set and provides detailed information about the event. It isn't set for other event types.

§timer_fired_event_attributes: Option<TimerFiredEventAttributes>

If the event is of type TimerFired then this member is set and provides detailed information about the event. It isn't set for other event types.

§timer_canceled_event_attributes: Option<TimerCanceledEventAttributes>

If the event is of type TimerCanceled then this member is set and provides detailed information about the event. It isn't set for other event types.

§start_child_workflow_execution_initiated_event_attributes: Option<StartChildWorkflowExecutionInitiatedEventAttributes>

If the event is of type StartChildWorkflowExecutionInitiated then this member is set and provides detailed information about the event. It isn't set for other event types.

§child_workflow_execution_started_event_attributes: Option<ChildWorkflowExecutionStartedEventAttributes>

If the event is of type ChildWorkflowExecutionStarted then this member is set and provides detailed information about the event. It isn't set for other event types.

§child_workflow_execution_completed_event_attributes: Option<ChildWorkflowExecutionCompletedEventAttributes>

If the event is of type ChildWorkflowExecutionCompleted then this member is set and provides detailed information about the event. It isn't set for other event types.

§child_workflow_execution_failed_event_attributes: Option<ChildWorkflowExecutionFailedEventAttributes>

If the event is of type ChildWorkflowExecutionFailed then this member is set and provides detailed information about the event. It isn't set for other event types.

§child_workflow_execution_timed_out_event_attributes: Option<ChildWorkflowExecutionTimedOutEventAttributes>

If the event is of type ChildWorkflowExecutionTimedOut then this member is set and provides detailed information about the event. It isn't set for other event types.

§child_workflow_execution_canceled_event_attributes: Option<ChildWorkflowExecutionCanceledEventAttributes>

If the event is of type ChildWorkflowExecutionCanceled then this member is set and provides detailed information about the event. It isn't set for other event types.

§child_workflow_execution_terminated_event_attributes: Option<ChildWorkflowExecutionTerminatedEventAttributes>

If the event is of type ChildWorkflowExecutionTerminated then this member is set and provides detailed information about the event. It isn't set for other event types.

§signal_external_workflow_execution_initiated_event_attributes: Option<SignalExternalWorkflowExecutionInitiatedEventAttributes>

If the event is of type SignalExternalWorkflowExecutionInitiated then this member is set and provides detailed information about the event. It isn't set for other event types.

§external_workflow_execution_signaled_event_attributes: Option<ExternalWorkflowExecutionSignaledEventAttributes>

If the event is of type ExternalWorkflowExecutionSignaled then this member is set and provides detailed information about the event. It isn't set for other event types.

§signal_external_workflow_execution_failed_event_attributes: Option<SignalExternalWorkflowExecutionFailedEventAttributes>

If the event is of type SignalExternalWorkflowExecutionFailed then this member is set and provides detailed information about the event. It isn't set for other event types.

§external_workflow_execution_cancel_requested_event_attributes: Option<ExternalWorkflowExecutionCancelRequestedEventAttributes>

If the event is of type ExternalWorkflowExecutionCancelRequested then this member is set and provides detailed information about the event. It isn't set for other event types.

§request_cancel_external_workflow_execution_initiated_event_attributes: Option<RequestCancelExternalWorkflowExecutionInitiatedEventAttributes>

If the event is of type RequestCancelExternalWorkflowExecutionInitiated then this member is set and provides detailed information about the event. It isn't set for other event types.

§request_cancel_external_workflow_execution_failed_event_attributes: Option<RequestCancelExternalWorkflowExecutionFailedEventAttributes>

If the event is of type RequestCancelExternalWorkflowExecutionFailed then this member is set and provides detailed information about the event. It isn't set for other event types.

§schedule_activity_task_failed_event_attributes: Option<ScheduleActivityTaskFailedEventAttributes>

If the event is of type ScheduleActivityTaskFailed then this member is set and provides detailed information about the event. It isn't set for other event types.

§request_cancel_activity_task_failed_event_attributes: Option<RequestCancelActivityTaskFailedEventAttributes>

If the event is of type RequestCancelActivityTaskFailed then this member is set and provides detailed information about the event. It isn't set for other event types.

§start_timer_failed_event_attributes: Option<StartTimerFailedEventAttributes>

If the event is of type StartTimerFailed then this member is set and provides detailed information about the event. It isn't set for other event types.

§cancel_timer_failed_event_attributes: Option<CancelTimerFailedEventAttributes>

If the event is of type CancelTimerFailed then this member is set and provides detailed information about the event. It isn't set for other event types.

§start_child_workflow_execution_failed_event_attributes: Option<StartChildWorkflowExecutionFailedEventAttributes>

If the event is of type StartChildWorkflowExecutionFailed then this member is set and provides detailed information about the event. It isn't set for other event types.

§lambda_function_scheduled_event_attributes: Option<LambdaFunctionScheduledEventAttributes>

Provides the details of the LambdaFunctionScheduled event. It isn't set for other event types.

§lambda_function_started_event_attributes: Option<LambdaFunctionStartedEventAttributes>

Provides the details of the LambdaFunctionStarted event. It isn't set for other event types.

§lambda_function_completed_event_attributes: Option<LambdaFunctionCompletedEventAttributes>

Provides the details of the LambdaFunctionCompleted event. It isn't set for other event types.

§lambda_function_failed_event_attributes: Option<LambdaFunctionFailedEventAttributes>

Provides the details of the LambdaFunctionFailed event. It isn't set for other event types.

§lambda_function_timed_out_event_attributes: Option<LambdaFunctionTimedOutEventAttributes>

Provides the details of the LambdaFunctionTimedOut event. It isn't set for other event types.

§schedule_lambda_function_failed_event_attributes: Option<ScheduleLambdaFunctionFailedEventAttributes>

Provides the details of the ScheduleLambdaFunctionFailed event. It isn't set for other event types.

§start_lambda_function_failed_event_attributes: Option<StartLambdaFunctionFailedEventAttributes>

Provides the details of the StartLambdaFunctionFailed event. It isn't set for other event types.

Implementations§

Source§

impl HistoryEvent

Source

pub fn event_timestamp(&self) -> &DateTime

The date and time when the event occurred.

Source

pub fn event_type(&self) -> &EventType

The type of the history event.

Source

pub fn event_id(&self) -> i64

The system generated ID of the event. This ID uniquely identifies the event with in the workflow execution history.

Source

pub fn workflow_execution_started_event_attributes( &self, ) -> Option<&WorkflowExecutionStartedEventAttributes>

If the event is of type WorkflowExecutionStarted then this member is set and provides detailed information about the event. It isn't set for other event types.

Source

pub fn workflow_execution_completed_event_attributes( &self, ) -> Option<&WorkflowExecutionCompletedEventAttributes>

If the event is of type WorkflowExecutionCompleted then this member is set and provides detailed information about the event. It isn't set for other event types.

Source

pub fn complete_workflow_execution_failed_event_attributes( &self, ) -> Option<&CompleteWorkflowExecutionFailedEventAttributes>

If the event is of type CompleteWorkflowExecutionFailed then this member is set and provides detailed information about the event. It isn't set for other event types.

Source

pub fn workflow_execution_failed_event_attributes( &self, ) -> Option<&WorkflowExecutionFailedEventAttributes>

If the event is of type WorkflowExecutionFailed then this member is set and provides detailed information about the event. It isn't set for other event types.

Source

pub fn fail_workflow_execution_failed_event_attributes( &self, ) -> Option<&FailWorkflowExecutionFailedEventAttributes>

If the event is of type FailWorkflowExecutionFailed then this member is set and provides detailed information about the event. It isn't set for other event types.

Source

pub fn workflow_execution_timed_out_event_attributes( &self, ) -> Option<&WorkflowExecutionTimedOutEventAttributes>

If the event is of type WorkflowExecutionTimedOut then this member is set and provides detailed information about the event. It isn't set for other event types.

Source

pub fn workflow_execution_canceled_event_attributes( &self, ) -> Option<&WorkflowExecutionCanceledEventAttributes>

If the event is of type WorkflowExecutionCanceled then this member is set and provides detailed information about the event. It isn't set for other event types.

Source

pub fn cancel_workflow_execution_failed_event_attributes( &self, ) -> Option<&CancelWorkflowExecutionFailedEventAttributes>

If the event is of type CancelWorkflowExecutionFailed then this member is set and provides detailed information about the event. It isn't set for other event types.

Source

pub fn workflow_execution_continued_as_new_event_attributes( &self, ) -> Option<&WorkflowExecutionContinuedAsNewEventAttributes>

If the event is of type WorkflowExecutionContinuedAsNew then this member is set and provides detailed information about the event. It isn't set for other event types.

Source

pub fn continue_as_new_workflow_execution_failed_event_attributes( &self, ) -> Option<&ContinueAsNewWorkflowExecutionFailedEventAttributes>

If the event is of type ContinueAsNewWorkflowExecutionFailed then this member is set and provides detailed information about the event. It isn't set for other event types.

Source

pub fn workflow_execution_terminated_event_attributes( &self, ) -> Option<&WorkflowExecutionTerminatedEventAttributes>

If the event is of type WorkflowExecutionTerminated then this member is set and provides detailed information about the event. It isn't set for other event types.

Source

pub fn workflow_execution_cancel_requested_event_attributes( &self, ) -> Option<&WorkflowExecutionCancelRequestedEventAttributes>

If the event is of type WorkflowExecutionCancelRequested then this member is set and provides detailed information about the event. It isn't set for other event types.

Source

pub fn decision_task_scheduled_event_attributes( &self, ) -> Option<&DecisionTaskScheduledEventAttributes>

If the event is of type DecisionTaskScheduled then this member is set and provides detailed information about the event. It isn't set for other event types.

Source

pub fn decision_task_started_event_attributes( &self, ) -> Option<&DecisionTaskStartedEventAttributes>

If the event is of type DecisionTaskStarted then this member is set and provides detailed information about the event. It isn't set for other event types.

Source

pub fn decision_task_completed_event_attributes( &self, ) -> Option<&DecisionTaskCompletedEventAttributes>

If the event is of type DecisionTaskCompleted then this member is set and provides detailed information about the event. It isn't set for other event types.

Source

pub fn decision_task_timed_out_event_attributes( &self, ) -> Option<&DecisionTaskTimedOutEventAttributes>

If the event is of type DecisionTaskTimedOut then this member is set and provides detailed information about the event. It isn't set for other event types.

Source

pub fn activity_task_scheduled_event_attributes( &self, ) -> Option<&ActivityTaskScheduledEventAttributes>

If the event is of type ActivityTaskScheduled then this member is set and provides detailed information about the event. It isn't set for other event types.

Source

pub fn activity_task_started_event_attributes( &self, ) -> Option<&ActivityTaskStartedEventAttributes>

If the event is of type ActivityTaskStarted then this member is set and provides detailed information about the event. It isn't set for other event types.

Source

pub fn activity_task_completed_event_attributes( &self, ) -> Option<&ActivityTaskCompletedEventAttributes>

If the event is of type ActivityTaskCompleted then this member is set and provides detailed information about the event. It isn't set for other event types.

Source

pub fn activity_task_failed_event_attributes( &self, ) -> Option<&ActivityTaskFailedEventAttributes>

If the event is of type ActivityTaskFailed then this member is set and provides detailed information about the event. It isn't set for other event types.

Source

pub fn activity_task_timed_out_event_attributes( &self, ) -> Option<&ActivityTaskTimedOutEventAttributes>

If the event is of type ActivityTaskTimedOut then this member is set and provides detailed information about the event. It isn't set for other event types.

Source

pub fn activity_task_canceled_event_attributes( &self, ) -> Option<&ActivityTaskCanceledEventAttributes>

If the event is of type ActivityTaskCanceled then this member is set and provides detailed information about the event. It isn't set for other event types.

Source

pub fn activity_task_cancel_requested_event_attributes( &self, ) -> Option<&ActivityTaskCancelRequestedEventAttributes>

If the event is of type ActivityTaskcancelRequested then this member is set and provides detailed information about the event. It isn't set for other event types.

Source

pub fn workflow_execution_signaled_event_attributes( &self, ) -> Option<&WorkflowExecutionSignaledEventAttributes>

If the event is of type WorkflowExecutionSignaled then this member is set and provides detailed information about the event. It isn't set for other event types.

Source

pub fn marker_recorded_event_attributes( &self, ) -> Option<&MarkerRecordedEventAttributes>

If the event is of type MarkerRecorded then this member is set and provides detailed information about the event. It isn't set for other event types.

Source

pub fn record_marker_failed_event_attributes( &self, ) -> Option<&RecordMarkerFailedEventAttributes>

If the event is of type DecisionTaskFailed then this member is set and provides detailed information about the event. It isn't set for other event types.

Source

pub fn timer_started_event_attributes( &self, ) -> Option<&TimerStartedEventAttributes>

If the event is of type TimerStarted then this member is set and provides detailed information about the event. It isn't set for other event types.

Source

pub fn timer_fired_event_attributes(&self) -> Option<&TimerFiredEventAttributes>

If the event is of type TimerFired then this member is set and provides detailed information about the event. It isn't set for other event types.

Source

pub fn timer_canceled_event_attributes( &self, ) -> Option<&TimerCanceledEventAttributes>

If the event is of type TimerCanceled then this member is set and provides detailed information about the event. It isn't set for other event types.

Source

pub fn start_child_workflow_execution_initiated_event_attributes( &self, ) -> Option<&StartChildWorkflowExecutionInitiatedEventAttributes>

If the event is of type StartChildWorkflowExecutionInitiated then this member is set and provides detailed information about the event. It isn't set for other event types.

Source

pub fn child_workflow_execution_started_event_attributes( &self, ) -> Option<&ChildWorkflowExecutionStartedEventAttributes>

If the event is of type ChildWorkflowExecutionStarted then this member is set and provides detailed information about the event. It isn't set for other event types.

Source

pub fn child_workflow_execution_completed_event_attributes( &self, ) -> Option<&ChildWorkflowExecutionCompletedEventAttributes>

If the event is of type ChildWorkflowExecutionCompleted then this member is set and provides detailed information about the event. It isn't set for other event types.

Source

pub fn child_workflow_execution_failed_event_attributes( &self, ) -> Option<&ChildWorkflowExecutionFailedEventAttributes>

If the event is of type ChildWorkflowExecutionFailed then this member is set and provides detailed information about the event. It isn't set for other event types.

Source

pub fn child_workflow_execution_timed_out_event_attributes( &self, ) -> Option<&ChildWorkflowExecutionTimedOutEventAttributes>

If the event is of type ChildWorkflowExecutionTimedOut then this member is set and provides detailed information about the event. It isn't set for other event types.

Source

pub fn child_workflow_execution_canceled_event_attributes( &self, ) -> Option<&ChildWorkflowExecutionCanceledEventAttributes>

If the event is of type ChildWorkflowExecutionCanceled then this member is set and provides detailed information about the event. It isn't set for other event types.

Source

pub fn child_workflow_execution_terminated_event_attributes( &self, ) -> Option<&ChildWorkflowExecutionTerminatedEventAttributes>

If the event is of type ChildWorkflowExecutionTerminated then this member is set and provides detailed information about the event. It isn't set for other event types.

Source

pub fn signal_external_workflow_execution_initiated_event_attributes( &self, ) -> Option<&SignalExternalWorkflowExecutionInitiatedEventAttributes>

If the event is of type SignalExternalWorkflowExecutionInitiated then this member is set and provides detailed information about the event. It isn't set for other event types.

Source

pub fn external_workflow_execution_signaled_event_attributes( &self, ) -> Option<&ExternalWorkflowExecutionSignaledEventAttributes>

If the event is of type ExternalWorkflowExecutionSignaled then this member is set and provides detailed information about the event. It isn't set for other event types.

Source

pub fn signal_external_workflow_execution_failed_event_attributes( &self, ) -> Option<&SignalExternalWorkflowExecutionFailedEventAttributes>

If the event is of type SignalExternalWorkflowExecutionFailed then this member is set and provides detailed information about the event. It isn't set for other event types.

Source

pub fn external_workflow_execution_cancel_requested_event_attributes( &self, ) -> Option<&ExternalWorkflowExecutionCancelRequestedEventAttributes>

If the event is of type ExternalWorkflowExecutionCancelRequested then this member is set and provides detailed information about the event. It isn't set for other event types.

Source

pub fn request_cancel_external_workflow_execution_initiated_event_attributes( &self, ) -> Option<&RequestCancelExternalWorkflowExecutionInitiatedEventAttributes>

If the event is of type RequestCancelExternalWorkflowExecutionInitiated then this member is set and provides detailed information about the event. It isn't set for other event types.

Source

pub fn request_cancel_external_workflow_execution_failed_event_attributes( &self, ) -> Option<&RequestCancelExternalWorkflowExecutionFailedEventAttributes>

If the event is of type RequestCancelExternalWorkflowExecutionFailed then this member is set and provides detailed information about the event. It isn't set for other event types.

Source

pub fn schedule_activity_task_failed_event_attributes( &self, ) -> Option<&ScheduleActivityTaskFailedEventAttributes>

If the event is of type ScheduleActivityTaskFailed then this member is set and provides detailed information about the event. It isn't set for other event types.

Source

pub fn request_cancel_activity_task_failed_event_attributes( &self, ) -> Option<&RequestCancelActivityTaskFailedEventAttributes>

If the event is of type RequestCancelActivityTaskFailed then this member is set and provides detailed information about the event. It isn't set for other event types.

Source

pub fn start_timer_failed_event_attributes( &self, ) -> Option<&StartTimerFailedEventAttributes>

If the event is of type StartTimerFailed then this member is set and provides detailed information about the event. It isn't set for other event types.

Source

pub fn cancel_timer_failed_event_attributes( &self, ) -> Option<&CancelTimerFailedEventAttributes>

If the event is of type CancelTimerFailed then this member is set and provides detailed information about the event. It isn't set for other event types.

Source

pub fn start_child_workflow_execution_failed_event_attributes( &self, ) -> Option<&StartChildWorkflowExecutionFailedEventAttributes>

If the event is of type StartChildWorkflowExecutionFailed then this member is set and provides detailed information about the event. It isn't set for other event types.

Source

pub fn lambda_function_scheduled_event_attributes( &self, ) -> Option<&LambdaFunctionScheduledEventAttributes>

Provides the details of the LambdaFunctionScheduled event. It isn't set for other event types.

Source

pub fn lambda_function_started_event_attributes( &self, ) -> Option<&LambdaFunctionStartedEventAttributes>

Provides the details of the LambdaFunctionStarted event. It isn't set for other event types.

Source

pub fn lambda_function_completed_event_attributes( &self, ) -> Option<&LambdaFunctionCompletedEventAttributes>

Provides the details of the LambdaFunctionCompleted event. It isn't set for other event types.

Source

pub fn lambda_function_failed_event_attributes( &self, ) -> Option<&LambdaFunctionFailedEventAttributes>

Provides the details of the LambdaFunctionFailed event. It isn't set for other event types.

Source

pub fn lambda_function_timed_out_event_attributes( &self, ) -> Option<&LambdaFunctionTimedOutEventAttributes>

Provides the details of the LambdaFunctionTimedOut event. It isn't set for other event types.

Source

pub fn schedule_lambda_function_failed_event_attributes( &self, ) -> Option<&ScheduleLambdaFunctionFailedEventAttributes>

Provides the details of the ScheduleLambdaFunctionFailed event. It isn't set for other event types.

Source

pub fn start_lambda_function_failed_event_attributes( &self, ) -> Option<&StartLambdaFunctionFailedEventAttributes>

Provides the details of the StartLambdaFunctionFailed event. It isn't set for other event types.

Source§

impl HistoryEvent

Source

pub fn builder() -> HistoryEventBuilder

Creates a new builder-style object to manufacture HistoryEvent.

Trait Implementations§

Source§

impl Clone for HistoryEvent

Source§

fn clone(&self) -> HistoryEvent

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for HistoryEvent

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for HistoryEvent

Source§

fn eq(&self, other: &HistoryEvent) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for HistoryEvent

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<Unshared, Shared> IntoShared<Shared> for Unshared
where Shared: FromUnshared<Unshared>,

Source§

fn into_shared(self) -> Shared

Creates a shared type from an unshared type.
Source§

impl<T> Paint for T
where T: ?Sized,

Source§

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 primary(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Primary].

§Example
println!("{}", value.primary());
Source§

fn fixed(&self, color: u8) -> Painted<&T>

Returns self with the fg() set to [Color :: Fixed].

§Example
println!("{}", value.fixed(color));
Source§

fn rgb(&self, r: u8, g: u8, b: u8) -> Painted<&T>

Returns self with the fg() set to [Color :: Rgb].

§Example
println!("{}", value.rgb(r, g, b));
Source§

fn black(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Black].

§Example
println!("{}", value.black());
Source§

fn red(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Red].

§Example
println!("{}", value.red());
Source§

fn green(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Green].

§Example
println!("{}", value.green());
Source§

fn yellow(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Yellow].

§Example
println!("{}", value.yellow());
Source§

fn blue(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Blue].

§Example
println!("{}", value.blue());
Source§

fn magenta(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Magenta].

§Example
println!("{}", value.magenta());
Source§

fn cyan(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Cyan].

§Example
println!("{}", value.cyan());
Source§

fn white(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: White].

§Example
println!("{}", value.white());
Source§

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>

Returns self with the fg() set to [Color :: BrightRed].

§Example
println!("{}", value.bright_red());
Source§

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>

Returns self with the fg() set to [Color :: BrightYellow].

§Example
println!("{}", value.bright_yellow());
Source§

fn bright_blue(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightBlue].

§Example
println!("{}", value.bright_blue());
Source§

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>

Returns self with the fg() set to [Color :: BrightCyan].

§Example
println!("{}", value.bright_cyan());
Source§

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>

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>

Returns self with the bg() set to [Color :: Primary].

§Example
println!("{}", value.on_primary());
Source§

fn on_fixed(&self, color: u8) -> Painted<&T>

Returns self with the bg() set to [Color :: Fixed].

§Example
println!("{}", value.on_fixed(color));
Source§

fn on_rgb(&self, r: u8, g: u8, b: u8) -> Painted<&T>

Returns self with the bg() set to [Color :: Rgb].

§Example
println!("{}", value.on_rgb(r, g, b));
Source§

fn on_black(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Black].

§Example
println!("{}", value.on_black());
Source§

fn on_red(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Red].

§Example
println!("{}", value.on_red());
Source§

fn on_green(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Green].

§Example
println!("{}", value.on_green());
Source§

fn on_yellow(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Yellow].

§Example
println!("{}", value.on_yellow());
Source§

fn on_blue(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Blue].

§Example
println!("{}", value.on_blue());
Source§

fn on_magenta(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Magenta].

§Example
println!("{}", value.on_magenta());
Source§

fn on_cyan(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Cyan].

§Example
println!("{}", value.on_cyan());
Source§

fn on_white(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: White].

§Example
println!("{}", value.on_white());
Source§

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>

Returns self with the bg() set to [Color :: BrightRed].

§Example
println!("{}", value.on_bright_red());
Source§

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>

Returns self with the bg() set to [Color :: BrightYellow].

§Example
println!("{}", value.on_bright_yellow());
Source§

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>

Returns self with the bg() set to [Color :: BrightMagenta].

§Example
println!("{}", value.on_bright_magenta());
Source§

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>

Returns self with the bg() set to [Color :: BrightWhite].

§Example
println!("{}", value.on_bright_white());
Source§

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 bold(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Bold].

§Example
println!("{}", value.bold());
Source§

fn dim(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Dim].

§Example
println!("{}", value.dim());
Source§

fn italic(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Italic].

§Example
println!("{}", value.italic());
Source§

fn underline(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Underline].

§Example
println!("{}", value.underline());

Returns self with the attr() set to [Attribute :: Blink].

§Example
println!("{}", value.blink());

Returns self with the attr() set to [Attribute :: RapidBlink].

§Example
println!("{}", value.rapid_blink());
Source§

fn invert(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Invert].

§Example
println!("{}", value.invert());
Source§

fn conceal(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Conceal].

§Example
println!("{}", value.conceal());
Source§

fn strike(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Strike].

§Example
println!("{}", value.strike());
Source§

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 mask(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Mask].

§Example
println!("{}", value.mask());
Source§

fn wrap(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Wrap].

§Example
println!("{}", value.wrap());
Source§

fn linger(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Linger].

§Example
println!("{}", value.linger());
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.

Returns self with the quirk() set to [Quirk :: Clear].

§Example
println!("{}", value.clear());
Source§

fn resetting(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Resetting].

§Example
println!("{}", value.resetting());
Source§

fn bright(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Bright].

§Example
println!("{}", value.bright());
Source§

fn on_bright(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: OnBright].

§Example
println!("{}", value.on_bright());
Source§

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);
Source§

fn new(self) -> Painted<Self>
where Self: Sized,

Create a new Painted with a default Style. Read more
Source§

fn paint<S>(&self, style: S) -> Painted<&Self>
where S: Into<Style>,

Apply a style wholesale to self. Any previous style is replaced. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,