Intercepted
struct Intercepted[I: GrpcInterceptor & Deinitable, H: GrpcUnary & Copyable & Deinitable]Wrap handler with interceptor to form a new :trait:GrpcUnary. Nest to chain multiple interceptors.
Example:
var svc = GrpcService(
Intercepted(AuthInterceptor(token), EchoHandler())
)
Implements Copyable, GrpcUnary, Movable
- Fields
interceptor: Ihandler: H
__init__
def __init__(out self, var interceptor: I, var handler: H) serve_unary
def serve_unary(mut self, ctx: GrpcCallContext, request_bytes: Span[UInt8]) -> GrpcUnaryReply