mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 01:07:57 +00:00
ChainSpec trait (#5185)
* ChainSpec trait * Apply suggestions from code review Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com> * Added docs * Fixed build * Fixed build Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
@@ -50,6 +50,15 @@ pub fn extension_derive(ast: &DeriveInput) -> proc_macro::TokenStream {
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
||||
fn get_any(&self, t: std::any::TypeId) -> &dyn std::any::Any {
|
||||
use std::any::{Any, TypeId};
|
||||
|
||||
match t {
|
||||
#( x if x == TypeId::of::<#field_types>() => &self.#field_names ),*,
|
||||
_ => self,
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user