#[non_exhaustive]pub struct Trace {
pub endpoint_info: Option<EndpointInfo>,
pub steps: Vec<Step>,
pub forward_trace_id: i32,
/* private fields */
}Expand description
Trace represents one simulated packet forwarding path.
- Each trace contains multiple ordered steps.
- Each step is in a particular state with associated configuration.
- State is categorized as final or non-final states.
- Each final state has a reason associated.
- Each trace must end with a final state (the last step).
|---------------------Trace----------------------|
Step1(State) Step2(State) --- StepN(State(final))Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.endpoint_info: Option<EndpointInfo>Derived from the source and destination endpoints definition specified by user request, and validated by the data plane model. If there are multiple traces starting from different source locations, then the endpoint_info may be different between traces.
steps: Vec<Step>A trace of a test contains multiple steps from the initial state to the final state (delivered, dropped, forwarded, or aborted).
The steps are ordered by the processing sequence within the simulated network state machine. It is critical to preserve the order of the steps and avoid reordering or sorting them.
forward_trace_id: i32ID of trace. For forward traces, this ID is unique for each trace. For return traces, it matches ID of associated forward trace. A single forward trace can be associated with none, one or more than one return trace.
Implementations§
Source§impl Trace
impl Trace
Sourcepub fn set_endpoint_info<T>(self, v: T) -> Selfwhere
T: Into<EndpointInfo>,
pub fn set_endpoint_info<T>(self, v: T) -> Selfwhere
T: Into<EndpointInfo>,
Sets the value of endpoint_info.
§Example
use google_cloud_networkmanagement_v1::model::EndpointInfo;
let x = Trace::new().set_endpoint_info(EndpointInfo::default()/* use setters */);Sourcepub fn set_or_clear_endpoint_info<T>(self, v: Option<T>) -> Selfwhere
T: Into<EndpointInfo>,
pub fn set_or_clear_endpoint_info<T>(self, v: Option<T>) -> Selfwhere
T: Into<EndpointInfo>,
Sets or clears the value of endpoint_info.
§Example
use google_cloud_networkmanagement_v1::model::EndpointInfo;
let x = Trace::new().set_or_clear_endpoint_info(Some(EndpointInfo::default()/* use setters */));
let x = Trace::new().set_or_clear_endpoint_info(None::<EndpointInfo>);