fxa_client/state_machine/
display.rs1use super::{FxaEvent, FxaState};
11use std::fmt;
12
13impl fmt::Display for FxaState {
14 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
15 let name = match self {
16 Self::Uninitialized => "Uninitialized",
17 Self::Disconnected => "Disconnected",
18 Self::Authenticating { .. } => "Authenticating",
19 Self::Connected => "Connected",
20 Self::AuthIssues => "AuthIssues",
21 };
22 write!(f, "{name}")
23 }
24}
25
26impl fmt::Display for FxaEvent {
27 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
28 let name = match self {
29 Self::Initialize { .. } => "Initialize",
30 Self::BeginOAuthFlow { .. } => "BeginOAuthFlow",
31 Self::BeginPairingFlow { .. } => "BeginPairingFlow",
32 Self::CompleteOAuthFlow { .. } => "CompleteOAuthFlow",
33 Self::CancelOAuthFlow => "CancelOAuthFlow",
34 Self::CheckAuthorizationStatus => "CheckAuthorizationStatus",
35 Self::WebChannelPasswordChange { .. } => "WebChannelPwdChange",
36 Self::Disconnect => "Disconnect",
37 Self::CallGetProfile => "CallGetProfile",
38 };
39 write!(f, "{name}")
40 }
41}