Struct capsules_extra::net::network_capabilities::NetworkCapability
source · pub struct NetworkCapability { /* private fields */ }
Expand description
The NetworkCapability specifies access to network resourcess across the UDP and IP layers. Access to layer-specific information is mediated by the UdpVsibilityCapability and the IpVisibilityCapability.
Implementations§
source§impl NetworkCapability
impl NetworkCapability
pub fn new( remote_addrs: AddrRange, remote_ports: PortRange, local_ports: PortRange, _create_net_cap: &dyn NetworkCapabilityCreationCapability, ) -> NetworkCapability
pub fn get_range(&self, _ip_cap: &'static IpVisibilityCapability) -> AddrRange
pub fn remote_addr_valid( &self, remote_addr: IPAddr, _ip_cap: &'static IpVisibilityCapability, ) -> bool
pub fn get_remote_ports( &self, _udp_cap: &'static UdpVisibilityCapability, ) -> PortRange
pub fn get_local_ports( &self, _udp_cap: &'static UdpVisibilityCapability, ) -> PortRange
pub fn remote_port_valid( &self, remote_port: u16, _udp_cap: &'static UdpVisibilityCapability, ) -> bool
pub fn local_port_valid( &self, local_port: u16, _udp_cap: &'static UdpVisibilityCapability, ) -> bool
Auto Trait Implementations§
impl Freeze for NetworkCapability
impl RefUnwindSafe for NetworkCapability
impl Send for NetworkCapability
impl Sync for NetworkCapability
impl Unpin for NetworkCapability
impl UnwindSafe for NetworkCapability
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