File tree Expand file tree Collapse file tree 1 file changed +37
-4
lines changed Expand file tree Collapse file tree 1 file changed +37
-4
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,9 @@ use tucana::shared::ValidationFlow;
15
15
///
16
16
/// # Example
17
17
///
18
- /// ```rust
18
+ /// ```ignore
19
+ /// use base::traits::LoadConfig;
20
+ ///
19
21
/// #[derive(Clone)]
20
22
/// struct MyConfig {
21
23
/// port: u16,
@@ -67,7 +69,20 @@ pub trait LoadConfig: Sized + Clone + Send + Sync + 'static {
67
69
///
68
70
/// # Example
69
71
///
70
- /// ```rust
72
+ /// ```ignore
73
+ /// use async_trait::async_trait;
74
+ /// use base::runner::ServerContext;
75
+ /// use base::traits::{LoadConfig, Server};
76
+ ///
77
+ /// #[derive(Clone)]
78
+ /// struct MyConfig;
79
+ ///
80
+ /// impl LoadConfig for MyConfig {
81
+ /// fn load() -> Self {
82
+ /// todo!()
83
+ /// }
84
+ /// }
85
+ ///
71
86
/// struct MyServer {
72
87
/// // Server state fields
73
88
/// }
@@ -201,9 +216,27 @@ pub trait IdentifiableFlow {
201
216
///
202
217
/// # Examples
203
218
///
204
- /// ```rust
219
+ /// ```ignore
220
+ /// use tucana::shared::ValidationFlow;
221
+ ///
222
+ /// use base::traits::IdentifiableFlow;
223
+ ///
224
+ /// struct MyFlowMatcher;
225
+ ///
226
+ /// impl MyFlowMatcher {
227
+ /// fn new() -> Self {
228
+ /// MyFlowMatcher {}
229
+ /// }
230
+ /// }
231
+ ///
232
+ /// impl IdentifiableFlow for MyFlowMatcher {
233
+ /// fn identify(&self, flow: &ValidationFlow) -> bool {
234
+ /// todo!()
235
+ /// }
236
+ /// }
237
+ ///
205
238
/// let matcher = MyFlowMatcher::new();
206
- /// let flow = ValidationFlow { /* ... */ } ;
239
+ /// let flow = ValidationFlow::default() ;
207
240
///
208
241
/// if matcher.identify(&flow) {
209
242
/// // Handle this specific type of flow
You can’t perform that action at this time.
0 commit comments