pub struct ServiceDetector {
pub setting: ProbeSetting,
/* private fields */
}
Expand description
Struct for service detection
Fields§
§setting: ProbeSetting
Probe setting for service detection
Implementations§
Source§impl ServiceDetector
impl ServiceDetector
Sourcepub fn new(setting: ProbeSetting) -> ServiceDetector
pub fn new(setting: ProbeSetting) -> ServiceDetector
Create new ServiceDetector
Sourcepub fn detect(&self) -> HashMap<u16, ServiceProbeResult>
pub fn detect(&self) -> HashMap<u16, ServiceProbeResult>
Run service detection and return result
Sourcepub async fn async_detect(&self) -> HashMap<u16, ServiceProbeResult>
pub async fn async_detect(&self) -> HashMap<u16, ServiceProbeResult>
Run service detection asynchronously and return result
Sourcepub fn start_detection(&mut self)
pub fn start_detection(&mut self)
Run service detection and store result in self.result
Sourcepub async fn start_async_detection(&mut self)
pub async fn start_async_detection(&mut self)
Run service detection asynchronously and store result in self.result
Sourcepub fn get_result(&self) -> &HashMap<u16, ServiceProbeResult>
pub fn get_result(&self) -> &HashMap<u16, ServiceProbeResult>
Get result of service detection
Sourcepub fn get_result_for_port(&self, port: u16) -> Option<&ServiceProbeResult>
pub fn get_result_for_port(&self, port: u16) -> Option<&ServiceProbeResult>
Get result for specified port. Returns None if port is not found.
Trait Implementations§
Source§impl Clone for ServiceDetector
impl Clone for ServiceDetector
Source§fn clone(&self) -> ServiceDetector
fn clone(&self) -> ServiceDetector
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 moreAuto Trait Implementations§
impl Freeze for ServiceDetector
impl RefUnwindSafe for ServiceDetector
impl Send for ServiceDetector
impl Sync for ServiceDetector
impl Unpin for ServiceDetector
impl UnwindSafe for ServiceDetector
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