pub trait ViewFunctionTypeInfo {
type TypeId: Clone;
// Required methods
fn view_function_info(
&self,
pallet_name: &str,
function_name: &str,
) -> Result<ViewFunctionInfo<'_, Self::TypeId>, ViewFunctionInfoError<'_>>;
fn view_functions(&self) -> impl Iterator<Item = Entry<'_>>;
// Provided method
fn view_functions_in_pallet(
&self,
pallet: &str,
) -> impl Iterator<Item = Cow<'_, str>> { ... }
}Expand description
This is implemented for anything capable of providing information about view functions (primarily metadata V16 and onwards).
Required Associated Types§
Required Methods§
Sourcefn view_function_info(
&self,
pallet_name: &str,
function_name: &str,
) -> Result<ViewFunctionInfo<'_, Self::TypeId>, ViewFunctionInfoError<'_>>
fn view_function_info( &self, pallet_name: &str, function_name: &str, ) -> Result<ViewFunctionInfo<'_, Self::TypeId>, ViewFunctionInfoError<'_>>
Get the information needed to decode a specific View Function.
Sourcefn view_functions(&self) -> impl Iterator<Item = Entry<'_>>
fn view_functions(&self) -> impl Iterator<Item = Entry<'_>>
Iterate over all of the available View Functions.
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.