@@ -82,7 +82,7 @@ pub trait Context {
82
82
/// ```rust
83
83
/// use proxy_wasm::traits::*;
84
84
/// use proxy_wasm::types::*;
85
- ///
85
+ /// use std::time::Duration;
86
86
/// use log::warn;
87
87
///
88
88
/// struct MyPlugin;
@@ -99,7 +99,7 @@ pub trait Context {
99
99
/// vec![],
100
100
/// Duration::from_secs(5),
101
101
/// ) {
102
- /// Ok(_) => Action::Pause ,
102
+ /// Ok(_) => Action::Continue ,
103
103
/// Err(e) => {
104
104
/// warn!("Failed to dispatch_http_call: {:?}", e);
105
105
/// Action::Pause
@@ -150,7 +150,7 @@ pub trait Context {
150
150
/// ```rust
151
151
/// use proxy_wasm::traits::*;
152
152
/// use proxy_wasm::types::*;
153
- ///
153
+ /// use std::time::Duration;
154
154
/// use log::{debug, warn};
155
155
///
156
156
/// struct MyPlugin;
@@ -167,7 +167,7 @@ pub trait Context {
167
167
/// vec![],
168
168
/// Duration::from_secs(5),
169
169
/// ) {
170
- /// Ok(_) => Action::Pause ,
170
+ /// Ok(_) => Action::Continue ,
171
171
/// Err(e) => {
172
172
/// warn!("Failed to dispatch_http_call: {:?}", e);
173
173
/// Action::Pause
@@ -348,7 +348,10 @@ pub trait RootContext: Context {
348
348
/// # Example
349
349
///
350
350
/// ```rust
351
- /// use proxy_wasm::traits::RootContext;
351
+ /// use proxy_wasm::traits::*;
352
+ /// use proxy_wasm::types::*;
353
+ /// use serde_json;
354
+ /// use log::debug;
352
355
///
353
356
/// struct MyRootContext;
354
357
///
@@ -385,7 +388,10 @@ pub trait RootContext: Context {
385
388
/// # Example
386
389
///
387
390
/// ```rust
388
- /// use proxy_wasm::traits::RootContext;
391
+ /// use proxy_wasm::traits::*;
392
+ /// use proxy_wasm::types::*;
393
+ /// use serde_json;
394
+ /// use log::debug;
389
395
///
390
396
/// struct MyRootContext;
391
397
///
@@ -427,7 +433,10 @@ pub trait RootContext: Context {
427
433
/// # Example
428
434
///
429
435
/// ```rust
430
- /// use proxy_wasm::traits::RootContext;
436
+ /// use proxy_wasm::traits::*;
437
+ /// use proxy_wasm::types::*;
438
+ /// use serde_json;
439
+ /// use log::debug;
431
440
///
432
441
/// struct MyRootContext;
433
442
///
@@ -445,6 +454,7 @@ pub trait RootContext: Context {
445
454
/// let parsed_plugin_configuration: MyPluginConfiguration = serde_json::from_slice::<MyPluginConfiguration>(&plugin_configuration).unwrap();
446
455
///
447
456
/// // Do something with the parsed plugin configuration
457
+ /// debug!("plugin_configuration: {:?}", parsed_plugin_configuration)
448
458
///
449
459
/// true
450
460
/// }
@@ -463,7 +473,10 @@ pub trait RootContext: Context {
463
473
/// # Example
464
474
///
465
475
/// ```rust
466
- /// use proxy_wasm::traits::RootContext;
476
+ /// use proxy_wasm::traits::*;
477
+ /// use proxy_wasm::types::*;
478
+ /// use serde_json;
479
+ /// use log::debug;
467
480
///
468
481
/// struct MyRootContext;
469
482
///
@@ -481,6 +494,7 @@ pub trait RootContext: Context {
481
494
/// let parsed_plugin_configuration: MyPluginConfiguration = serde_json::from_slice::<MyPluginConfiguration>(&plugin_configuration).unwrap();
482
495
///
483
496
/// // Do something with the parsed plugin configuration
497
+ /// debug!("plugin_configuration: {:?}", parsed_plugin_configuration)
484
498
///
485
499
/// true
486
500
/// }
@@ -499,7 +513,8 @@ pub trait RootContext: Context {
499
513
/// # Example
500
514
///
501
515
/// ```rust
502
- /// use proxy_wasm::traits::RootContext;
516
+ /// use proxy_wasm::traits::*;
517
+ /// use proxy_wasm::types::*;
503
518
/// use std::time::Duration;
504
519
/// use log::info;
505
520
///
@@ -529,7 +544,8 @@ pub trait RootContext: Context {
529
544
/// # Example
530
545
///
531
546
/// ```rust
532
- /// use proxy_wasm::traits::RootContext;
547
+ /// use proxy_wasm::traits::*;
548
+ /// use proxy_wasm::types::*;
533
549
/// use std::time::Duration;
534
550
/// use log::info;
535
551
///
@@ -723,9 +739,9 @@ pub trait HttpContext: Context {
723
739
/// # Example
724
740
///
725
741
/// ```rust
726
- /// use log::debug;
727
742
/// use proxy_wasm::traits:*;
728
- /// use proxy_wasm::types::Action;
743
+ /// use proxy_wasm::types::*;
744
+ /// use log::debug;
729
745
///
730
746
/// struct MyPlugin;
731
747
///
@@ -768,7 +784,7 @@ pub trait HttpContext: Context {
768
784
///
769
785
/// ```rust
770
786
/// use proxy_wasm::traits::*;
771
- /// use proxy_wasm::types::Action ;
787
+ /// use proxy_wasm::types::* ;
772
788
///
773
789
/// struct MyPlugin;
774
790
///
0 commit comments