Advertisement
Guest User

Untitled

a guest
Mar 25th, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. struct AppState<'a> {
  2. services: &'a AppServices<'a>,
  3. }
  4.  
  5. impl<'a> AppState<'a> {
  6. pub fn new() -> Self {
  7. AppState {
  8. services: &AppServices { id: None },
  9. }
  10. }
  11. }
  12.  
  13. struct AppServices<'a> {
  14. id: Option<&'a IdService<'a>>,
  15. }
  16.  
  17. struct IdService<'a> {
  18. name: String,
  19. state: &'a AppState<'a>,
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement