Skip to main content

Interface

Trait Interface 

Source
pub trait Interface: Send + Sync {
    // Provided methods
    fn as_binder(&self) -> SIBinder { ... }
    fn dump(&self, _writer: &mut dyn Write, _args: &[String]) -> Result<()> { ... }
}
Expand description

Base trait for all binder interfaces.

This trait allows conversion of a binder interface trait object into an IBinder object for IPC calls. All binder remotable interfaces (i.e., AIDL interfaces) must implement this trait to participate in binder IPC.

Equivalent to IInterface in Android’s C++ binder implementation.

Provided Methods§

Source

fn as_binder(&self) -> SIBinder

Convert this binder object into a generic SIBinder reference.

Source

fn dump(&self, _writer: &mut dyn Write, _args: &[String]) -> Result<()>

Dump transaction handler for this Binder object.

This handler is a no-op by default and should be implemented for each Binder service struct that wishes to respond to dump transactions.

Implementors§