pub enum SdkChannelHandle {
Embedded(EmbeddedChannelHandle),
Remote(RemoteChannelHandle),
}Expand description
Runtime-selected channel handle that keeps deployment differences behind configuration.
Variants§
Embedded(EmbeddedChannelHandle)
Embedded direct in-process handle.
Remote(RemoteChannelHandle)
Remote protocol-backed handle.
Implementations§
Trait Implementations§
Source§impl ChannelHandle for SdkChannelHandle
impl ChannelHandle for SdkChannelHandle
Source§fn subscribe<M>(&self) -> Self::Subscription<M>where
M: DeserializeOwned,
fn subscribe<M>(&self) -> Self::Subscription<M>where
M: DeserializeOwned,
BOTH ARMS REFUSE. Typed subscription delivery is not implemented in
either deployment mode, so whichever mode configuration selected, the
returned stream yields exactly one Err(SdkError::Unwired) and then
ends.
The remote arm’s refusal names SubscriptionStream::open as the surface
that works. The embedded arm’s names the same remote surface, because
embedded mode has no in-process delivery path to offer instead. That arm
used to return a locally empty stream — described here as “what embedded
mode has always meant”, which was true of the implementation and
misleading to a caller: an empty stream is indistinguishable from a live
subscription on a quiet channel.
Source§type Subscription<M> = SdkSubscription<M>
where
M: DeserializeOwned
type Subscription<M> = SdkSubscription<M> where M: DeserializeOwned
subscribe for message type M.Source§type ReplyFuture<'a, Resp> = ReadyResult<Resp>
where
Self: 'a,
Resp: DeserializeOwned + 'a
type ReplyFuture<'a, Resp> = ReadyResult<Resp> where Self: 'a, Resp: DeserializeOwned + 'a
request_reply for reply type Resp.