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