pub struct Destination {
pub dst_ip: IpAddr,
pub dst_ports: Vec<u16>,
}Expand description
Struct of destination information
Destination IP address and ports
Fields§
§dst_ip: IpAddrDestination IP address
dst_ports: Vec<u16>Destination ports
Implementations§
Source§impl 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§
Source§impl Clone for Destination
impl Clone for Destination
Source§fn clone(&self) -> Destination
fn clone(&self) -> Destination
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 Destination
impl RefUnwindSafe for Destination
impl Send for Destination
impl Sync for Destination
impl Unpin for Destination
impl UnwindSafe for Destination
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