pub struct RegistrationVariantLanguageOverride {
pub style: Option<RegistrationVariantStyle>,
pub handler_shape: Option<HandlerShape>,
pub method_prefix: Option<String>,
}Expand description
Per-language override for a registration variant’s surface style and method naming.
Each backend looks up its canonical language name in the variant’s language_overrides
map and, when present, uses the override’s values instead of the variant-global defaults.
Fields absent from the override fall through to the variant-level setting.
§alef.toml example
[[crates.services.registrations.variants]]
name = "get"
fixed = { method = "GET" }
style = "hybrid"
[crates.services.registrations.variants.languages.csharp]
style = "attribute"
method_prefix = "Map" # emits MapGet, MapPost, …
[crates.services.registrations.variants.languages.kotlin]
style = "dsl"Fields§
§style: Option<RegistrationVariantStyle>Override for the emission style in this language.
When absent, falls through to the variant-global style.
handler_shape: Option<HandlerShape>Override for the handler shape in this language.
When absent, falls through to the base registration’s handler_shape.
method_prefix: Option<String>Language-specific prefix prepended to the verb method name.
Example: "Map" for C# produces MapGet, MapPost, MapPut, … rather than
the default lowercased get, post, put. When absent, no prefix is added.
Trait Implementations§
Source§impl Clone for RegistrationVariantLanguageOverride
impl Clone for RegistrationVariantLanguageOverride
Source§fn clone(&self) -> RegistrationVariantLanguageOverride
fn clone(&self) -> RegistrationVariantLanguageOverride
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Default for RegistrationVariantLanguageOverride
impl Default for RegistrationVariantLanguageOverride
Source§fn default() -> RegistrationVariantLanguageOverride
fn default() -> RegistrationVariantLanguageOverride
Source§impl<'de> Deserialize<'de> for RegistrationVariantLanguageOverride
impl<'de> Deserialize<'de> for RegistrationVariantLanguageOverride
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl StructuralPartialEq for RegistrationVariantLanguageOverride
Auto Trait Implementations§
impl Freeze for RegistrationVariantLanguageOverride
impl RefUnwindSafe for RegistrationVariantLanguageOverride
impl Send for RegistrationVariantLanguageOverride
impl Sync for RegistrationVariantLanguageOverride
impl Unpin for RegistrationVariantLanguageOverride
impl UnsafeUnpin for RegistrationVariantLanguageOverride
impl UnwindSafe for RegistrationVariantLanguageOverride
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more