pub struct A2aServiceServer<T> { /* private fields */ }Expand description
Monomorphic dispatcher for A2aService.
Unlike .register(Router) which type-erases each method into an Arc<dyn ErasedHandler> stored in a HashMap, this struct dispatches via a compile-time match on method name: no vtable, no hash lookup.
§Example
ⓘ
use connectrpc::ConnectRpcService;
let server = A2aServiceServer::new(MyImpl);
let service = ConnectRpcService::new(server);
// hand `service` to axum/hyper as a fallback_serviceImplementations§
Source§impl<T: A2aService> A2aServiceServer<T>
impl<T: A2aService> A2aServiceServer<T>
Trait Implementations§
Source§impl<T> Clone for A2aServiceServer<T>
impl<T> Clone for A2aServiceServer<T>
Source§impl<T: A2aService> Dispatcher for A2aServiceServer<T>
impl<T: A2aService> Dispatcher for A2aServiceServer<T>
Source§fn lookup(&self, path: &str) -> Option<MethodDescriptor>
fn lookup(&self, path: &str) -> Option<MethodDescriptor>
Look up a method by its
service_name/method_name path. Read moreSource§fn call_unary(
&self,
path: &str,
ctx: Context,
request: Bytes,
format: CodecFormat,
) -> UnaryResult
fn call_unary( &self, path: &str, ctx: Context, request: Bytes, format: CodecFormat, ) -> UnaryResult
Dispatch a unary call. Read more
Source§fn call_server_streaming(
&self,
path: &str,
ctx: Context,
request: Bytes,
format: CodecFormat,
) -> StreamingResult
fn call_server_streaming( &self, path: &str, ctx: Context, request: Bytes, format: CodecFormat, ) -> StreamingResult
Dispatch a server-streaming call. Read more
Source§fn call_client_streaming(
&self,
path: &str,
ctx: Context,
requests: RequestStream,
format: CodecFormat,
) -> UnaryResult
fn call_client_streaming( &self, path: &str, ctx: Context, requests: RequestStream, format: CodecFormat, ) -> UnaryResult
Dispatch a client-streaming call. Read more
Source§fn call_bidi_streaming(
&self,
path: &str,
ctx: Context,
requests: RequestStream,
format: CodecFormat,
) -> StreamingResult
fn call_bidi_streaming( &self, path: &str, ctx: Context, requests: RequestStream, format: CodecFormat, ) -> StreamingResult
Dispatch a bidi-streaming call. Read more
Auto Trait Implementations§
impl<T> Freeze for A2aServiceServer<T>
impl<T> RefUnwindSafe for A2aServiceServer<T>where
Arc<T>: RefUnwindSafe,
impl<T> Send for A2aServiceServer<T>
impl<T> Sync for A2aServiceServer<T>
impl<T> Unpin for A2aServiceServer<T>
impl<T> UnsafeUnpin for A2aServiceServer<T>where
Arc<T>: UnsafeUnpin,
impl<T> UnwindSafe for A2aServiceServer<T>where
Arc<T>: UnwindSafe,
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
Converts
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> ⓘ
Converts
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