Expand description
Service dispatcher: routes web/RPC calls to backend services. Port of Go’s pkg/service/service.go and all sub-services.
Replaces Go’s reflection-based dispatch with a match-based router.
Each service method is a typed function; argument conversion from
serde_json::Value is handled at the boundary.
Structs§
- Close
TabRtn Type - Return type from workspace CloseTab.
Matches Go’s
workspaceservice.CloseTabRtnType. - Method
Meta - Metadata about a service method. Matches Go’s
tsgenmeta.MethodMeta. Used for TypeScript code generation and documentation. - UIContext
- UI context passed with service calls.
Matches Go’s
obj.UIContext. - WebCall
Type - Incoming service call from the frontend.
Matches Go’s
service.WebCallType. - WebReturn
Type - Service call response.
Matches Go’s
service.WebReturnType.
Constants§
- SERVICES
- List of available services. Matches Go’s
ServiceMapkeys.
Functions§
- get_arg
- Extract a typed argument from the args array.
- get_
method_ meta - Registry of service method metadata (built at startup).
- get_
optional_ arg - Extract an optional typed argument from the args array. Returns Ok(None) if the index is out of bounds or the value is null.
- is_
valid_ service - Check if a service name is valid.