pub trait ServerCommunicationConfigRepository: Send + Sync {
type GetError: Debug + Send + Sync + 'static;
type SaveError: Debug + Send + Sync + 'static;
// Required methods
fn get(
&self,
domain: String,
) -> impl Future<Output = Result<Option<ServerCommunicationConfig>, Self::GetError>> + Send;
fn save(
&self,
domain: String,
config: ServerCommunicationConfig,
) -> impl Future<Output = Result<(), Self::SaveError>> + Send;
}Expand description
Repository for storing server communication configuration
This trait abstracts storage to allow TypeScript implementations via State Provider in WASM contexts, while also supporting in-memory implementations for testing.
Required Associated Types§
Required Methods§
Sourcefn get(
&self,
domain: String,
) -> impl Future<Output = Result<Option<ServerCommunicationConfig>, Self::GetError>> + Send
fn get( &self, domain: String, ) -> impl Future<Output = Result<Option<ServerCommunicationConfig>, Self::GetError>> + Send
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.