pub struct ClientState {
pub active: bool,
pub active_addr: Option<SocketAddr>,
pub alive: bool,
pub dns_ips: Vec<IpAddr>,
pub ips: HashSet<IpAddr>,
pub has_pressed_keys: bool,
pub resolving: bool,
}
Fields§
§active: bool
events should be sent to and received from the client
active_addr: Option<SocketAddr>
active
address of the client, used to send data to.
This should generally be the socket address where data
was last received from.
alive: bool
tracks whether or not the client is responding to pings
dns_ips: Vec<IpAddr>
ips from dns
ips: HashSet<IpAddr>
all ip addresses associated with a particular client e.g. Laptops usually have at least an ethernet and a wifi port which have different ip addresses
has_pressed_keys: bool
client has pressed keys
resolving: bool
dns resolving in progress
Trait Implementations§
Source§impl Clone for ClientState
impl Clone for ClientState
Source§fn clone(&self) -> ClientState
fn clone(&self) -> ClientState
Returns a copy 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 moreSource§impl Debug for ClientState
impl Debug for ClientState
Source§impl Default for ClientState
impl Default for ClientState
Source§fn default() -> ClientState
fn default() -> ClientState
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ClientState
impl<'de> Deserialize<'de> for ClientState
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ClientState
impl RefUnwindSafe for ClientState
impl Send for ClientState
impl Sync for ClientState
impl Unpin for ClientState
impl UnwindSafe for ClientState
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)