pub struct SIBinder { /* private fields */ }Expand description
Strong reference to a binder object.
Implementations§
Source§impl SIBinder
impl SIBinder
pub fn new(data: Arc<dyn IBinder>) -> Result<Self>
pub fn downgrade(this: &Self) -> WIBinder
Sourcepub fn into_interface<I: FromIBinder + Interface + ?Sized>(
self,
) -> Result<Strong<I>>
pub fn into_interface<I: FromIBinder + Interface + ?Sized>( self, ) -> Result<Strong<I>>
Try to convert this Binder object into a trait object for the given Binder interface.
If this object does not implement the expected interface, the error
StatusCode::BadType is returned.
Methods from Deref<Target = dyn IBinder>§
Sourcepub fn as_proxy(&self) -> Option<&ProxyHandle>
pub fn as_proxy(&self) -> Option<&ProxyHandle>
Convert this binder object into a proxy binder object.
Trait Implementations§
Source§impl Deserialize for SIBinder
impl Deserialize for SIBinder
Source§impl DeserializeArray for SIBinder
impl DeserializeArray for SIBinder
Source§impl DeserializeOption for SIBinder
impl DeserializeOption for SIBinder
Source§impl SerializeArray for SIBinder
impl SerializeArray for SIBinder
Source§impl SerializeOption for SIBinder
impl SerializeOption for SIBinder
impl Eq for SIBinder
Auto Trait Implementations§
impl Freeze for SIBinder
impl !RefUnwindSafe for SIBinder
impl Send for SIBinder
impl Sync for SIBinder
impl Unpin for SIBinder
impl !UnwindSafe for SIBinder
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.