pub struct IpcRpcClient<U: UserMessage> { /* private fields */ }
Expand description
Used to send messages to the connected server.
Implementations§
Source§impl<U: UserMessage> IpcRpcClient<U>
impl<U: UserMessage> IpcRpcClient<U>
Sourcepub async fn initialize_client<F, Fut>(
key: ConnectionKey,
message_handler: F,
) -> Result<IpcRpcClient<U>, IpcRpcError>
pub async fn initialize_client<F, Fut>( key: ConnectionKey, message_handler: F, ) -> Result<IpcRpcClient<U>, IpcRpcError>
Initializes a client connected to the server which was paired with the given ConnectionKey
.
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 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.
pub fn wait_for_server_to_disconnect( &self, ) -> impl Future<Output = Result<(), IpcRpcError>> + Send + 'static
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§
Source§impl<U: Clone + UserMessage> Clone for IpcRpcClient<U>
impl<U: Clone + UserMessage> Clone for IpcRpcClient<U>
Source§fn clone(&self) -> IpcRpcClient<U>
fn clone(&self) -> IpcRpcClient<U>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<U: Debug + UserMessage> Debug for IpcRpcClient<U>
impl<U: Debug + UserMessage> Debug for IpcRpcClient<U>
Source§impl<U: UserMessage> Drop for IpcRpcClient<U>
impl<U: UserMessage> Drop for IpcRpcClient<U>
Auto Trait Implementations§
impl<U> Freeze for IpcRpcClient<U>
impl<U> !RefUnwindSafe for IpcRpcClient<U>
impl<U> Send for IpcRpcClient<U>
impl<U> !Sync for IpcRpcClient<U>
impl<U> Unpin for IpcRpcClient<U>where
U: Unpin,
impl<U> UnwindSafe for IpcRpcClient<U>where
U: UnwindSafe,
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