pub trait IdeviceService: Sized {
// Required methods
fn service_name() -> Cow<'static, str>;
async fn from_stream(idevice: Idevice) -> Result<Self, IdeviceError>;
// Provided method
async fn connect(
provider: &dyn IdeviceProvider,
) -> Result<Self, IdeviceError> { ... }
}Expand description
Interface for services that can be connected to on an iOS device
Implement this trait to define new services that can be accessed through the device connection protocol.
Required Methods§
Sourcefn service_name() -> Cow<'static, str>
fn service_name() -> Cow<'static, str>
Returns the service name as advertised by the device
async fn from_stream(idevice: Idevice) -> Result<Self, IdeviceError>
Provided Methods§
Sourceasync fn connect(provider: &dyn IdeviceProvider) -> Result<Self, IdeviceError>
async fn connect(provider: &dyn IdeviceProvider) -> Result<Self, IdeviceError>
Establishes a connection to this service
§Arguments
provider- The device provider that can supply connections
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.