Struct rnp::PingResult
source · [−]pub struct PingResult { /* private fields */ }
Implementations
sourceimpl PingResult
impl PingResult
sourcepub fn new(
time: &DateTime<Utc>,
worker_id: u32,
protocol: &'static str,
target: SocketAddr,
source: SocketAddr,
is_warmup: bool,
is_succeeded: bool,
round_trip_time: Duration,
is_timed_out: bool,
warning: Option<PingClientWarning>,
error: Option<PingClientError>
) -> PingResult
pub fn new(
time: &DateTime<Utc>,
worker_id: u32,
protocol: &'static str,
target: SocketAddr,
source: SocketAddr,
is_warmup: bool,
is_succeeded: bool,
round_trip_time: Duration,
is_timed_out: bool,
warning: Option<PingClientWarning>,
error: Option<PingClientError>
) -> PingResult
Contracts
Pre-condition: is_succeeded ->! is_timed_out && error.is_none()
Pre-condition: warning.is_some() -> is_succeeded
Pre-condition: ! is_succeeded -> (is_timed_out || error.is_some()) && warning.is_none()
pub fn ping_time(&self) -> &DateTime<Utc>
pub fn worker_id(&self) -> u32
pub fn protocol(&self) -> &'static str
pub fn target(&self) -> SocketAddr
pub fn source(&self) -> SocketAddr
pub fn is_warmup(&self) -> bool
pub fn is_succeeded(&self) -> bool
pub fn round_trip_time(&self) -> Duration
pub fn is_timed_out(&self) -> bool
pub fn warning(&self) -> &Option<PingClientWarning>
pub fn error(&self) -> &Option<PingClientError>
pub fn is_preparation_error(&self) -> bool
pub fn create_dto(&self) -> PingResultDto
pub fn format_as_console_log(&self) -> String
pub fn format_as_json_string(&self) -> String
pub fn format_as_csv_string(&self) -> String
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for PingResult
impl Send for PingResult
impl !Sync for PingResult
impl Unpin for PingResult
impl !UnwindSafe for PingResult
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for Twhere
V: MultiLane<T>,
impl<V, T> VZip<V> for Twhere
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
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
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more