pub struct ProcessState { /* private fields */ }Implementations§
Source§impl ProcessState
impl ProcessState
Sourcepub fn as_self() -> &'static ProcessState
pub fn as_self() -> &'static ProcessState
Get ProcessState instance. If ProcessState is not initialized, it will panic. If you want to initialize ProcessState, use init() or init_default().
pub fn set_call_restriction(&self, call_restriction: CallRestriction)
Sourcepub fn init(driver_name: &str, max_threads: u32) -> &'static ProcessState
pub fn init(driver_name: &str, max_threads: u32) -> &'static ProcessState
Initialize ProcessState with binder path and max threads. The meaning of zero max threads is to use the default value. It is dependent on the kernel. If you want to use the default binder path, use init_default().
Sourcepub fn init_default() -> &'static ProcessState
pub fn init_default() -> &'static ProcessState
Initialize ProcessState with default binder path and max threads. The meaning of zero max threads is to use the default value. It is dependent on the kernel. DEFAULT_BINDER_PATH is “/dev/binderfs/binder”.
Sourcepub fn become_context_manager(
&self,
binder: SIBinder,
) -> Result<(), Box<dyn Error>>
pub fn become_context_manager( &self, binder: SIBinder, ) -> Result<(), Box<dyn Error>>
Get binder service manager.
Sourcepub fn context_object(&self) -> Result<SIBinder>
pub fn context_object(&self) -> Result<SIBinder>
Get binder service manager.
Sourcepub fn strong_proxy_for_handle(&self, handle: u32) -> Result<SIBinder>
pub fn strong_proxy_for_handle(&self, handle: u32) -> Result<SIBinder>
Get binder from handle. If the binder is not cached, it will create a new binder.
pub fn disable_background_scheduling(&self, disable: bool)
pub fn background_scheduling_disabled(&self) -> bool
pub fn driver(&self) -> Arc<File>
pub fn start_thread_pool()
pub fn strong_ref_count_for_node(&self, node: &ProxyHandle) -> Result<usize>
pub fn join_thread_pool() -> Result<()>
Trait Implementations§
Source§impl Drop for ProcessState
impl Drop for ProcessState
Source§fn drop(self: &mut ProcessState)
fn drop(self: &mut ProcessState)
Executes the destructor for this type. Read more
Auto Trait Implementations§
impl !Freeze for ProcessState
impl RefUnwindSafe for ProcessState
impl Send for ProcessState
impl Sync for ProcessState
impl Unpin for ProcessState
impl UnwindSafe for ProcessState
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> 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.