pub trait Service {
// Required methods
fn make_request_header(&self) -> RequestHeader;
fn send_request<T>(
&self,
request: T,
) -> Result<SupportedMessage, StatusCode>
where T: Into<SupportedMessage>;
fn async_send_request<T>(
&self,
request: T,
sender: Option<SyncSender<SupportedMessage>>,
) -> Result<u32, StatusCode>
where T: Into<SupportedMessage>;
}Required Methods§
fn make_request_header(&self) -> RequestHeader
Sourcefn send_request<T>(&self, request: T) -> Result<SupportedMessage, StatusCode>where
T: Into<SupportedMessage>,
fn send_request<T>(&self, request: T) -> Result<SupportedMessage, StatusCode>where
T: Into<SupportedMessage>,
Synchronously sends a request. The return value is the response to the request
Sourcefn async_send_request<T>(
&self,
request: T,
sender: Option<SyncSender<SupportedMessage>>,
) -> Result<u32, StatusCode>where
T: Into<SupportedMessage>,
fn async_send_request<T>(
&self,
request: T,
sender: Option<SyncSender<SupportedMessage>>,
) -> Result<u32, StatusCode>where
T: Into<SupportedMessage>,
Asynchronously sends a request. The return value is the request handle of the request
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.