mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 02:21:14 +00:00
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:
@@ -4,7 +4,7 @@
|
||||
|
||||
use crate::{client::OfflineClientT, error::Error, Config};
|
||||
use derive_where::derive_where;
|
||||
use subxt_core::constants::address::AddressT;
|
||||
use subxt_core::constants::address::Address;
|
||||
|
||||
/// A client for accessing constants.
|
||||
#[derive_where(Clone; Client)]
|
||||
@@ -28,7 +28,7 @@ impl<T: Config, Client: OfflineClientT<T>> ConstantsClient<T, Client> {
|
||||
/// if the address is valid (or if it's not possible to check since the address has no validation hash).
|
||||
/// Return an error if the address was not valid or something went wrong trying to validate it (ie
|
||||
/// the pallet or constant in question do not exist at all).
|
||||
pub fn validate<Address: AddressT>(&self, address: &Address) -> Result<(), Error> {
|
||||
pub fn validate<Addr: Address>(&self, address: &Addr) -> Result<(), Error> {
|
||||
let metadata = self.client.metadata();
|
||||
subxt_core::constants::validate(address, &metadata).map_err(Error::from)
|
||||
}
|
||||
@@ -36,7 +36,7 @@ impl<T: Config, Client: OfflineClientT<T>> ConstantsClient<T, Client> {
|
||||
/// Access the constant at the address given, returning the type defined by this address.
|
||||
/// This is probably used with addresses given from static codegen, although you can manually
|
||||
/// construct your own, too.
|
||||
pub fn at<Address: AddressT>(&self, address: &Address) -> Result<Address::Target, Error> {
|
||||
pub fn at<Addr: Address>(&self, address: &Addr) -> Result<Addr::Target, Error> {
|
||||
let metadata = self.client.metadata();
|
||||
subxt_core::constants::get(address, &metadata).map_err(Error::from)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user