From d4301035b1a740e4271a482232347e7c7fb2c16b Mon Sep 17 00:00:00 2001 From: Xuanwo Date: Fri, 23 Aug 2024 13:18:14 +0800 Subject: [PATCH] fix: Expose struct out to generate API docs (#102) Signed-off-by: Xuanwo --------- Signed-off-by: Xuanwo --- src/blocking_retry.rs | 2 +- src/blocking_retry_with_context.rs | 2 +- src/lib.rs | 3 +++ src/retry_with_context.rs | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/blocking_retry.rs b/src/blocking_retry.rs index 3f229bc..c515dc4 100644 --- a/src/blocking_retry.rs +++ b/src/blocking_retry.rs @@ -57,7 +57,7 @@ where } } -/// Retry struct generated by [`Retryable`]. +/// Retry struct generated by [`BlockingRetryable`]. pub struct BlockingRetry< B: Backoff, T, diff --git a/src/blocking_retry_with_context.rs b/src/blocking_retry_with_context.rs index 54eaa4d..139760f 100644 --- a/src/blocking_retry_with_context.rs +++ b/src/blocking_retry_with_context.rs @@ -27,7 +27,7 @@ where } } -/// Retry struct generated by [`Retryable`]. +/// Retry struct generated by [`BlockingRetryableWithContext`]. pub struct BlockingRetryWithContext< B: Backoff, T, diff --git a/src/lib.rs b/src/lib.rs index a53c696..ef4d7d9 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -179,6 +179,7 @@ pub use retry::Retry; pub use retry::Retryable; mod retry_with_context; +pub use retry_with_context::RetryWithContext; pub use retry_with_context::RetryableWithContext; mod sleep; @@ -199,4 +200,6 @@ pub use blocking_retry::BlockingRetryable; #[cfg(not(target_arch = "wasm32"))] mod blocking_retry_with_context; #[cfg(not(target_arch = "wasm32"))] +pub use blocking_retry_with_context::BlockingRetryWithContext; +#[cfg(not(target_arch = "wasm32"))] pub use blocking_retry_with_context::BlockingRetryableWithContext; diff --git a/src/retry_with_context.rs b/src/retry_with_context.rs index 40ec877..8e1f6bf 100644 --- a/src/retry_with_context.rs +++ b/src/retry_with_context.rs @@ -98,7 +98,7 @@ where } } -/// Retry struct generated by [`Retryable`]. +/// Retry struct generated by [`RetryableWithContext`]. pub struct RetryWithContext< B: Backoff, T,