leptos_use/core/
connection_ready_state.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
use std::fmt;

/// The current state of a network connection.
#[derive(Debug, PartialEq, Eq, Clone, Hash, Copy)]
pub enum ConnectionReadyState {
    Connecting,
    Open,
    Closing,
    Closed,
}

impl fmt::Display for ConnectionReadyState {
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        match *self {
            ConnectionReadyState::Connecting => write!(f, "Connecting"),
            ConnectionReadyState::Open => write!(f, "Open"),
            ConnectionReadyState::Closing => write!(f, "Closing"),
            ConnectionReadyState::Closed => write!(f, "Closed"),
        }
    }
}