pub trait Remotable: Send + Sync {
// Required methods
fn descriptor() -> &'static str
where Self: Sized;
fn on_transact(
&self,
code: TransactionCode,
reader: &mut Parcel,
reply: &mut Parcel,
) -> Result<()>;
fn on_dump(&self, writer: &mut dyn Write, args: &[String]) -> Result<()>;
}Expand description
A local service that can be remotable via Binder.
An object that implement this interface made be made into a Binder service
via Binder::new(object).
This is a low-level interface that should normally be automatically
generated from AIDL via the [declare_binder_interface!] macro. When using
the AIDL backend, users need only implement the high-level AIDL-defined
interface. The AIDL compiler then generates a container struct that wraps
the user-defined service and implements Remotable.
Required Methods§
Sourcefn descriptor() -> &'static strwhere
Self: Sized,
fn descriptor() -> &'static strwhere
Self: Sized,
The Binder interface descriptor string.
This string is a unique identifier for a Binder interface, and should be the same between all implementations of that interface.
Sourcefn on_transact(
&self,
code: TransactionCode,
reader: &mut Parcel,
reply: &mut Parcel,
) -> Result<()>
fn on_transact( &self, code: TransactionCode, reader: &mut Parcel, reply: &mut Parcel, ) -> Result<()>
Handle and reply to a request to invoke a transaction on this object.
reply may be None if the sender does not expect a reply.