Struct subxt_codegen::DerivesRegistry
source · pub struct DerivesRegistry { /* private fields */ }Expand description
A struct containing the derives that we’ll be applying to types; a combination of some common derives for all types, plus type specific derives.
Implementations§
source§impl DerivesRegistry
impl DerivesRegistry
sourcepub fn new(crate_path: &CratePath) -> Self
pub fn new(crate_path: &CratePath) -> Self
Creates a new DerivesRegistry with the supplied crate_path.
The crate_path denotes the subxt crate access path in the
generated code.
sourcepub fn extend_for_all(&mut self, derives: impl IntoIterator<Item = Path>)
pub fn extend_for_all(&mut self, derives: impl IntoIterator<Item = Path>)
Insert derives to be applied to all generated types.
sourcepub fn extend_for_type(
&mut self,
ty: TypePath,
derives: impl IntoIterator<Item = Path>,
crate_path: &CratePath
)
pub fn extend_for_type( &mut self, ty: TypePath, derives: impl IntoIterator<Item = Path>, crate_path: &CratePath )
Insert derives to be applied to a specific generated type.
sourcepub fn default_derives(&self) -> &Derives
pub fn default_derives(&self) -> &Derives
Returns the derives to be applied to all generated types.
Trait Implementations§
source§impl Clone for DerivesRegistry
impl Clone for DerivesRegistry
source§fn clone(&self) -> DerivesRegistry
fn clone(&self) -> DerivesRegistry
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more