pub struct NatDetector { /* private fields */ }Expand description
NAT detection configuration
Implementations§
Source§impl NatDetector
impl NatDetector
Sourcepub const fn method(self, method: NatDetectionMethod) -> Self
pub const fn method(self, method: NatDetectionMethod) -> Self
Set the detection method
Sourcepub fn stun_servers(self, servers: Vec<String>) -> Self
pub fn stun_servers(self, servers: Vec<String>) -> Self
Set custom STUN servers
Sourcepub fn is_behind_nat(&self) -> Result<bool>
pub fn is_behind_nat(&self) -> Result<bool>
Check if the system is behind NAT
§Errors
Returns an error if interface listing fails or if NAT detection fails
Trait Implementations§
Source§impl Clone for NatDetector
impl Clone for NatDetector
Source§impl Debug for NatDetector
impl Debug for NatDetector
Auto Trait Implementations§
impl Freeze for NatDetector
impl RefUnwindSafe for NatDetector
impl Send for NatDetector
impl Sync for NatDetector
impl Unpin for NatDetector
impl UnsafeUnpin for NatDetector
impl UnwindSafe for NatDetector
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