pub trait SocketProxyInterface: Send + Sync {
type CreateSocketResponseFut: Future<Output = Result<SocketCreateSocketResult, Error>> + Send;
type SetSocketDispositionResponseFut: Future<Output = Result<SocketSetSocketDispositionResult, Error>> + Send;
type ReadSocketResponseFut: Future<Output = Result<SocketReadSocketResult, Error>> + Send;
type WriteSocketResponseFut: Future<Output = Result<SocketWriteSocketResult, Error>> + Send;
type ReadSocketStreamingStartResponseFut: Future<Output = Result<SocketReadSocketStreamingStartResult, Error>> + Send;
type ReadSocketStreamingStopResponseFut: Future<Output = Result<SocketReadSocketStreamingStopResult, Error>> + Send;
// Required methods
fn create_socket(
&self,
options: SocketType,
handles: &[NewHandleId; 2],
) -> Self::CreateSocketResponseFut;
fn set_socket_disposition(
&self,
handle: &HandleId,
disposition: SocketDisposition,
disposition_peer: SocketDisposition,
) -> Self::SetSocketDispositionResponseFut;
fn read_socket(
&self,
handle: &HandleId,
max_bytes: u64,
) -> Self::ReadSocketResponseFut;
fn write_socket(
&self,
handle: &HandleId,
data: &[u8],
) -> Self::WriteSocketResponseFut;
fn read_socket_streaming_start(
&self,
handle: &HandleId,
) -> Self::ReadSocketStreamingStartResponseFut;
fn read_socket_streaming_stop(
&self,
handle: &HandleId,
) -> Self::ReadSocketStreamingStopResponseFut;
}Required Associated Types§
type CreateSocketResponseFut: Future<Output = Result<SocketCreateSocketResult, Error>> + Send
type SetSocketDispositionResponseFut: Future<Output = Result<SocketSetSocketDispositionResult, Error>> + Send
type ReadSocketResponseFut: Future<Output = Result<SocketReadSocketResult, Error>> + Send
type WriteSocketResponseFut: Future<Output = Result<SocketWriteSocketResult, Error>> + Send
type ReadSocketStreamingStartResponseFut: Future<Output = Result<SocketReadSocketStreamingStartResult, Error>> + Send
type ReadSocketStreamingStopResponseFut: Future<Output = Result<SocketReadSocketStreamingStopResult, Error>> + Send
Required Methods§
fn create_socket( &self, options: SocketType, handles: &[NewHandleId; 2], ) -> Self::CreateSocketResponseFut
fn set_socket_disposition( &self, handle: &HandleId, disposition: SocketDisposition, disposition_peer: SocketDisposition, ) -> Self::SetSocketDispositionResponseFut
fn read_socket( &self, handle: &HandleId, max_bytes: u64, ) -> Self::ReadSocketResponseFut
fn write_socket( &self, handle: &HandleId, data: &[u8], ) -> Self::WriteSocketResponseFut
fn read_socket_streaming_start( &self, handle: &HandleId, ) -> Self::ReadSocketStreamingStartResponseFut
fn read_socket_streaming_stop( &self, handle: &HandleId, ) -> Self::ReadSocketStreamingStopResponseFut
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".