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 with_default_derives(crate_path: &CratePath) -> Self
pub fn with_default_derives(crate_path: &CratePath) -> Self
Creates a new DerivesRegistry with default derives.
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>,
attributes: impl IntoIterator<Item = Attribute>
)
pub fn extend_for_all( &mut self, derives: impl IntoIterator<Item = Path>, attributes: impl IntoIterator<Item = Attribute> )
Insert derives to be applied to all generated types.
sourcepub fn extend_for_type(
&mut self,
ty: TypePath,
derives: impl IntoIterator<Item = Path>,
attributes: impl IntoIterator<Item = Attribute>
)
pub fn extend_for_type( &mut self, ty: TypePath, derives: impl IntoIterator<Item = Path>, attributes: impl IntoIterator<Item = Attribute> )
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 moresource§impl Debug for DerivesRegistry
impl Debug for DerivesRegistry
Auto Trait Implementations§
impl RefUnwindSafe for DerivesRegistry
impl !Send for DerivesRegistry
impl !Sync for DerivesRegistry
impl Unpin for DerivesRegistry
impl UnwindSafe for DerivesRegistry
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more