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
Trait for local services that can be exposed via binder IPC.
Objects implementing this trait can be wrapped in a Binder<T> to create
a binder service that can receive and handle incoming transactions.
This is typically auto-generated from AIDL definitions and should not be implemented manually. The AIDL compiler generates the necessary transaction handling code that implements this trait.
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.