Advertisement
Voodlaz

Untitled

Jan 7th, 2021
516
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Rust 3.59 KB | None | 0 0
  1. error[E0412]: cannot find type `Duration` in this scope
  2.   --> src/main.rs:15:27
  3.    |
  4. 15 | const HEARTBEAT_INTERVAL: Duration = Duration::from_secs(5);
  5.    |                           ^^^^^^^^ not found in this scope
  6.    |
  7. help: consider importing one of these items
  8.    |
  9. 1  | use actix::clock::Duration;
  10.    |
  11. 1  | use core::time::Duration;
  12.    |
  13. 1  | use crate::clock::Duration;
  14.    |
  15. 1  | use std::time::Duration;
  16.    |
  17.  
  18. error[E0433]: failed to resolve: use of undeclared type `Duration`
  19.   --> src/main.rs:15:38
  20.    |
  21. 15 | const HEARTBEAT_INTERVAL: Duration = Duration::from_secs(5);
  22.    |                                      ^^^^^^^^ not found in this scope
  23.    |
  24. help: consider importing one of these items
  25.    |
  26. 1  | use actix::clock::Duration;
  27.    |
  28. 1  | use core::time::Duration;
  29.    |
  30. 1  | use crate::clock::Duration;
  31.    |
  32. 1  | use std::time::Duration;
  33.    |
  34.  
  35. error[E0412]: cannot find type `Duration` in this scope
  36.   --> src/main.rs:16:23
  37.    |
  38. 16 | const CLIENT_TIMEOUT: Duration = Duration::from_secs(10);
  39.    |                       ^^^^^^^^ not found in this scope
  40.    |
  41. help: consider importing one of these items
  42.    |
  43. 1  | use actix::clock::Duration;
  44.    |
  45. 1  | use core::time::Duration;
  46.    |
  47. 1  | use crate::clock::Duration;
  48.    |
  49. 1  | use std::time::Duration;
  50.    |
  51.  
  52. error[E0433]: failed to resolve: use of undeclared type `Duration`
  53.   --> src/main.rs:16:34
  54.    |
  55. 16 | const CLIENT_TIMEOUT: Duration = Duration::from_secs(10);
  56.    |                                  ^^^^^^^^ not found in this scope
  57.    |
  58. help: consider importing one of these items
  59.    |
  60. 1  | use actix::clock::Duration;
  61.    |
  62. 1  | use core::time::Duration;
  63.    |
  64. 1  | use crate::clock::Duration;
  65.    |
  66. 1  | use std::time::Duration;
  67.    |
  68.  
  69. error[E0412]: cannot find type `Instant` in this scope
  70.   --> src/main.rs:19:9
  71.    |
  72. 19 |     hb: Instant,
  73.    |         ^^^^^^^ not found in this scope
  74.    |
  75. help: consider importing one of these items
  76.    |
  77. 1  | use actix::clock::Instant;
  78.    |
  79. 1  | use crate::clock::Instant;
  80.    |
  81. 1  | use std::time::Instant;
  82.    |
  83.  
  84. error[E0433]: failed to resolve: use of undeclared type `Instant`
  85.   --> src/main.rs:32:20
  86.    |
  87. 32 |         Self { hb: Instant::now() }
  88.    |                    ^^^^^^^ not found in this scope
  89.    |
  90. help: consider importing one of these items
  91.    |
  92. 1  | use actix::clock::Instant;
  93.    |
  94. 1  | use crate::clock::Instant;
  95.    |
  96. 1  | use std::time::Instant;
  97.    |
  98.  
  99. error[E0433]: failed to resolve: use of undeclared type `Duration`
  100.   --> src/main.rs:36:26
  101.    |
  102. 36 |         ctx.run_interval(Duration::from_secs(5), |act, ctx| {
  103.    |                          ^^^^^^^^ not found in this scope
  104.    |
  105. help: consider importing one of these items
  106.    |
  107. 1  | use actix::clock::Duration;
  108.    |
  109. 1  | use core::time::Duration;
  110.    |
  111. 1  | use crate::clock::Duration;
  112.    |
  113. 1  | use std::time::Duration;
  114.    |
  115.  
  116. error[E0433]: failed to resolve: use of undeclared type `Instant`
  117.   --> src/main.rs:50:27
  118.    |
  119. 50 |                 self.hb = Instant::now();
  120.    |                           ^^^^^^^ not found in this scope
  121.    |
  122. help: consider importing one of these items
  123.    |
  124. 1  | use actix::clock::Instant;
  125.    |
  126. 1  | use crate::clock::Instant;
  127.    |
  128. 1  | use std::time::Instant;
  129.    |
  130.  
  131. error[E0433]: failed to resolve: use of undeclared type `Instant`
  132.   --> src/main.rs:54:27
  133.    |
  134. 54 |                 self.hb = Instant::now();
  135.    |                           ^^^^^^^ not found in this scope
  136.    |
  137. help: consider importing one of these items
  138.    |
  139. 1  | use actix::clock::Instant;
  140.    |
  141. 1  | use crate::clock::Instant;
  142.    |
  143. 1  | use std::time::Instant;
  144.    |
  145.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement