pub struct IpcRpc<U: UserMessage> {
pub server: IpcRpcServer<U>,
/* private fields */
}
Expand description
Initializes a server and owns the connected client. This structure is the preferred way for servers to manage a relationship with a client.
Fields§
§server: IpcRpcServer<U>
Implementations§
Source§impl<U: UserMessage> IpcRpc<U>
impl<U: UserMessage> IpcRpc<U>
pub fn build() -> IpcRpcBuilder<U>
Sourcepub fn send(
&self,
user_message: U,
) -> impl Future<Output = Result<U, IpcRpcError>> + Send + 'static
pub fn send( &self, user_message: U, ) -> impl Future<Output = Result<U, IpcRpcError>> + Send + 'static
Sends a message, will give up on receiving a reply after the DEFAULT_REPLY_TIMEOUT
has passed.
Sourcepub fn send_timeout(
&self,
user_message: U,
timeout: Duration,
) -> impl Future<Output = Result<U, IpcRpcError>> + Send + 'static
pub fn send_timeout( &self, user_message: U, timeout: Duration, ) -> impl Future<Output = Result<U, IpcRpcError>> + Send + 'static
Sends a message, waiting the given timeout
for a reply.
Sourcepub async fn schema_validated(
&mut self,
) -> Result<SchemaValidationStatus, IpcRpcError>
pub async fn schema_validated( &mut self, ) -> Result<SchemaValidationStatus, IpcRpcError>
Returns the outcome of automatic schema validation testing. This testing is performed on connection initiation.
Trait Implementations§
Auto Trait Implementations§
impl<U> Freeze for IpcRpc<U>
impl<U> !RefUnwindSafe for IpcRpc<U>
impl<U> Send for IpcRpc<U>
impl<U> Sync for IpcRpc<U>
impl<U> Unpin for IpcRpc<U>
impl<U> !UnwindSafe for IpcRpc<U>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more