pub struct InterfaceClass(/* private fields */);
Expand description
Opaque reference to the type of a Binder interface.
This object encapsulates the Binder interface descriptor string, along with the binder transaction callback, if the class describes a local service.
A Binder remotable object may only have a single interface class, and any given object can only be associated with one class. Two objects with different classes are incompatible, even if both classes have the same interface descriptor.
Implementations§
Source§impl InterfaceClass
impl InterfaceClass
Sourcepub fn new<I: InterfaceClassMethods>() -> InterfaceClass
pub fn new<I: InterfaceClassMethods>() -> InterfaceClass
Get a Binder NDK AIBinder_Class
pointer for this object type.
Note: the returned pointer will not be constant. Calling this method
multiple times for the same type will result in distinct class
pointers. A static getter for this value is implemented in
crate::declare_binder_interface!
.
Sourcepub fn get_descriptor(&self) -> String
pub fn get_descriptor(&self) -> String
Get the interface descriptor string of this class.
Trait Implementations§
Source§impl Clone for InterfaceClass
impl Clone for InterfaceClass
Source§fn clone(&self) -> InterfaceClass
fn clone(&self) -> InterfaceClass
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl From<InterfaceClass> for *const AIBinder_Class
impl From<InterfaceClass> for *const AIBinder_Class
Source§fn from(class: InterfaceClass) -> *const AIBinder_Class
fn from(class: InterfaceClass) -> *const AIBinder_Class
Source§impl PartialEq for InterfaceClass
impl PartialEq for InterfaceClass
impl Copy for InterfaceClass
impl Eq for InterfaceClass
impl StructuralPartialEq for InterfaceClass
Auto Trait Implementations§
impl Freeze for InterfaceClass
impl RefUnwindSafe for InterfaceClass
impl !Send for InterfaceClass
impl !Sync for InterfaceClass
impl Unpin for InterfaceClass
impl UnwindSafe for InterfaceClass
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.