pub struct EmbeddedConfig {
pub channel_name: String,
pub conversation_id: ConversationId,
pub channel_backend: Arc<dyn EmbeddedChannelBackend>,
pub conversation_backend: Arc<dyn EmbeddedConversationBackend>,
}Expand description
Configuration for embedded SDK handles.
Fields§
§channel_name: StringApplication-visible channel name.
conversation_id: ConversationIdApplication-visible conversation identifier.
channel_backend: Arc<dyn EmbeddedChannelBackend>Direct channel backend used for in-process publication.
conversation_backend: Arc<dyn EmbeddedConversationBackend>Direct conversation backend used for in-process conversation sends.
Implementations§
Source§impl EmbeddedConfig
impl EmbeddedConfig
Sourcepub fn new(
channel_name: impl Into<String>,
conversation_id: impl Into<ConversationId>,
) -> Self
pub fn new( channel_name: impl Into<String>, conversation_id: impl Into<ConversationId>, ) -> Self
Creates embedded configuration without requiring a server address.
The default backends REFUSE. Both
DirectEmbeddedChannelBackend and DirectEmbeddedConversationBackend
return SdkError::Unwired naming seam B1: embedded mode has no
in-process bus behind it, and this configuration will not pretend
otherwise by reporting an Accept nothing delivered. Install real
backends with with_channel_backend and
with_conversation_backend.
Sourcepub fn with_channel_backend(
self,
backend: Arc<dyn EmbeddedChannelBackend>,
) -> Self
pub fn with_channel_backend( self, backend: Arc<dyn EmbeddedChannelBackend>, ) -> Self
Replaces the direct in-process channel backend.
This installs a publish path and nothing else: EmbeddedChannelBackend
has no subscribe or deliver method, so a backend installed here does not
give ChannelHandle::subscribe a delivery path — that surface refuses
either way.
Sourcepub fn with_conversation_backend(
self,
backend: Arc<dyn EmbeddedConversationBackend>,
) -> Self
pub fn with_conversation_backend( self, backend: Arc<dyn EmbeddedConversationBackend>, ) -> Self
Replaces the direct in-process conversation backend.