Enum subxt_codegen::CodegenError
source · pub enum CodegenError {
Show 13 variants
TypeNotFound(u32),
Fetch(FetchMetadataError),
Io(String, Error),
Decode(Error),
InvalidModule(Span),
InvalidFields(String),
TypeSubstitutionError(TypeSubstitutionError),
InvalidTypePath(String, Error),
MissingConstantMetadata(String, String),
MissingStorageMetadata(String, String),
MissingCallMetadata(String, String),
InvalidCallVariant(u32),
InvalidType(String),
}Expand description
Error returned when the Codegen cannot generate the runtime API.
Variants§
TypeNotFound(u32)
The given metadata type could not be found.
Fetch(FetchMetadataError)
Cannot fetch the metadata bytes.
Io(String, Error)
Failed IO for the metadata file.
Decode(Error)
Cannot decode the metadata bytes.
InvalidModule(Span)
Out of line modules are not supported.
InvalidFields(String)
Expected named or unnamed fields.
TypeSubstitutionError(TypeSubstitutionError)
Substitute types must have a valid path.
InvalidTypePath(String, Error)
Invalid type path.
MissingConstantMetadata(String, String)
Metadata for constant could not be found.
MissingStorageMetadata(String, String)
Metadata for storage could not be found.
MissingCallMetadata(String, String)
Metadata for call could not be found.
InvalidCallVariant(u32)
Call variant must have all named fields.
InvalidType(String)
Type should be an variant/enum.
Implementations§
source§impl CodegenError
impl CodegenError
sourcepub fn into_compile_error(self) -> TokenStream2
pub fn into_compile_error(self) -> TokenStream2
Render the error as an invocation of syn::compile_error!.
Trait Implementations§
source§impl Debug for CodegenError
impl Debug for CodegenError
source§impl Display for CodegenError
impl Display for CodegenError
source§impl Error for CodegenError
impl Error for CodegenError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl From<Error> for CodegenError
impl From<Error> for CodegenError
source§impl From<TypeSubstitutionError> for CodegenError
impl From<TypeSubstitutionError> for CodegenError
source§fn from(source: TypeSubstitutionError) -> Self
fn from(source: TypeSubstitutionError) -> Self
Converts to this type from the input type.