mirror of
https://github.com/vnt-dev/vnt.git
synced 2026-12-06 00:05:39 +00:00
[mio] 简化校验
This commit is contained in:
1 parent
7bc4203deb
commit
1b1663c87e
1 file changed
+9
@@ -110,6 +110,15 @@ pub enum ConnectStatus {
|
||||
Connected,
|
||||
}
|
||||
|
||||
impl ConnectStatus {
|
||||
pub fn online(&self) -> bool {
|
||||
self == &ConnectStatus::Connected
|
||||
}
|
||||
pub fn offline(&self) -> bool {
|
||||
self == &ConnectStatus::Connecting
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
|
||||
pub struct CurrentDeviceInfo {
|
||||
//本机虚拟IP
|
||||
|
||||
Reference in new issue
Block a user