. minor | * Major | + Addition | ^ improvement | ! Change
!API RENAME - CallSuccess now (from CallResponse)!API RENAME - Request is now RpcRequest (because it represents core json-rpc construct)!RpcId - Refactor Rpc Id to be its own type+RpcResponse - Add RpcResponse construct+RpcRequest - added from_value_with_checks to allow to skip version and/or id checks^router - implement FromResources for Router^RpcRequest - add from_value_with_checks^export the RpcHandlerWrapperTrait^add RpcRequest new^RpcRequest - add custom serializer.doc - add doc/*.md documentations.doc - update doc/ markdowns
+addRouterBuilder::extend_resources(..)!renameRouterBuilder::set_resources_builder(..)toRouterBuilder::set_resources(..)
^AddIntoHandlerErrorforString,Value, and&'static str.^Add HandlerError::new:().removestd::error::Errorerror requirement for HandlerError .error
Note:
v0.1.1changes from0.1.0
router.call(resources, request)was renamed torouter.call_with_resources(request, resources).- Now, the Router can have its own resources, enabling simpler and more efficient sharing of common resources across calls, while still allowing custom resources to be overlaid at the call level.
router.call(request)uses just the default caller resources.See CHANGELOG for more information.
Rust10x rust-web-app has been updated.
!Changedrouter.call(resources, request)torouter.call_with_resources(request, resources).+Routercan now have base/common resources that are "injected" into every call.- Use
router_builder.append_resource(resource)...to add resources. - The method
router.call_with_resources(request, resources)overlays the call resources on top of the router resources. router.call(request)uses only the Router resources.
- Use
^router_builder!macro now allows building the route and resource.
let rpc_router = router_builder!(
handlers: [get_task, create_task], // will be turned into routes
resources: [ModelManager {}, AiManager {}] // common resources for all calls
)
.build();*Initial