pub trait FromIBinder: Interface {
// Required method
fn try_from(ibinder: SpIBinder) -> Result<Strong<Self>, StatusCode>;
}
Expand description
Interface for transforming a generic SpIBinder into a specific remote interface trait.
§Example
For Binder interface IFoo
, the following implementation should be made:
impl FromIBinder for dyn IFoo {
fn try_from(ibinder: SpIBinder) -> Result<Box<Self>> {
// ...
}
}
Required Methods§
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.