pub struct DiscoveredHost {
pub id: Option<i32>,
pub ip: String,
pub mac_address: String,
pub vendor_name: String,
pub discovered_at: DateTime<Utc>,
pub open_ports: Vec<ServicePort>,
}
Expand description
Represents a host discovered on the network.
This struct contains details such as the host’s IP address, MAC address, vendor name, and open ports.
Fields§
§id: Option<i32>
§ip: String
§mac_address: String
§vendor_name: String
§discovered_at: DateTime<Utc>
§open_ports: Vec<ServicePort>
Implementations§
Source§impl DiscoveredHost
impl DiscoveredHost
Sourcepub fn new(
ip: String,
mac_address: String,
vendor_name: String,
open_ports: Vec<ServicePort>,
) -> Self
pub fn new( ip: String, mac_address: String, vendor_name: String, open_ports: Vec<ServicePort>, ) -> Self
Creates a new instance of DiscoveredHost
.
§Arguments
ip
- The IP address of the host.mac_address
- The MAC address of the host.vendor_name
- The vendor name associated with the MAC address.open_ports
- A vector of open service ports on the host.
Trait Implementations§
Source§impl Clone for DiscoveredHost
impl Clone for DiscoveredHost
Source§fn clone(&self) -> DiscoveredHost
fn clone(&self) -> DiscoveredHost
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 CustomSerializer<DiscoveredHost> for DiscoveredHost
impl CustomSerializer<DiscoveredHost> for DiscoveredHost
Source§fn to_json_string(&self) -> String
fn to_json_string(&self) -> String
Serializes the implementor into a JSON string. Read more
Source§fn from_json_string(data_string: String) -> Twhere
T: for<'a> Deserialize<'a>,
fn from_json_string(data_string: String) -> Twhere
T: for<'a> Deserialize<'a>,
Deserializes an instance of the implementing type from a JSON string. Read more
Source§impl Debug for DiscoveredHost
impl Debug for DiscoveredHost
Source§impl<'de> Deserialize<'de> for DiscoveredHost
impl<'de> Deserialize<'de> for DiscoveredHost
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<'a, R: Row> FromRow<'a, R> for DiscoveredHost
impl<'a, R: Row> FromRow<'a, R> for DiscoveredHost
Source§impl Ord for DiscoveredHost
impl Ord for DiscoveredHost
Source§fn cmp(&self, other: &DiscoveredHost) -> Ordering
fn cmp(&self, other: &DiscoveredHost) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for DiscoveredHost
impl PartialEq for DiscoveredHost
Source§impl PartialOrd for DiscoveredHost
impl PartialOrd for DiscoveredHost
Source§impl Serialize for DiscoveredHost
impl Serialize for DiscoveredHost
impl Eq for DiscoveredHost
impl StructuralPartialEq for DiscoveredHost
Auto Trait Implementations§
impl Freeze for DiscoveredHost
impl RefUnwindSafe for DiscoveredHost
impl Send for DiscoveredHost
impl Sync for DiscoveredHost
impl Unpin for DiscoveredHost
impl UnwindSafe for DiscoveredHost
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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