naia_client_socket/
server_addr.rs

1use std::net::SocketAddr;
2
3/// The server's socket address, if it has been found
4#[derive(Debug, Clone, Copy, Eq, PartialEq)]
5pub enum ServerAddr {
6    /// Client has found the server's socket address
7    Found(SocketAddr),
8    /// Client is still finding the server's socket address
9    Finding,
10}
11
12impl ServerAddr {
13    pub fn is_found(&self) -> bool {
14        match self {
15            ServerAddr::Found(_) => true,
16            ServerAddr::Finding => false,
17        }
18    }
19}