leptos_use/core/
connection_ready_state.rs1use std::fmt;
2
3#[derive(Debug, PartialEq, Eq, Clone, Hash, Copy)]
5pub enum ConnectionReadyState {
6 Connecting,
7 Open,
8 Closing,
9 Closed,
10}
11
12impl fmt::Display for ConnectionReadyState {
13 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
14 match *self {
15 ConnectionReadyState::Connecting => write!(f, "Connecting"),
16 ConnectionReadyState::Open => write!(f, "Open"),
17 ConnectionReadyState::Closing => write!(f, "Closing"),
18 ConnectionReadyState::Closed => write!(f, "Closed"),
19 }
20 }
21}