pub struct ServiceConfig {
pub owner_type: String,
pub constructor: Option<String>,
pub configurators: Vec<String>,
pub registrations: Vec<RegistrationSpec>,
pub entrypoints: Vec<EntrypointSpec>,
pub skip_languages: Vec<String>,
pub host_app_inner_accessor: Option<String>,
}Expand description
Full configuration for one service definition in [[crates.services]].
[[crates.services]]
owner_type = "App"
constructor = "new"
configurators = ["set_address", "set_tls"]
skip_languages = ["wasm"]
[[crates.services.registrations]]
method = "add_route"
callback_param = "handler"
callback_bound = "IntoHandler"
callback_contract = "Handler"
[[crates.services.entrypoints]]
method = "run"
kind = "run"Fields§
§owner_type: StringName of the owner/builder type in the extracted surface (e.g. "App").
constructor: Option<String>Name of the constructor method (defaults to "new" when absent).
configurators: Vec<String>Names of chaining configurator methods (no callbacks).
registrations: Vec<RegistrationSpec>Registration points — each binds a callback to a slot.
entrypoints: Vec<EntrypointSpec>Entrypoints — run or finalize methods.
skip_languages: Vec<String>Language backends that should NOT generate a service API for this entry.
Values must match canonical language names ("python", "node", etc.).
host_app_inner_accessor: Option<String>Verbatim Rust expression that accesses the inner host-app value from the
generated wrapper type’s self receiver in verb-method emission.
When the host-app wrapper type (e.g. the napi or wasm binding’s App struct)
wraps the real service owner behind a field (e.g. Arc<Mutex<Owner>>), set
this to the expression that unlocks or dereferences it so the generated
verb methods can call owner.{base_method}(...) on the real type.
Example:
host_app_inner_accessor = "self.inner.lock().expect(\"app mutex poisoned\")"When absent (the default), verb methods emit self.{base_method}(...) directly,
which is correct when the generated wrapper IS the owner type.
Trait Implementations§
Source§impl Clone for ServiceConfig
impl Clone for ServiceConfig
Source§fn clone(&self) -> ServiceConfig
fn clone(&self) -> ServiceConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ServiceConfig
impl Debug for ServiceConfig
Source§impl<'de> Deserialize<'de> for ServiceConfig
impl<'de> Deserialize<'de> for ServiceConfig
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>,
Source§impl JsonSchema for ServiceConfig
impl JsonSchema for ServiceConfig
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for ServiceConfig
impl RefUnwindSafe for ServiceConfig
impl Send for ServiceConfig
impl Sync for ServiceConfig
impl Unpin for ServiceConfig
impl UnsafeUnpin for ServiceConfig
impl UnwindSafe for ServiceConfig
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