pub struct TypeOverrides { /* private fields */ }Expand description
Collection of type overrides for generated types.
Implementations§
Source§impl TypeOverrides
impl TypeOverrides
Sourcepub fn add_rename(
&mut self,
method: HttpMethod,
path: impl Into<String>,
kind: GeneratedTypeKind,
new_name: Ident,
)
pub fn add_rename( &mut self, method: HttpMethod, path: impl Into<String>, kind: GeneratedTypeKind, new_name: Ident, )
Add a rename override.
Sourcepub fn add_rename_with_overrides(
&mut self,
method: HttpMethod,
path: impl Into<String>,
kind: GeneratedTypeKind,
new_name: Ident,
attrs: Vec<TokenStream>,
variant_overrides: HashMap<u16, VariantOverride>,
)
pub fn add_rename_with_overrides( &mut self, method: HttpMethod, path: impl Into<String>, kind: GeneratedTypeKind, new_name: Ident, attrs: Vec<TokenStream>, variant_overrides: HashMap<u16, VariantOverride>, )
Add a rename override with attributes and variant overrides.
Sourcepub fn add_replace(
&mut self,
method: HttpMethod,
path: impl Into<String>,
kind: GeneratedTypeKind,
replacement: TokenStream,
)
pub fn add_replace( &mut self, method: HttpMethod, path: impl Into<String>, kind: GeneratedTypeKind, replacement: TokenStream, )
Add a replace override.
Sourcepub fn get(
&self,
method: HttpMethod,
path: &str,
kind: GeneratedTypeKind,
) -> Option<&TypeOverride>
pub fn get( &self, method: HttpMethod, path: &str, kind: GeneratedTypeKind, ) -> Option<&TypeOverride>
Get an override for a specific operation and kind.
Sourcepub fn is_replaced(
&self,
method: HttpMethod,
path: &str,
kind: GeneratedTypeKind,
) -> bool
pub fn is_replaced( &self, method: HttpMethod, path: &str, kind: GeneratedTypeKind, ) -> bool
Check if there’s a replacement for this operation/kind.
Sourcepub fn set_query_unknown_field(
&mut self,
method: HttpMethod,
path: impl Into<String>,
field_name: Ident,
)
pub fn set_query_unknown_field( &mut self, method: HttpMethod, path: impl Into<String>, field_name: Ident, )
Set the unknown field name for a query struct.
This is used when #[oxapi(query, field_name)] is specified on a parameter.
Sourcepub fn get_query_unknown_field(
&self,
method: HttpMethod,
path: &str,
) -> Option<&Ident>
pub fn get_query_unknown_field( &self, method: HttpMethod, path: &str, ) -> Option<&Ident>
Get the unknown field name for a query struct, if set.
Trait Implementations§
Source§impl Clone for TypeOverrides
impl Clone for TypeOverrides
Source§fn clone(&self) -> TypeOverrides
fn clone(&self) -> TypeOverrides
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 moreSource§impl Debug for TypeOverrides
impl Debug for TypeOverrides
Source§impl Default for TypeOverrides
impl Default for TypeOverrides
Source§fn default() -> TypeOverrides
fn default() -> TypeOverrides
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for TypeOverrides
impl RefUnwindSafe for TypeOverrides
impl !Send for TypeOverrides
impl !Sync for TypeOverrides
impl Unpin for TypeOverrides
impl UnsafeUnpin for TypeOverrides
impl UnwindSafe for TypeOverrides
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