cscart_rs/service/
state.rs1use crate::ServiceAuth;
2
3pub struct Unconfigured;
5pub struct Unauthenticated;
6pub struct OnlyHost;
7pub struct OnlyAuth;
8pub struct Authenticated;
9
10pub trait ServiceState {}
12
13impl ServiceState for Unconfigured {}
14impl ServiceState for Unauthenticated {}
15impl ServiceState for Authenticated {}
16impl ServiceState for OnlyHost {}
17impl ServiceState for OnlyAuth {}
18
19pub trait ConfiguredService {
21 fn auth(&self) -> ServiceAuth;
22 fn host(&self) -> String;
23}