pub enum TypeOverride {
Rename {
name: Ident,
attrs: Vec<TokenStream>,
variant_overrides: HashMap<u16, VariantOverride>,
},
Replace(TokenStream),
}Expand description
Override for a generated type - either rename or replace.
Variants§
Rename
Rename the type to a new name, optionally with variant renames
Fields
§
attrs: Vec<TokenStream>Attributes to apply to the enum (excluding consumed #[rename(...)])
If this contains a #[derive(...)], it overrides the default.
§
variant_overrides: HashMap<u16, VariantOverride>Status code → variant override (name + attributes)
Replace(TokenStream)
Replace the type with an existing type (as TokenStream)
Trait Implementations§
Source§impl Clone for TypeOverride
impl Clone for TypeOverride
Source§fn clone(&self) -> TypeOverride
fn clone(&self) -> TypeOverride
Returns a duplicate 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 moreAuto Trait Implementations§
impl Freeze for TypeOverride
impl RefUnwindSafe for TypeOverride
impl !Send for TypeOverride
impl !Sync for TypeOverride
impl Unpin for TypeOverride
impl UnsafeUnpin for TypeOverride
impl UnwindSafe for TypeOverride
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