pub struct ZirconProcess { /* private fields */ }Implementations§
Methods from Deref<Target = Process>§
Sourcepub fn raw_handle(&self) -> u32
pub fn raw_handle(&self) -> u32
Return the handle’s integer value.
pub fn is_invalid(&self) -> bool
Sourcepub fn as_handle_ref(&self) -> Unowned<'_, NullableHandle>
pub fn as_handle_ref(&self) -> Unowned<'_, NullableHandle>
Returns a [HandleRef] referring to this handle.
Sourcepub fn duplicate_handle(&self, rights: Rights) -> Result<Process, Status>
pub fn duplicate_handle(&self, rights: Rights) -> Result<Process, Status>
Wraps the
zx_handle_duplicate
syscall.
Sourcepub fn signal(
&self,
clear_mask: Signals,
set_mask: Signals,
) -> Result<(), Status>
pub fn signal( &self, clear_mask: Signals, set_mask: Signals, ) -> Result<(), Status>
Wraps the
zx_object_signal
syscall.
Sourcepub fn wait_one(
&self,
signals: Signals,
deadline: Instant<MonotonicTimeline>,
) -> WaitResult
pub fn wait_one( &self, signals: Signals, deadline: Instant<MonotonicTimeline>, ) -> WaitResult
Wraps the
zx_object_wait_one
syscall.
Sourcepub fn wait_async(
&self,
port: &Port,
key: u64,
signals: Signals,
options: WaitAsyncOpts,
) -> Result<(), Status>
pub fn wait_async( &self, port: &Port, key: u64, signals: Signals, options: WaitAsyncOpts, ) -> Result<(), Status>
Wraps the
zx_object_wait_async
syscall.
Sourcepub fn wait_item(&self, signals: Signals) -> WaitItem<'_>
pub fn wait_item(&self, signals: Signals) -> WaitItem<'_>
Return a WaitItem for this handle and the provided signals to use with
object_wait_many.
Sourcepub fn get_name(&self) -> Result<Name, Status>
pub fn get_name(&self) -> Result<Name, Status>
Wraps a call to the
zx_object_get_property
syscall for the ZX_PROP_NAME property.
Sourcepub fn set_name(&self, name: &Name) -> Result<(), Status>
pub fn set_name(&self, name: &Name) -> Result<(), Status>
Wraps a call to the
zx_object_set_property
syscall for the ZX_PROP_NAME property.
Sourcepub fn basic_info(&self) -> Result<HandleBasicInfo, Status>
pub fn basic_info(&self) -> Result<HandleBasicInfo, Status>
Wraps the
zx_object_get_info
syscall for the ZX_INFO_HANDLE_BASIC topic.
Sourcepub fn count_info(&self) -> Result<HandleCountInfo, Status>
pub fn count_info(&self) -> Result<HandleCountInfo, Status>
Wraps the
zx_object_get_info
syscall for the ZX_INFO_HANDLE_COUNT topic.
Sourcepub fn koid(&self) -> Result<Koid, Status>
pub fn koid(&self) -> Result<Koid, Status>
Returns the Koid for the object referred to by this handle.
pub fn get_debug_addr(&self) -> Result<u64, Status>
pub fn set_debug_addr(&self, val: &u64) -> Result<(), Status>
pub fn get_break_on_load(&self) -> Result<u64, Status>
pub fn set_break_on_load(&self, val: &u64) -> Result<(), Status>
Sourcepub fn start(
&self,
thread: &Thread,
entry: usize,
stack: usize,
arg1: NullableHandle,
arg2: usize,
) -> Result<(), Status>
pub fn start( &self, thread: &Thread, entry: usize, stack: usize, arg1: NullableHandle, arg2: usize, ) -> Result<(), Status>
Similar to Thread::start, but is used to start the first thread in a process.
Wraps the zx_process_start syscall.
Sourcepub fn create_thread(&self, name: &[u8]) -> Result<Thread, Status>
pub fn create_thread(&self, name: &[u8]) -> Result<Thread, Status>
Create a thread inside a process.
Wraps the zx_thread_create syscall.
Sourcepub fn write_memory(&self, vaddr: usize, bytes: &[u8]) -> Result<usize, Status>
pub fn write_memory(&self, vaddr: usize, bytes: &[u8]) -> Result<usize, Status>
Write memory inside a process.
Wraps the zx_process_write_memory syscall.
Sourcepub fn read_memory(
&self,
vaddr: usize,
bytes: &mut [u8],
) -> Result<usize, Status>
pub fn read_memory( &self, vaddr: usize, bytes: &mut [u8], ) -> Result<usize, Status>
Read memory from inside a process.
Wraps the zx_process_read_memory syscall.
Sourcepub fn read_memory_uninit<'a>(
&self,
vaddr: usize,
buffer: &'a mut [MaybeUninit<u8>],
) -> Result<(&'a mut [u8], &'a mut [MaybeUninit<u8>]), Status>
pub fn read_memory_uninit<'a>( &self, vaddr: usize, buffer: &'a mut [MaybeUninit<u8>], ) -> Result<(&'a mut [u8], &'a mut [MaybeUninit<u8>]), Status>
Read memory from inside a process without requiring the output buffer to be initialized.
Wraps the zx_process_read_memory syscall.
Sourcepub fn info(&self) -> Result<ProcessInfo, Status>
pub fn info(&self) -> Result<ProcessInfo, Status>
Wraps the zx_object_get_info syscall for the ZX_INFO_PROCESS topic.
Sourcepub fn threads(&self) -> Result<Vec<Koid>, Status>
pub fn threads(&self) -> Result<Vec<Koid>, Status>
Wraps the zx_object_get_info syscall for the ZX_INFO_PROCESS_THREADS topic.
Sourcepub fn task_stats(&self) -> Result<TaskStatsInfo, Status>
pub fn task_stats(&self) -> Result<TaskStatsInfo, Status>
Wraps the zx_object_get_info syscall for the ZX_INFO_TASK_STATS topic.
Sourcepub fn info_maps_vec(&self) -> Result<Vec<MapInfo>, Status>
pub fn info_maps_vec(&self) -> Result<Vec<MapInfo>, Status>
Wraps the zx_object_get_info syscall for the ZX_INFO_PROCESS_MAPS topic.
Sourcepub fn handle_stats(&self) -> Result<ProcessHandleStats, Status>
pub fn handle_stats(&self) -> Result<ProcessHandleStats, Status>
Wraps the zx_object_get_info syscall for the ZX_INFO_PROCESS_HANDLE_STATS topic.
Sourcepub fn get_child(&self, koid: &Koid, rights: Rights) -> Result<Thread, Status>
pub fn get_child(&self, koid: &Koid, rights: Rights) -> Result<Thread, Status>
Wraps the zx_object_get_child syscall.
Sourcepub fn info_vmos_vec(&self) -> Result<Vec<VmoInfo>, Status>
pub fn info_vmos_vec(&self) -> Result<Vec<VmoInfo>, Status>
Wraps the zx_object_get_info syscall for the ZX_INFO_PROCESS_VMO topic.
Sourcepub fn info_maps<'a>(
&self,
info_out: &'a mut [MaybeUninit<MapInfo>],
) -> Result<(&'a mut [MapInfo], &'a mut [MaybeUninit<MapInfo>], usize), Status>
pub fn info_maps<'a>( &self, info_out: &'a mut [MaybeUninit<MapInfo>], ) -> Result<(&'a mut [MapInfo], &'a mut [MaybeUninit<MapInfo>], usize), Status>
Wraps the zx_object_get_info syscall for the ZX_INFO_PROCESS_MAPS topic. Contrarily to Process::info_vmos_vec, this method ensures that no intermediate copy of the data is made, at the price of a less convenient interface.
Sourcepub fn info_vmos<'a>(
&self,
info_out: &'a mut [MaybeUninit<VmoInfo>],
) -> Result<(&'a mut [VmoInfo], &'a mut [MaybeUninit<VmoInfo>], usize), Status>
pub fn info_vmos<'a>( &self, info_out: &'a mut [MaybeUninit<VmoInfo>], ) -> Result<(&'a mut [VmoInfo], &'a mut [MaybeUninit<VmoInfo>], usize), Status>
Wraps the zx_object_get_info syscall for the ZX_INFO_PROCESS_VMO topic. Contrarily to Process::info_vmos_vec, this method ensures that no intermediate copy of the data is made, at the price of a less convenient interface.
Trait Implementations§
Source§impl Debug for ZirconProcess
impl Debug for ZirconProcess
Auto Trait Implementations§
impl Freeze for ZirconProcess
impl RefUnwindSafe for ZirconProcess
impl Send for ZirconProcess
impl Sync for ZirconProcess
impl Unpin for ZirconProcess
impl UnsafeUnpin for ZirconProcess
impl UnwindSafe for ZirconProcess
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, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
§impl<F, N> FidlIntoNative<Box<N>> for Fwhere
F: FidlIntoNative<N>,
impl<F, N> FidlIntoNative<Box<N>> for Fwhere
F: FidlIntoNative<N>,
fn fidl_into_native(self) -> Box<N>
§impl<T> InstanceFromServiceTransport<T> for T
impl<T> InstanceFromServiceTransport<T> for T
§fn from_service_transport(handle: T) -> T
fn from_service_transport(handle: T) -> T
T to [Self]Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more