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 = Constant<'_>>;
}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
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.