Rename traits to remove T suffix (#1535)

* Rename traits to renmove T suffix

* Fix doc links

* Fix straggler doc links
This commit is contained in:
James Wilson
2024-04-16 16:35:14 +01:00
committed by GitHub
parent 1e111ea9db
commit ac606cf625
32 changed files with 2426 additions and 2229 deletions
+3 -1
View File
@@ -9,4 +9,6 @@ mod runtime_types;
pub use runtime_client::RuntimeApiClient;
pub use runtime_types::RuntimeApi;
pub use subxt_core::runtime_api::payload::{dynamic, DynamicPayload, Payload, PayloadT};
pub use subxt_core::runtime_api::payload::{
dynamic, DefaultPayload, DynamicPayload, Payload, StaticPayload,
};
+3 -3
View File
@@ -2,7 +2,7 @@
// This file is dual-licensed as Apache-2.0 or GPL-3.0.
// see LICENSE for license details.
use super::PayloadT;
use super::Payload;
use crate::{
backend::{BackendExt, BlockRef},
client::OnlineClientT,
@@ -41,7 +41,7 @@ where
/// if the payload is valid (or if it's not possible to check since the payload has no validation hash).
/// Return an error if the payload was not valid or something went wrong trying to validate it (ie
/// the runtime API in question do not exist at all)
pub fn validate<Call: PayloadT>(&self, payload: &Call) -> Result<(), Error> {
pub fn validate<Call: Payload>(&self, payload: &Call) -> Result<(), Error> {
subxt_core::runtime_api::validate(payload, &self.client.metadata()).map_err(Into::into)
}
@@ -65,7 +65,7 @@ where
}
/// Execute a runtime API call.
pub fn call<Call: PayloadT>(
pub fn call<Call: Payload>(
&self,
payload: Call,
) -> impl Future<Output = Result<Call::ReturnType, Error>> {