Create chanmgr() method in TorClient

This commit is contained in:
Saksham Mittal 2023-06-21 18:34:24 +05:30
parent f14a87e4c8
commit 341cf5c690
No known key found for this signature in database
GPG Key ID: F91B5B3C19C5F58C
1 changed files with 9 additions and 0 deletions

View File

@ -1157,6 +1157,15 @@ impl<R: Runtime> TorClient<R> {
&self.circmgr
}
/// Return a reference to this this client's channel manager.
///
/// This function is unstable. It is only enabled if the crate was
/// built with the `experimental-api` feature.
#[cfg(feature = "experimental-api")]
pub fn chanmgr(&self) -> &Arc<tor_chanmgr::ChanMgr<R>> {
&self.chanmgr
}
/// Return a reference to the runtime being used by this client.
//
// This API is not a hostage to fortune since we already require that R: Clone,