pub struct RemoteConversationHandle { /* private fields */ }Expand description
Conversation handle that communicates through SDK-internal wire protocol transport.
Implementations§
Source§impl RemoteConversationHandle
impl RemoteConversationHandle
Sourcepub fn new(config: &RemoteConfig) -> Self
pub fn new(config: &RemoteConfig) -> Self
Creates a remote conversation handle from validated configuration.
Sourcepub fn request<Req>(&self, request: Req) -> Result<(), SdkError>where
Req: Serialize,
pub fn request<Req>(&self, request: Req) -> Result<(), SdkError>where
Req: Serialize,
Sends a typed request on this conversation and blocks for its correlated
reply, buffering the reply for the next receive.
This is the request leg of the conversation request-reply pattern. It is
kept distinct from send, which stays
fire-and-forget (the server is silent on success): only request sets the
reply-requested flag and waits for the server’s correlated answer. The aion
dispatch model (send request, then receive reply) maps onto a request
followed by receive.
§Errors
Returns SdkError when the request cannot be serialized or the round
trip fails.
Sourcepub fn connection_state(&self) -> ConnectionState
pub fn connection_state(&self) -> ConnectionState
Returns current lifecycle state from the SDK-003 state machine.
Sourcepub const fn server_address(&self) -> &ServerAddress
pub const fn server_address(&self) -> &ServerAddress
Returns remote server address used by this handle.
Trait Implementations§
Source§impl Clone for RemoteConversationHandle
impl Clone for RemoteConversationHandle
Source§fn clone(&self) -> RemoteConversationHandle
fn clone(&self) -> RemoteConversationHandle
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl ConversationHandle for RemoteConversationHandle
impl ConversationHandle for RemoteConversationHandle
Source§type ReceiveFuture<'a, M> = ReadyResult<M>
where
Self: 'a,
M: DeserializeOwned + 'a
type ReceiveFuture<'a, M> = ReadyResult<M> where Self: 'a, M: DeserializeOwned + 'a
receive for message type M.Source§type LifecycleStream = EmptyLifecycleStream
type LifecycleStream = EmptyLifecycleStream
lifecycle.