Struct netscan::setting::Destination
source · [−]Expand description
Struct of destination information
Destination IP address and ports
Fields
dst_ip: IpAddrDestination IP address
dst_ports: Vec<u16>Destination ports
Implementations
sourceimpl Destination
impl Destination
sourcepub fn new(ip_addr: IpAddr, ports: Vec<u16>) -> Destination
pub fn new(ip_addr: IpAddr, ports: Vec<u16>) -> Destination
Create new Destination from IP address and ports
sourcepub fn new_with_port_range(
ip_addr: IpAddr,
start_port: u16,
end_port: u16
) -> Destination
pub fn new_with_port_range(
ip_addr: IpAddr,
start_port: u16,
end_port: u16
) -> Destination
Create new Destination with IP address and port range
sourcepub fn set_dst_ip(&mut self, ip_addr: IpAddr)
pub fn set_dst_ip(&mut self, ip_addr: IpAddr)
Set destination IP address
sourcepub fn get_dst_ip(&self) -> IpAddr
pub fn get_dst_ip(&self) -> IpAddr
Get destination IP address
sourcepub fn set_dst_port(&mut self, ports: Vec<u16>)
pub fn set_dst_port(&mut self, ports: Vec<u16>)
Set destination ports
sourcepub fn get_dst_port(&self) -> Vec<u16>
pub fn get_dst_port(&self) -> Vec<u16>
Get destination ports
Trait Implementations
sourceimpl Clone for Destination
impl Clone for Destination
sourcefn clone(&self) -> Destination
fn clone(&self) -> Destination
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
Auto Trait Implementations
impl RefUnwindSafe for Destination
impl Send for Destination
impl Sync for Destination
impl Unpin for Destination
impl UnwindSafe for Destination
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more