pub trait AbstractSocketBackend {
type Socket;
type Message;
type Param;
// Required methods
fn client() -> Self::Param;
fn server() -> Self::Param;
fn create_client_socket(
&mut self,
param: &PSocketParam,
extra_param: &Self::Param,
) -> Self::Socket;
fn create_server_socket(
&mut self,
param: &PSocketParam,
extra_param: &Self::Param,
) -> Self::Socket;
}Expand description
Abtract implementation of a socket backend. It defines what is a socket type, the type of the extra parameters to be used to initialise its sockets and also what is the type of message to be used with this particular bakend.
Required Associated Types§
Required Methods§
Sourcefn create_client_socket(
&mut self,
param: &PSocketParam,
extra_param: &Self::Param,
) -> Self::Socket
fn create_client_socket( &mut self, param: &PSocketParam, extra_param: &Self::Param, ) -> Self::Socket
Sourcefn create_server_socket(
&mut self,
param: &PSocketParam,
extra_param: &Self::Param,
) -> Self::Socket
fn create_server_socket( &mut self, param: &PSocketParam, extra_param: &Self::Param, ) -> Self::Socket
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.