@@ -1160,7 +1160,9 @@ impl BackgroundProcessor {
1160
1160
}
1161
1161
}
1162
1162
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.
1164
1166
///
1165
1167
/// This configuration holds all components needed for background processing,
1166
1168
/// including required components (like the channel manager and peer manager) and optional
@@ -1169,9 +1171,17 @@ impl BackgroundProcessor {
1169
1171
/// The configuration can be constructed using [`BackgroundProcessorBuilder`], which provides
1170
1172
/// a convenient builder pattern for setting up both required and optional components.
1171
1173
///
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:
1173
1182
/// * 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
+ ) ]
1175
1185
///
1176
1186
/// # Example
1177
1187
/// ```
@@ -1192,8 +1202,12 @@ impl BackgroundProcessor {
1192
1202
/// // Use with BackgroundProcessor
1193
1203
/// let processor = BackgroundProcessor::from_config(config);
1194
1204
///
1205
+ #[ cfg_attr(
1206
+ feature = "futures" ,
1207
+ doc = "
1195
1208
/// // 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
+ ) ]
1197
1211
/// ```
1198
1212
#[ cfg( feature = "std" ) ]
1199
1213
pub struct BackgroundProcessorConfig <
0 commit comments