pub trait ConstantTypeInfo {
type TypeId: Clone;
// Required methods
fn constant_info(
&self,
pallet_name: &str,
constant_name: &str,
) -> Result<ConstantInfo<'_, Self::TypeId>, ConstantInfoError<'_>>;
fn constants(&self) -> impl Iterator<Item = Entry<'_>>;
// Provided method
fn constants_in_pallet(
&self,
pallet: &str,
) -> impl Iterator<Item = Cow<'_, str>> { ... }
}Expand description
This can be implemented for anything capable of providing Constant information.
Required Associated Types§
Required Methods§
Sourcefn constant_info(
&self,
pallet_name: &str,
constant_name: &str,
) -> Result<ConstantInfo<'_, Self::TypeId>, ConstantInfoError<'_>>
fn constant_info( &self, pallet_name: &str, constant_name: &str, ) -> Result<ConstantInfo<'_, Self::TypeId>, ConstantInfoError<'_>>
Get information about a constant
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.