Created
June 15, 2022 22:36
-
-
Save jcrossley3/fda5d4e94e8b5e8284312452733caf47 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct Provisionee<S> { | |
state: S, | |
} | |
impl Provisionee<Invite> { | |
fn new() -> Self { | |
Provisionee { state: Invite } | |
} | |
} | |
impl From<Provisionee<Invite>> for Provisionee<Capabilities> { | |
fn from(val: Provisionee<Invite>) -> Provisionee<Capabilities> { | |
Provisionee { | |
state: Capabilities, | |
} | |
} | |
} | |
impl From<Provisionee<Capabilities>> for Provisionee<Start> { | |
fn from(val: Provisionee<Capabilities>) -> Provisionee<Start> { | |
Provisionee { state: Start } | |
} | |
} | |
struct Invite; | |
struct Capabilities; | |
struct Start; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment