pub struct ProbeResult {
pub target: String,
pub resolved_ip: IpAddr,
pub protocol: Protocol,
pub success: bool,
pub timing: TimingBreakdown,
pub ttl: Option<u8>,
pub error: Option<String>,
pub response_data: Option<ResponseData>,
}Expand description
Result of a single probe operation
Fields§
§target: StringTarget that was probed
resolved_ip: IpAddrResolved IP address
protocol: ProtocolProtocol used
success: boolWhether the probe succeeded
timing: TimingBreakdownTiming breakdown
ttl: Option<u8>TTL/hop count from response (if available)
error: Option<String>Error message if probe failed
response_data: Option<ResponseData>Response data (protocol-specific)
Implementations§
Source§impl ProbeResult
impl ProbeResult
Sourcepub fn success(
target: String,
resolved_ip: IpAddr,
protocol: Protocol,
timing: TimingBreakdown,
) -> Self
pub fn success( target: String, resolved_ip: IpAddr, protocol: Protocol, timing: TimingBreakdown, ) -> Self
Create a successful probe result
Sourcepub fn failure(
target: String,
resolved_ip: IpAddr,
protocol: Protocol,
error: String,
timing: TimingBreakdown,
) -> Self
pub fn failure( target: String, resolved_ip: IpAddr, protocol: Protocol, error: String, timing: TimingBreakdown, ) -> Self
Create a failed probe result
Sourcepub fn with_response_data(self, data: ResponseData) -> Self
pub fn with_response_data(self, data: ResponseData) -> Self
Set response data
Trait Implementations§
Source§impl Clone for ProbeResult
impl Clone for ProbeResult
Source§fn clone(&self) -> ProbeResult
fn clone(&self) -> ProbeResult
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ProbeResult
impl RefUnwindSafe for ProbeResult
impl Send for ProbeResult
impl Sync for ProbeResult
impl Unpin for ProbeResult
impl UnsafeUnpin for ProbeResult
impl UnwindSafe for ProbeResult
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
Mutably borrows from an owned value. Read more