diff --git a/aleph-client/src/connections.rs b/aleph-client/src/connections.rs index f4c7b77568..78f7d49db8 100644 --- a/aleph-client/src/connections.rs +++ b/aleph-client/src/connections.rs @@ -39,11 +39,13 @@ pub struct RootConnection { /// Castability to a plain connection. pub trait AsConnection { + /// Allows cast to [`Connection`] reference fn as_connection(&self) -> &Connection; } /// Castability to a signed connection. pub trait AsSigned { + /// Allows cast to [`SignedConnection`] reference fn as_signed(&self) -> &SignedConnection; } diff --git a/aleph-client/src/lib.rs b/aleph-client/src/lib.rs index f147c58572..2f0e79dbe3 100644 --- a/aleph-client/src/lib.rs +++ b/aleph-client/src/lib.rs @@ -58,7 +58,8 @@ pub type TxHash = H256; pub type SubxtClient = OnlineClient; pub use connections::{ - Connection, ConnectionApi, RootConnection, SignedConnection, SignedConnectionApi, SudoCall, + AsConnection, AsSigned, Connection, ConnectionApi, RootConnection, SignedConnection, + SignedConnectionApi, SudoCall, }; /// When submitting a transaction, wait for given status before proceeding.