pub struct Channel<'a, R: ReadWrite> { /* private fields */ }Expand description
Handle to a specific communication channel
Provides channel-specific operations for use on the remote server client.
Implementations§
Source§impl<R: ReadWrite> Channel<'_, R>
impl<R: ReadWrite> Channel<'_, R>
Sourcepub async fn read_message(&mut self) -> Result<Message, IdeviceError>
pub async fn read_message(&mut self) -> Result<Message, IdeviceError>
Sourcepub async fn call_method(
&mut self,
method: Option<impl Into<Value>>,
args: Option<Vec<AuxValue>>,
expect_reply: bool,
) -> Result<(), IdeviceError>
pub async fn call_method( &mut self, method: Option<impl Into<Value>>, args: Option<Vec<AuxValue>>, expect_reply: bool, ) -> Result<(), IdeviceError>
Calls a method on the specified channel
§Arguments
method- Optional method data (plist value)args- Optional arguments for the methodexpect_reply- Whether to expect a response
§Returns
Ok(())- If method was successfully calledErr(IdeviceError)- If call failed
§Errors
IO or serialization errors
Trait Implementations§
Auto Trait Implementations§
impl<'a, R> !RefUnwindSafe for Channel<'a, R>
impl<'a, R> !UnwindSafe for Channel<'a, R>
impl<'a, R> Forget for Channel<'a, R>
impl<'a, R> Freeze for Channel<'a, R>where
&'a mut RemoteServerClient<R>: Freeze,
impl<'a, R> Send for Channel<'a, R>where
&'a mut RemoteServerClient<R>: Send,
impl<'a, R> Sync for Channel<'a, R>where
&'a mut RemoteServerClient<R>: Sync,
impl<'a, R> Unpin for Channel<'a, R>where
&'a mut RemoteServerClient<R>: Unpin,
impl<'a, R> UnsafeUnpin for Channel<'a, R>where
&'a mut RemoteServerClient<R>: UnsafeUnpin,
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