pub struct Idevice { /* private fields */ }Expand description
Main handle for communicating with an iOS device
Manages the connection socket and provides methods for common device operations and message exchange.
Implementations§
Source§impl Idevice
impl Idevice
Sourcepub fn new(socket: Box<dyn ReadWrite>, label: impl Into<String>) -> Self
pub fn new(socket: Box<dyn ReadWrite>, label: impl Into<String>) -> Self
Creates a new device connection handle
§Arguments
socket- The established connection socketlabel- Unique identifier for this connection
pub fn get_socket(self) -> Option<Box<dyn ReadWrite>>
Sourcepub async fn get_type(&mut self) -> Result<String, IdeviceError>
pub async fn get_type(&mut self) -> Result<String, IdeviceError>
Sourcepub async fn rsd_checkin(&mut self) -> Result<(), IdeviceError>
pub async fn rsd_checkin(&mut self) -> Result<(), IdeviceError>
Performs RSD (Remote Service Discovery) check-in procedure
Establishes the basic service connection protocol
§Errors
Returns IdeviceError if the protocol sequence isn’t followed correctly
Sourcepub async fn send_raw_with_progress<Fut, S>(
&mut self,
message: &[u8],
callback: impl Fn(((usize, usize), S)) -> Fut,
state: S,
) -> Result<(), IdeviceError>
pub async fn send_raw_with_progress<Fut, S>( &mut self, message: &[u8], callback: impl Fn(((usize, usize), S)) -> Fut, state: S, ) -> Result<(), IdeviceError>
Sends raw binary data with progress callbacks
§Arguments
message- The bytes to sendcallback- Progress callback invoked after each chunkstate- Arbitrary state passed to callback
§Type Parameters
Fut- Future type returned by callbackS- Type of state passed to callback
§Errors
Returns IdeviceError if transmission fails
Sourcepub async fn start_session(
&mut self,
pairing_file: &PairingFile,
) -> Result<(), IdeviceError>
pub async fn start_session( &mut self, pairing_file: &PairingFile, ) -> Result<(), IdeviceError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Idevice
impl !RefUnwindSafe for Idevice
impl Send for Idevice
impl Sync for Idevice
impl Unpin for Idevice
impl !UnwindSafe for Idevice
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