Struct fidl::handle::fuchsia_handles::Process
source · pub struct Process(/* private fields */);
Expand description
An object representing a Zircon process.
As essentially a subtype of Handle
, it can be freely interconverted.
Implementations§
source§impl Process
impl Process
sourcepub fn start(
&self,
thread: &Thread,
entry: usize,
stack: usize,
arg1: Handle,
arg2: usize,
) -> Result<(), Status>
pub fn start( &self, thread: &Thread, entry: usize, stack: usize, arg1: Handle, 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 exit(retcode: i64) -> !
pub fn exit(retcode: i64) -> !
Exit the current process with the given return code.
Wraps the zx_process_exit syscall.
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.
Trait Implementations§
source§impl AsHandleRef for Process
impl AsHandleRef for Process
source§fn as_handle_ref(&self) -> Unowned<'_, Handle>
fn as_handle_ref(&self) -> Unowned<'_, Handle>
object_wait_many
.source§fn raw_handle(&self) -> u32
fn raw_handle(&self) -> u32
source§fn signal_handle(
&self,
clear_mask: Signals,
set_mask: Signals,
) -> Result<(), Status>
fn signal_handle( &self, clear_mask: Signals, set_mask: Signals, ) -> Result<(), Status>
source§fn wait_handle(
&self,
signals: Signals,
deadline: Instant<MonotonicTimeline>,
) -> Result<Signals, Status>
fn wait_handle( &self, signals: Signals, deadline: Instant<MonotonicTimeline>, ) -> Result<Signals, Status>
source§fn wait_async_handle(
&self,
port: &Port,
key: u64,
signals: Signals,
options: WaitAsyncOpts,
) -> Result<(), Status>
fn wait_async_handle( &self, port: &Port, key: u64, signals: Signals, options: WaitAsyncOpts, ) -> Result<(), Status>
source§fn get_name(&self) -> Result<Name, Status>
fn get_name(&self) -> Result<Name, Status>
source§fn set_name(&self, name: &Name) -> Result<(), Status>
fn set_name(&self, name: &Name) -> Result<(), Status>
source§fn basic_info(&self) -> Result<HandleBasicInfo, Status>
fn basic_info(&self) -> Result<HandleBasicInfo, Status>
source§fn count_info(&self) -> Result<HandleCountInfo, Status>
fn count_info(&self) -> Result<HandleCountInfo, Status>
source§impl HandleBased for Process
impl HandleBased for Process
source§fn duplicate_handle(&self, rights: Rights) -> Result<Self, Status>
fn duplicate_handle(&self, rights: Rights) -> Result<Self, Status>
source§fn replace_handle(self, rights: Rights) -> Result<Self, Status>
fn replace_handle(self, rights: Rights) -> Result<Self, Status>
source§fn into_handle(self) -> Handle
fn into_handle(self) -> Handle
source§fn from_handle(handle: Handle) -> Self
fn from_handle(handle: Handle) -> Self
source§fn into_handle_based<H>(self) -> Hwhere
H: HandleBased,
fn into_handle_based<H>(self) -> Hwhere
H: HandleBased,
source§fn from_handle_based<H>(h: H) -> Selfwhere
H: HandleBased,
fn from_handle_based<H>(h: H) -> Selfwhere
H: HandleBased,
fn is_invalid_handle(&self) -> bool
source§impl Ord for Process
impl Ord for Process
source§impl PartialEq for Process
impl PartialEq for Process
source§impl PartialOrd for Process
impl PartialOrd for Process
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read more