pub struct LockdownClient { /* private fields */ }Expand description
High-level Lockdown client. Handles session management and service starting.
Implementations§
Source§impl LockdownClient
impl LockdownClient
Sourcepub async fn connect_with_stream<S>(
stream: S,
pair_record: &PairRecord,
) -> Result<Self, LockdownError>
pub async fn connect_with_stream<S>( stream: S, pair_record: &PairRecord, ) -> Result<Self, LockdownError>
Create a LockdownClient from an already-connected usbmux stream, performing TLS handshake.
Sourcepub async fn get_value(
&mut self,
domain: Option<&str>,
key: Option<&str>,
) -> Result<Value, LockdownError>
pub async fn get_value( &mut self, domain: Option<&str>, key: Option<&str>, ) -> Result<Value, LockdownError>
Get a value from lockdown.
Sourcepub async fn set_value<T>(
&mut self,
domain: Option<&str>,
key: Option<&str>,
value: T,
) -> Result<(), LockdownError>where
T: Serialize,
pub async fn set_value<T>(
&mut self,
domain: Option<&str>,
key: Option<&str>,
value: T,
) -> Result<(), LockdownError>where
T: Serialize,
Set a lockdown value.
Sourcepub async fn remove_value(
&mut self,
domain: Option<&str>,
key: Option<&str>,
) -> Result<(), LockdownError>
pub async fn remove_value( &mut self, domain: Option<&str>, key: Option<&str>, ) -> Result<(), LockdownError>
Remove a lockdown value.
Sourcepub async fn start_service(
&mut self,
service: &str,
) -> Result<ServiceInfo, LockdownError>
pub async fn start_service( &mut self, service: &str, ) -> Result<ServiceInfo, LockdownError>
Start a service and return its port information.
Sourcepub async fn stop_session(&mut self) -> Result<(), LockdownError>
pub async fn stop_session(&mut self) -> Result<(), LockdownError>
Stop the current session.
Sourcepub async fn product_version(&mut self) -> Result<Version, LockdownError>
pub async fn product_version(&mut self) -> Result<Version, LockdownError>
Get the device product version string.
Auto Trait Implementations§
impl Freeze for LockdownClient
impl !RefUnwindSafe for LockdownClient
impl Send for LockdownClient
impl !Sync for LockdownClient
impl Unpin for LockdownClient
impl UnsafeUnpin for LockdownClient
impl !UnwindSafe for LockdownClient
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