GoodMemGoodMem
ReferenceSdkRustTypes

PingResult

Rust struct goodmem::models::PingResult: declaration, fields or variants, and implementations.

All types

Struct PingResult

goodmem::models::PingResult

Result from an individual ping probe

pub struct PingResult {
    pub endpoint: Box<PingEndpointInfo>,
    pub seq: i32,
    pub bytes_sent: i32,
    pub bytes_received: i32,
    pub ok: bool,
    pub http_status: i32,
    pub error_message: Option<String>,
    pub rtt_ms: f64,
    pub timing: Box<PingTiming>,
    pub metadata: Option<BTreeMap<String, String>>,
}

Referenced types: PingEndpointInfo, PingTiming.

Fields

endpoint

pub endpoint: Box<PingEndpointInfo>

Resolved endpoint metadata for the target Wire name: endpoint.

seq

pub seq: i32

Sequential probe number (1-based) Wire name: seq.

bytes_sent

pub bytes_sent: i32

Payload bytes transmitted Wire name: bytesSent.

bytes_received

pub bytes_received: i32

Payload bytes received Wire name: bytesReceived.

ok

pub ok: bool

True when the provider responded successfully within the timeout Wire name: ok.

http_status

pub http_status: i32

Provider HTTP status code or equivalent transport status Wire name: httpStatus.

error_message

pub error_message: Option<String>

Human-readable error message when ok=false Wire name: errorMessage.

rtt_ms

pub rtt_ms: f64

Observed round-trip latency in milliseconds Wire name: rttMs.

timing

pub timing: Box<PingTiming>

Raw timing data recorded on the server Wire name: timing.

metadata

pub metadata: Option<BTreeMap<String, String>>

Additional provider metadata (request IDs, throttling signals, etc.) Wire name: metadata.

Implementations

validate

pub fn validate(&self) -> crate::Result<()>

Validate the request before sending, without making an HTTP call.

Trait implementations

  • Clone (derived)
  • Default (derived)
  • PartialEq (derived)
  • Serialize (derived)
  • impl<'de> Deserialize<'de> for PingResult
  • impl std::fmt::Debug for PingResult

On this page