NetConnectConfig

Trait NetConnectConfig 

Source
pub trait NetConnectConfig:
    ApiBuilder
    + MaybeSend
    + MaybeSync {
    // Required methods
    fn set_libxmtp_version(
        &mut self,
        version: String,
    ) -> Result<(), Self::Error>;
    fn set_app_version(
        &mut self,
        version: AppVersion,
    ) -> Result<(), Self::Error>;
    fn set_host(&mut self, host: String);
    fn set_tls(&mut self, tls: bool);
    fn set_retry(&mut self, retry: Retry);
    fn rate_per_minute(&mut self, limit: u32);
    fn port(&self) -> Result<Option<String>, Self::Error>;
    fn host(&self) -> Option<&str>;
}
Expand description

describe how to create a single network connection. Implement this trait if your type connects to a single network channel/connection (like gRPc or HTTP)

Required Methods§

Source

fn set_libxmtp_version(&mut self, version: String) -> Result<(), Self::Error>

set the libxmtp version (required)

Source

fn set_app_version(&mut self, version: AppVersion) -> Result<(), Self::Error>

set the sdk app version (required)

Source

fn set_host(&mut self, host: String)

Set the libxmtp host (required)

Source

fn set_tls(&mut self, tls: bool)

indicate tls (default: false)

Source

fn set_retry(&mut self, retry: Retry)

Set the retry strategy for this client

Source

fn rate_per_minute(&mut self, limit: u32)

Set the rate limit per minute for this client

Source

fn port(&self) -> Result<Option<String>, Self::Error>

The port this api builder is using

Source

fn host(&self) -> Option<&str>

Host of the builder

Implementors§