[][src]Struct simctl::Device

pub struct Device { /* fields omitted */ }

Wrapper around a single device returned by simctl.

Implementations

impl Device[src]

pub fn simctl(&self) -> &Simctl[src]

Returns an instance to the Simctl wrapper that was used to retrieve this device.

pub fn info(&self) -> &DeviceInfo[src]

Returns information about this device. This is also accessible through Device::deref.

impl Device[src]

pub fn boot(&self) -> Result<()>[src]

Boots this device. If the device is already booted, this function will return an error (as does the underlying CLI).

NOTE: this does not automatically open the visual simulator interface. Use crate::Simctl::open() to open the visual interface.

pub fn boot_with_env<I, K, V>(&self, envs: I) -> Result<()> where
    I: IntoIterator<Item = (K, V)>,
    K: Display,
    V: AsRef<OsStr>, 
[src]

Boots this device with the given environment variables. Do not prepend SIMCTL_CHILD_ to the variable names: this is done automatically. If the device is already booted, this function will return an error (as does the underlying CLI).

NOTE: this does not automatically open the visual simulator interface. Use crate::Simctl::open() to open the visual interface.

impl Device[src]

pub fn get_app_container(
    &self,
    bundle_id: &str,
    container: &Container
) -> Result<PathBuf>
[src]

Returns a path to the given container of an application with the given bundle id.

impl Device[src]

pub fn getenv(&self, name: &str) -> Result<String>[src]

Returns a local environment variable with the given name. Do not prepend SIMCTL_CHILD_ to the variable name. If no variable with the given name exists, this function will return an empty string (and no error).

impl Device[src]

pub fn install(&self, path: &Path) -> Result<()>[src]

Installs an .app folder from the given path onto this device. If the app (or an earlier version) already existed on this device, its app container (see Device::get_app_container) will be overwritten while the other containers remain unchanged (i.e. data persists between upgrades).

impl Device[src]

pub fn io(&self) -> IO[src]

Returns a wrapper around the simctl io subcommand.

impl Device[src]

pub fn keychain(&self) -> Keychain[src]

Returns an instance of the keychain subcommand.

impl Device[src]

pub fn launch<'a>(&self, bundle_id: &'a str) -> Launch<'a>[src]

Returns a builder that can be used to customize the launch of an app with the given bundle ID on this device.

impl Device[src]

pub fn open_url(&self, path: &str) -> Result<()>[src]

Opens the given URL on this device.

impl Device[src]

pub fn privacy(&self) -> Privacy[src]

Returns a wrapper around the simctl privacy subcommand.

impl Device[src]

pub fn push(&self, bundle_id: &str, push: &Push) -> Result<()>[src]

Sends the given push message to this device for an app with the given bundle ID.

impl Device[src]

pub fn shutdown(&self) -> Result<()>[src]

Shuts down this device. Returns an error if it isn't booted.

impl Device[src]

pub fn status_bar(&self) -> StatusBar[src]

Returns a wrapper around the simctl status_bar subcommand.

impl Device[src]

pub fn terminate(&self, bundle_id: &str) -> Result<()>[src]

Terminates a running application with the given bundle ID on this device.

impl Device[src]

pub fn ui(&self) -> UI[src]

Returns a wrapper around the simctl ui subcommand.

impl Device[src]

pub fn uninstall(&self, bundle_id: &str) -> Result<()>[src]

Uninstalls an app with the given bundle ID from this device.

Trait Implementations

impl Clone for Device[src]

impl Debug for Device[src]

impl Deref for Device[src]

type Target = DeviceInfo

The resulting type after dereferencing.

Auto Trait Implementations

impl RefUnwindSafe for Device

impl Send for Device

impl Sync for Device

impl Unpin for Device

impl UnwindSafe for Device

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.