We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
parse_async
1 parent 8856428 commit ed0d520Copy full SHA for ed0d520
src/client/options/mod.rs
@@ -1083,6 +1083,12 @@ impl ClientOptions {
1083
runtime::block_on(Self::parse_uri(s.as_ref(), None))
1084
}
1085
1086
+ /// This method is the same as `parse`, but is provided to make the async version available when
1087
+ /// the `sync` feature is enabled.
1088
+ pub async fn parse_async(s: impl AsRef<str>) -> Result<Self> {
1089
+ Self::parse_uri(s, None).await
1090
+ }
1091
+
1092
/// Parses a MongoDB connection string into a `ClientOptions` struct.
1093
/// If the string is malformed or one of the options has an invalid value, an error will be
1094
/// returned.
0 commit comments