@@ -1160,7 +1160,9 @@ impl BackgroundProcessor {
11601160 }
11611161}
11621162
1163- /// Configuration for both synchronous [`BackgroundProcessor`] and asynchronous [`process_events_async`] event processing.
1163+ /// Configuration for synchronous [`BackgroundProcessor`]
1164+ #[ cfg_attr( feature = "futures" , doc = "and asynchronous [`process_events_async`]" ) ]
1165+ /// event processing.
11641166///
11651167/// This configuration holds all components needed for background processing,
11661168/// including required components (like the channel manager and peer manager) and optional
@@ -1169,9 +1171,17 @@ impl BackgroundProcessor {
11691171/// The configuration can be constructed using [`BackgroundProcessorBuilder`], which provides
11701172/// a convenient builder pattern for setting up both required and optional components.
11711173///
1172- /// This same configuration can be used for both:
1174+ /// This same configuration can be used for
1175+ #[ cfg_attr(
1176+ not( feature = "futures" ) ,
1177+ doc = "creating a [`BackgroundProcessor`] via [`BackgroundProcessor::from_config`]."
1178+ ) ]
1179+ #[ cfg_attr(
1180+ feature = "futures" ,
1181+ doc = "both:
11731182/// * Creating a [`BackgroundProcessor`] via [`BackgroundProcessor::from_config`]
1174- /// * Running the async variant of the background processor via [`process_events_async`]
1183+ /// * Running the async variant of the background processor via [`process_events_async`]"
1184+ ) ]
11751185///
11761186/// # Example
11771187/// ```
@@ -1192,8 +1202,12 @@ impl BackgroundProcessor {
11921202/// // Use with BackgroundProcessor
11931203/// let processor = BackgroundProcessor::from_config(config);
11941204///
1205+ #[ cfg_attr(
1206+ feature = "futures" ,
1207+ doc = "
11951208/// // Or use with async processing
1196- /// process_events_async(config, sleeper, mobile_interruptable_platform, fetch_time).await?;
1209+ /// process_events_async(config, sleeper, mobile_interruptable_platform, fetch_time).await?;"
1210+ ) ]
11971211/// ```
11981212#[ cfg( feature = "std" ) ]
11991213pub struct BackgroundProcessorConfig <
0 commit comments