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
+4 -4
View File
@@ -8,13 +8,13 @@ use crate::dynamic::DecodedValueThunk;
use crate::metadata::DecodeWithMetadata;
use derive_where::derive_where;
/// Use this with [`AddressT::IsDecodable`].
/// Use this with [`Address::IsDecodable`].
pub use crate::utils::Yes;
/// This represents the address of a custom value in in the metadata.
/// Anything that implements it can be used to fetch custom values from the metadata.
/// The trait is implemented by [`str`] for dynamic lookup and [`StaticAddress`] for static queries.
pub trait AddressT {
pub trait Address {
/// The type of the custom value.
type Target: DecodeWithMetadata;
/// Should be set to `Yes` for Dynamic values and static values that have a valid type.
@@ -30,7 +30,7 @@ pub trait AddressT {
}
}
impl AddressT for str {
impl Address for str {
type Target = DecodedValueThunk;
type IsDecodable = Yes;
@@ -68,7 +68,7 @@ impl<ReturnTy, IsDecodable> StaticAddress<ReturnTy, IsDecodable> {
}
}
impl<R: DecodeWithMetadata, Y> AddressT for StaticAddress<R, Y> {
impl<R: DecodeWithMetadata, Y> Address for StaticAddress<R, Y> {
type Target = R;
type IsDecodable = Y;