@@ -42,8 +42,10 @@ impl AsyncAdapterEnv {
4242 }
4343 }
4444
45- /// Invokes a blocking function `func` as if it were async. This
46- /// is implemented by running it on the special thread created when the `AsyncAdapterEnv` was created.
45+ /// Invokes a blocking function `func` as if it were async.
46+ ///
47+ /// This is implemented by running it on the special thread created
48+ /// when the `AsyncAdapterEnv` was created.
4749 async fn invoke < ' c , ' s , ' result , F , T , U > (
4850 & ' s self ,
4951 context : & SyncSendPtrMut < T > ,
@@ -153,8 +155,9 @@ impl Drop for AsyncAdapterEnv {
153155 }
154156}
155157
156- /// Wrapper around a raw pointer that we assert is [Send]. Needless to
157- /// say, this requires care. See comments on `AsyncAdapterEnv::invoke`
158+ /// Wrapper around a raw pointer that we assert is [`Send`].
159+ ///
160+ /// Needless to say, this requires care. See comments on [`AsyncAdapterEnv::invoke`]
158161/// for why we believe this to be sound.
159162struct SendPtr < T : ?Sized > {
160163 inner : * const T ,
@@ -166,7 +169,7 @@ impl<T: ?Sized> SendPtr<T> {
166169}
167170unsafe impl < T : ?Sized > Send for SendPtr < T > { }
168171
169- /// Like [SendPtrMut] but we also assert that it is [Sync]
172+ /// Like [` SendPtrMut` ] but we also assert that it is [` Sync`].
170173struct SyncSendPtrMut < T : ?Sized > {
171174 inner : * mut T ,
172175}
@@ -205,7 +208,7 @@ pub(super) struct AsyncAdapter<T: ?Sized> {
205208}
206209
207210impl < T : ?Sized > AsyncAdapter < T > {
208- /// Create a new AsyncAdapter with the given context and using the same `env` as self. Not a public method .
211+ /// Create an ` AsyncAdapter` with the given context, using the same `env` as self.
209212 fn create_with_same_env < U : ?Sized > ( & self , context_ptr : SyncSendPtrMut < U > ) -> AsyncAdapter < U > {
210213 AsyncAdapter {
211214 env : self . env . clone ( ) ,
@@ -248,7 +251,7 @@ impl<T: ?Sized> AsyncAdapter<T> {
248251}
249252
250253impl < T > AsyncAdapter < T > {
251- /// Create a new async adapter using `create_context` to create an instance of the inner type `T`.
254+ /// Create an async adapter using `create_context` to create an instance of the inner type `T`.
252255 pub ( super ) fn new < F > ( create_context : F ) -> Result < Self >
253256 where
254257 Self : Sized ,
@@ -389,8 +392,9 @@ where
389392 ok_or_panic_with_adapter_error ( self . invoke_blocking ( |conn| Ok ( conn. backend_name ( ) ) ) )
390393 }
391394
392- /// Tests if the connection has been closed. Backends which do not
393- /// support this check should return false.
395+ /// Tests if the connection has been closed.
396+ ///
397+ /// Backends which do not support this check should return `false`.
394398 fn is_closed ( & self ) -> bool {
395399 ok_or_panic_with_adapter_error ( self . invoke_blocking ( |conn| Ok ( conn. is_closed ( ) ) ) )
396400 }
@@ -442,8 +446,9 @@ where
442446 }
443447}
444448
445- /// Create an async connection using the synchronous `connect` method of `backend`. Use this when authoring
446- /// a backend which doesn't natively support async.
449+ /// Create an async connection via the synchronous `connect` method of `backend`.
450+ ///
451+ /// Use this when authoring a backend which doesn't natively support async.
447452pub async fn connect_async_via_sync < B > ( backend : & B , conn_str : & str ) -> Result < ConnectionAsync >
448453where
449454 B : Backend + Clone + ' static ,
0 commit comments