pub struct ClientProtocols {
pub rest: bool,
pub connect: bool,
}Expand description
Which client protocol layer(s) to emit.
Analysis is protocol-agnostic (REST analysis is a superset of what ConnectRPC needs), so this is purely an emit-time selection. Emitting both is supported: a server fronting the same proto over REST and ConnectRPC can hand out either client.
File layout:
- exactly one protocol: emitted flat under
<service>/(<service>/client.rs,<service>/builders.rs) — unchanged from single-protocol output. - both: each protocol gets its own convention subdir (
<service>/rest/,<service>/connect/), re-exported from<service>/mod.rs.
Defaults to REST only, so existing output is unchanged.
Fields§
§rest: boolEmit the REST (HTTP/JSON) client.
connect: boolEmit the ConnectRPC client.
Trait Implementations§
Source§impl Clone for ClientProtocols
impl Clone for ClientProtocols
impl Copy for ClientProtocols
Source§impl Debug for ClientProtocols
impl Debug for ClientProtocols
Source§impl Default for ClientProtocols
impl Default for ClientProtocols
impl Eq for ClientProtocols
Source§impl PartialEq for ClientProtocols
impl PartialEq for ClientProtocols
impl StructuralPartialEq for ClientProtocols
Auto Trait Implementations§
impl Freeze for ClientProtocols
impl RefUnwindSafe for ClientProtocols
impl Send for ClientProtocols
impl Sync for ClientProtocols
impl Unpin for ClientProtocols
impl UnsafeUnpin for ClientProtocols
impl UnwindSafe for ClientProtocols
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