pub struct ServiceProbeResult {
pub port: u16,
pub service_name: String,
pub service_detail: Option<String>,
pub response: Vec<u8>,
pub error: Option<ServiceProbeError>,
}
Expand description
Result of a service probe
Fields§
§port: u16
§service_name: String
§service_detail: Option<String>
§response: Vec<u8>
§error: Option<ServiceProbeError>
Implementations§
Source§impl ServiceProbeResult
impl ServiceProbeResult
Sourcepub fn new(port: u16, service_name: String, response: Vec<u8>) -> Self
pub fn new(port: u16, service_name: String, response: Vec<u8>) -> Self
Create a new successful probe result
Sourcepub fn with_error(
port: u16,
service_name: String,
error: ServiceProbeError,
) -> Self
pub fn with_error( port: u16, service_name: String, error: ServiceProbeError, ) -> Self
Create a new probe result with an error
Sourcepub fn error(&self) -> Option<&ServiceProbeError>
pub fn error(&self) -> Option<&ServiceProbeError>
Get a reference to the contained error, if any
Sourcepub fn into_error(self) -> Option<ServiceProbeError>
pub fn into_error(self) -> Option<ServiceProbeError>
Extract the error, consuming the result
Trait Implementations§
Source§impl Clone for ServiceProbeResult
impl Clone for ServiceProbeResult
Source§fn clone(&self) -> ServiceProbeResult
fn clone(&self) -> ServiceProbeResult
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ServiceProbeResult
impl Debug for ServiceProbeResult
Source§impl PartialEq for ServiceProbeResult
impl PartialEq for ServiceProbeResult
impl StructuralPartialEq for ServiceProbeResult
Auto Trait Implementations§
impl Freeze for ServiceProbeResult
impl RefUnwindSafe for ServiceProbeResult
impl Send for ServiceProbeResult
impl Sync for ServiceProbeResult
impl Unpin for ServiceProbeResult
impl UnwindSafe for ServiceProbeResult
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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