]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Expose AsyncBlockSourceResult and BlockSourceResult as pub
authorValentine Wallace <vwallace@protonmail.com>
Wed, 24 Mar 2021 20:03:36 +0000 (16:03 -0400)
committerValentine Wallace <vwallace@protonmail.com>
Fri, 26 Mar 2021 18:54:19 +0000 (14:54 -0400)
Useful for writing objects that implement BlockSource trait.

lightning-block-sync/src/lib.rs

index bc937b590716cfdf30843ca46c59deba0717d2fd..ac031132a71946f8706954d49138ff3f7b1e574e 100644 (file)
@@ -75,12 +75,12 @@ pub trait BlockSource : Sync + Send {
 }
 
 /// Result type for `BlockSource` requests.
-type BlockSourceResult<T> = Result<T, BlockSourceError>;
+pub type BlockSourceResult<T> = Result<T, BlockSourceError>;
 
 // TODO: Replace with BlockSourceResult once `async` trait functions are supported. For details,
 // see: https://areweasyncyet.rs.
 /// Result type for asynchronous `BlockSource` requests.
-type AsyncBlockSourceResult<'a, T> = Pin<Box<dyn Future<Output = BlockSourceResult<T>> + 'a + Send>>;
+pub type AsyncBlockSourceResult<'a, T> = Pin<Box<dyn Future<Output = BlockSourceResult<T>> + 'a + Send>>;
 
 /// Error type for `BlockSource` requests.
 ///