pub enum ClientProtocol {
Rest,
Connect,
}Expand description
Wire protocol a generated client speaks.
A single client layer. The set of layers to emit is ClientProtocols; a server that exposes
both REST and ConnectRPC for the same proto can emit both from one generation run.
ClientProtocol::Rest: the HTTP/JSON low-level client (theclientmodule) plus fluent builders. Methods are routed fromgoogle.api.http; a method without an annotation has no route and is skipped by the REST emitter.ClientProtocol::Connect: fluent builders over the connect-rust (BSR plugin) generated{Service}Client<T>, dispatched viaconnectrpc. Nogoogle.api.httpannotation is required — the whole request message is the body, and required-vs-optional partitioning comes purely fromgoogle.api.field_behavior.
Variants§
Rest
HTTP/JSON client routed from google.api.http (the historical default).
Connect
ConnectRPC client layered over the connect-rust generated service client.
Trait Implementations§
Source§impl Clone for ClientProtocol
impl Clone for ClientProtocol
impl Copy for ClientProtocol
Source§impl Debug for ClientProtocol
impl Debug for ClientProtocol
Source§impl Default for ClientProtocol
impl Default for ClientProtocol
impl Eq for ClientProtocol
Source§impl PartialEq for ClientProtocol
impl PartialEq for ClientProtocol
impl StructuralPartialEq for ClientProtocol
Auto Trait Implementations§
impl Forget for ClientProtocol
impl Freeze for ClientProtocol
impl RefUnwindSafe for ClientProtocol
impl Send for ClientProtocol
impl Sync for ClientProtocol
impl Unpin for ClientProtocol
impl UnsafeUnpin for ClientProtocol
impl UnwindSafe for ClientProtocol
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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