pub enum StreamType {
Unary,
ClientStream,
ServerStream,
BidiStream,
}Expand description
The shape of an RPC: how many messages flow in each direction.
This is the interceptor-facing equivalent of MethodKind and uses the
connect-go naming so cross-runtime interceptor logic ports cleanly.
Convert with From in either direction.
StreamType is intentionally exhaustive — the four shapes are fixed by
the gRPC and Connect protocols. MethodKind is the routing-table
equivalent used by Router registration; prefer
StreamType in code that consumes a Spec.
Variants§
Unary
One request message, one response message.
ClientStream
A stream of request messages, one response message.
ServerStream
One request message, a stream of response messages.
BidiStream
Streams of request and response messages.
Trait Implementations§
Source§impl Clone for StreamType
impl Clone for StreamType
Source§fn clone(&self) -> StreamType
fn clone(&self) -> StreamType
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for StreamType
Source§impl Debug for StreamType
impl Debug for StreamType
impl Eq for StreamType
Source§impl From<MethodKind> for StreamType
impl From<MethodKind> for StreamType
Source§fn from(kind: MethodKind) -> Self
fn from(kind: MethodKind) -> Self
Converts to this type from the input type.
Source§impl From<StreamType> for MethodKind
impl From<StreamType> for MethodKind
Source§fn from(st: StreamType) -> Self
fn from(st: StreamType) -> Self
Converts to this type from the input type.
Source§impl Hash for StreamType
impl Hash for StreamType
Source§impl PartialEq for StreamType
impl PartialEq for StreamType
impl StructuralPartialEq for StreamType
Auto Trait Implementations§
impl Freeze for StreamType
impl RefUnwindSafe for StreamType
impl Send for StreamType
impl Sync for StreamType
impl Unpin for StreamType
impl UnsafeUnpin for StreamType
impl UnwindSafe for StreamType
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§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.