pub trait INetXClient {
Show 15 methods
// Required methods
fn init<C: IController + Sync + Send + 'static>(
&self,
controller: C,
) -> impl Future<Output = ()>;
fn connect_network(
self: &Arc<Self>,
) -> impl Future<Output = Result<()>> + Send;
fn get_tls_config(&self) -> TlsConfig;
fn get_address(&self) -> String;
fn get_service_info(&self) -> ServerOption;
fn get_session_id(&self) -> i64;
fn get_mode(&self) -> u8;
fn new_serial(&self) -> i64;
fn is_connect(&self) -> bool;
fn get_peer(&self) -> impl Future<Output = Option<Arc<NetPeer>>>;
fn set_network_client(
&self,
client: Arc<NetPeer>,
) -> impl Future<Output = ()>;
fn get_callback_len(&self) -> impl Future<Output = usize>;
fn close(&self) -> impl Future<Output = Result<()>>;
fn call(
&self,
serial: i64,
buff: Data,
) -> impl Future<Output = Result<RetResult>>;
fn run(&self, buff: Data) -> impl Future<Output = Result<()>>;
}
Required Methods§
Sourcefn init<C: IController + Sync + Send + 'static>(
&self,
controller: C,
) -> impl Future<Output = ()>
fn init<C: IController + Sync + Send + 'static>( &self, controller: C, ) -> impl Future<Output = ()>
Sourcefn get_tls_config(&self) -> TlsConfig
fn get_tls_config(&self) -> TlsConfig
Sourcefn get_address(&self) -> String
fn get_address(&self) -> String
Sourcefn get_service_info(&self) -> ServerOption
fn get_service_info(&self) -> ServerOption
Sourcefn get_session_id(&self) -> i64
fn get_session_id(&self) -> i64
Sourcefn new_serial(&self) -> i64
fn new_serial(&self) -> i64
Sourcefn is_connect(&self) -> bool
fn is_connect(&self) -> bool
Sourcefn get_callback_len(&self) -> impl Future<Output = usize>
fn get_callback_len(&self) -> impl Future<Output = usize>
Gets the length of the request wait callback.
§Returns
A future that resolves to the length as a usize
.
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.
Implementors§
impl<T: SessionSave + 'static> INetXClient for Actor<NetXClient<T>>
Implementation of the INetXClient
trait for Actor<NetXClient<T>>
.
This implementation provides the external operations for the NetXClient
,
including methods for initializing the controller, connecting to the network,
getting configuration and session information, generating serial IDs, and
checking connection status.