Crate hrpc

Source
Expand description

Generic client and server implementations and transport implementations for hRPC.

  • For generic client and client implementations, see the client module.
  • For generic server and server implementations, see the server module.
  • For common code shared by client and servers, see the common module.
  • Modules named transport contain transport specific code.
  • Modules named layer contain layers for use. These can be generic, or transport specific.

Modules§

body
Body utitilies and types.
client
Common client types and functions.
common
Common utilities.
decode
Decoding utilities.
encode
Encoding utilities.
exports
Some re-exported crates that might be useful while writing software with hrpc.
proto
The hRPC generated protocol.
request
The Request type used by hRPC.
response
The Response type used by hRPC.
server
Common server types and functions.

Macros§

bail
Bails with an error.
bail_result
Takes a Result, returns the error if it’s Err, otherwise returns the Ok value.
combine_services
Combines a list of services that implement MakeRoutes.
include_proto
Include generated proto server and client items.
make_handler
Macro to workaround async fns not being allowed in traits. You do not need to use this directly, instead you should use the handler macro attribute provided in the server prelude.

Structs§

Request
A hRPC request.
Response
hRPC response type.

Constants§

HRPC_CONTENT_MIMETYPE
The hRPC protobuf mimetype.
HRPC_SPEC_VERSION
The hRPC spec version this version of hrpc-rs implements.

Functions§

box_error
Convenience function for converting some error to a boxed error.

Type Aliases§

BoxError
Alias for a type-erased error type.