pub struct LinuxOs { /* private fields */ }
Implementations§
Trait Implementations§
Source§impl Os for LinuxOs
impl Os for LinuxOs
Source§fn process_address_list_callback(
&mut self,
callback: AddressCallback<'_>,
) -> Result<()>
fn process_address_list_callback( &mut self, callback: AddressCallback<'_>, ) -> Result<()>
Walks a process list and calls a callback for each process structure address
The callback is fully opaque. We need this style so that C FFI can work seamlessly.
Source§fn process_info_by_address(&mut self, address: Address) -> Result<ProcessInfo>
fn process_info_by_address(&mut self, address: Address) -> Result<ProcessInfo>
Find process information by its internal address
Source§fn process_by_info(
&mut self,
info: ProcessInfo,
) -> Result<Self::ProcessType<'_>>
fn process_by_info( &mut self, info: ProcessInfo, ) -> Result<Self::ProcessType<'_>>
Construct a process by its info, borrowing the OS
It will share the underlying memory resources
Source§fn into_process_by_info(
self,
info: ProcessInfo,
) -> Result<Self::IntoProcessType>
fn into_process_by_info( self, info: ProcessInfo, ) -> Result<Self::IntoProcessType>
Construct a process by its info, consuming the OS
This function will consume the Kernel instance and move its resources into the process
Source§fn module_address_list_callback(
&mut self,
callback: AddressCallback<'_>,
) -> Result<()>
fn module_address_list_callback( &mut self, callback: AddressCallback<'_>, ) -> Result<()>
Walks the OS module list and calls the provided callback for each module structure address
§Arguments
callback
- where to pass each matching module to. This is an opaque callback.
Source§fn module_by_address(&mut self, address: Address) -> Result<ModuleInfo>
fn module_by_address(&mut self, address: Address) -> Result<ModuleInfo>
Retrieves a module by its structure address
§Arguments
address
- address where module’s information resides in
Source§fn primary_module_address(&mut self) -> Result<Address>
fn primary_module_address(&mut self) -> Result<Address>
Retrieves address of the primary module structure of the process
This will generally be for the initial executable that was run
Source§fn module_import_list_callback(
&mut self,
_info: &ModuleInfo,
_callback: ImportCallback<'_>,
) -> Result<()>
fn module_import_list_callback( &mut self, _info: &ModuleInfo, _callback: ImportCallback<'_>, ) -> Result<()>
Retrieves a list of all imports of a given module
Source§fn module_export_list_callback(
&mut self,
_info: &ModuleInfo,
_callback: ExportCallback<'_>,
) -> Result<()>
fn module_export_list_callback( &mut self, _info: &ModuleInfo, _callback: ExportCallback<'_>, ) -> Result<()>
Retrieves a list of all exports of a given module
Source§fn module_section_list_callback(
&mut self,
_info: &ModuleInfo,
_callback: SectionCallback<'_>,
) -> Result<()>
fn module_section_list_callback( &mut self, _info: &ModuleInfo, _callback: SectionCallback<'_>, ) -> Result<()>
Retrieves a list of all sections of a given module
type ProcessType<'a> = LinuxProcess
type IntoProcessType = LinuxProcess
Source§fn process_info_by_pid(&mut self, pid: Pid) -> Result<ProcessInfo>
fn process_info_by_pid(&mut self, pid: Pid) -> Result<ProcessInfo>
Source§fn process_address_list(&mut self) -> Result<Vec<Address>, Error>
fn process_address_list(&mut self) -> Result<Vec<Address>, Error>
Source§fn process_info_list_callback(
&mut self,
callback: OpaqueCallback<'_, ProcessInfo>,
) -> Result<(), Error>
fn process_info_list_callback( &mut self, callback: OpaqueCallback<'_, ProcessInfo>, ) -> Result<(), Error>
Source§fn process_info_list(&mut self) -> Result<Vec<ProcessInfo>, Error>
fn process_info_list(&mut self) -> Result<Vec<ProcessInfo>, Error>
Source§fn process_info_by_name(&mut self, name: &str) -> Result<ProcessInfo, Error>
fn process_info_by_name(&mut self, name: &str) -> Result<ProcessInfo, Error>
Source§fn process_by_address(
&mut self,
addr: Address,
) -> Result<Self::ProcessType<'_>, Error>
fn process_by_address( &mut self, addr: Address, ) -> Result<Self::ProcessType<'_>, Error>
Source§fn process_by_name(
&mut self,
name: &str,
) -> Result<Self::ProcessType<'_>, Error>
fn process_by_name( &mut self, name: &str, ) -> Result<Self::ProcessType<'_>, Error>
Source§fn process_by_pid(&mut self, pid: u32) -> Result<Self::ProcessType<'_>, Error>
fn process_by_pid(&mut self, pid: u32) -> Result<Self::ProcessType<'_>, Error>
Source§fn into_process_by_address(
self,
addr: Address,
) -> Result<Self::IntoProcessType, Error>where
Self: Sized,
fn into_process_by_address(
self,
addr: Address,
) -> Result<Self::IntoProcessType, Error>where
Self: Sized,
Source§fn into_process_by_name(
self,
name: &str,
) -> Result<Self::IntoProcessType, Error>where
Self: Sized,
fn into_process_by_name(
self,
name: &str,
) -> Result<Self::IntoProcessType, Error>where
Self: Sized,
Source§fn into_process_by_pid(self, pid: u32) -> Result<Self::IntoProcessType, Error>where
Self: Sized,
fn into_process_by_pid(self, pid: u32) -> Result<Self::IntoProcessType, Error>where
Self: Sized,
Source§fn module_list_callback(
&mut self,
callback: OpaqueCallback<'_, ModuleInfo>,
) -> Result<(), Error>
fn module_list_callback( &mut self, callback: OpaqueCallback<'_, ModuleInfo>, ) -> Result<(), Error>
Source§fn module_by_name(&mut self, name: &str) -> Result<ModuleInfo, Error>
fn module_by_name(&mut self, name: &str) -> Result<ModuleInfo, Error>
Source§fn module_list(&mut self) -> Result<Vec<ModuleInfo>, Error>
fn module_list(&mut self) -> Result<Vec<ModuleInfo>, Error>
Source§fn primary_module(&mut self) -> Result<ModuleInfo, Error>
fn primary_module(&mut self) -> Result<ModuleInfo, Error>
Source§fn module_import_list(
&mut self,
info: &ModuleInfo,
) -> Result<Vec<ImportInfo>, Error>
fn module_import_list( &mut self, info: &ModuleInfo, ) -> Result<Vec<ImportInfo>, Error>
Source§fn module_export_list(
&mut self,
info: &ModuleInfo,
) -> Result<Vec<ExportInfo>, Error>
fn module_export_list( &mut self, info: &ModuleInfo, ) -> Result<Vec<ExportInfo>, Error>
Source§fn module_section_list(
&mut self,
info: &ModuleInfo,
) -> Result<Vec<SectionInfo>, Error>
fn module_section_list( &mut self, info: &ModuleInfo, ) -> Result<Vec<SectionInfo>, Error>
Source§fn module_import_by_name(
&mut self,
info: &ModuleInfo,
name: &str,
) -> Result<ImportInfo, Error>
fn module_import_by_name( &mut self, info: &ModuleInfo, name: &str, ) -> Result<ImportInfo, Error>
Source§fn module_export_by_name(
&mut self,
info: &ModuleInfo,
name: &str,
) -> Result<ExportInfo, Error>
fn module_export_by_name( &mut self, info: &ModuleInfo, name: &str, ) -> Result<ExportInfo, Error>
Source§fn module_section_by_name(
&mut self,
info: &ModuleInfo,
name: &str,
) -> Result<SectionInfo, Error>
fn module_section_by_name( &mut self, info: &ModuleInfo, name: &str, ) -> Result<SectionInfo, Error>
Source§impl<'cglue_a, CGlueInst: Deref<Target = NativeOs>, CGlueCtx: ContextBounds> OsInstanceVtableFiller<'cglue_a, CGlueInst, CGlueCtx> for NativeOs
impl<'cglue_a, CGlueInst: Deref<Target = NativeOs>, CGlueCtx: ContextBounds> OsInstanceVtableFiller<'cglue_a, CGlueInst, CGlueCtx> for NativeOs
fn fill_table( table: OsInstanceVtables<'cglue_a, CGlueInst, CGlueCtx>, ) -> OsInstanceVtables<'cglue_a, CGlueInst, CGlueCtx>
Auto Trait Implementations§
impl Freeze for LinuxOs
impl RefUnwindSafe for LinuxOs
impl Send for LinuxOs
impl Sync for LinuxOs
impl Unpin for LinuxOs
impl UnwindSafe for LinuxOs
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<'a, T> BorrowOwned<'a> for Twhere
T: 'a + Clone,
impl<'a, T> BorrowOwned<'a> for Twhere
T: 'a + Clone,
fn r_borrow( this: &'a <T as BorrowOwned<'a>>::ROwned, ) -> <T as BorrowOwned<'a>>::RBorrowed
fn r_to_owned( this: <T as BorrowOwned<'a>>::RBorrowed, ) -> <T as BorrowOwned<'a>>::ROwned
fn deref_borrowed(this: &<T as BorrowOwned<'a>>::RBorrowed) -> &T
fn deref_owned(this: &<T as BorrowOwned<'a>>::ROwned) -> &T
fn from_cow_borrow(this: &'a T) -> <T as BorrowOwned<'a>>::RBorrowed
fn from_cow_owned(this: <T as ToOwned>::Owned) -> <T as BorrowOwned<'a>>::ROwned
fn into_cow_borrow(this: <T as BorrowOwned<'a>>::RBorrowed) -> &'a T
fn into_cow_owned(this: <T as BorrowOwned<'a>>::ROwned) -> <T as ToOwned>::Owned
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> GetWithMetadata for T
impl<T> GetWithMetadata for T
Source§type ForSelf = WithMetadata_<T, T>
type ForSelf = WithMetadata_<T, T>
WithMetadata_<Self, 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 moreSource§impl<S> ROExtAcc for S
impl<S> ROExtAcc for S
Source§fn f_get<F>(&self, offset: FieldOffset<S, F, Aligned>) -> &F
fn f_get<F>(&self, offset: FieldOffset<S, F, Aligned>) -> &F
offset
. Read moreSource§fn f_get_mut<F>(&mut self, offset: FieldOffset<S, F, Aligned>) -> &mut F
fn f_get_mut<F>(&mut self, offset: FieldOffset<S, F, Aligned>) -> &mut F
offset
. Read moreSource§fn f_get_ptr<F, A>(&self, offset: FieldOffset<S, F, A>) -> *const F
fn f_get_ptr<F, A>(&self, offset: FieldOffset<S, F, A>) -> *const F
offset
. Read moreSource§fn f_get_mut_ptr<F, A>(&mut self, offset: FieldOffset<S, F, A>) -> *mut F
fn f_get_mut_ptr<F, A>(&mut self, offset: FieldOffset<S, F, A>) -> *mut F
offset
. Read moreSource§impl<S> ROExtOps<Aligned> for S
impl<S> ROExtOps<Aligned> for S
Source§fn f_replace<F>(&mut self, offset: FieldOffset<S, F, Aligned>, value: F) -> F
fn f_replace<F>(&mut self, offset: FieldOffset<S, F, Aligned>, value: F) -> F
offset
) with value
,
returning the previous value of the field. Read moreSource§fn f_get_copy<F>(&self, offset: FieldOffset<S, F, Aligned>) -> Fwhere
F: Copy,
fn f_get_copy<F>(&self, offset: FieldOffset<S, F, Aligned>) -> Fwhere
F: Copy,
Source§impl<S> ROExtOps<Unaligned> for S
impl<S> ROExtOps<Unaligned> for S
Source§fn f_replace<F>(&mut self, offset: FieldOffset<S, F, Unaligned>, value: F) -> F
fn f_replace<F>(&mut self, offset: FieldOffset<S, F, Unaligned>, value: F) -> F
offset
) with value
,
returning the previous value of the field. Read moreSource§fn f_get_copy<F>(&self, offset: FieldOffset<S, F, Unaligned>) -> Fwhere
F: Copy,
fn f_get_copy<F>(&self, offset: FieldOffset<S, F, Unaligned>) -> Fwhere
F: Copy,
Source§impl<T> SelfOps for Twhere
T: ?Sized,
impl<T> SelfOps for Twhere
T: ?Sized,
Source§fn piped<F, U>(self, f: F) -> U
fn piped<F, U>(self, f: F) -> U
Source§fn piped_ref<'a, F, U>(&'a self, f: F) -> Uwhere
F: FnOnce(&'a Self) -> U,
fn piped_ref<'a, F, U>(&'a self, f: F) -> Uwhere
F: FnOnce(&'a Self) -> U,
piped
except that the function takes &Self
Useful for functions that take &Self
instead of Self
. Read moreSource§fn piped_mut<'a, F, U>(&'a mut self, f: F) -> Uwhere
F: FnOnce(&'a mut Self) -> U,
fn piped_mut<'a, F, U>(&'a mut self, f: F) -> Uwhere
F: FnOnce(&'a mut Self) -> U,
piped
, except that the function takes &mut Self
.
Useful for functions that take &mut Self
instead of Self
.Source§fn mutated<F>(self, f: F) -> Self
fn mutated<F>(self, f: F) -> Self
Source§fn observe<F>(self, f: F) -> Self
fn observe<F>(self, f: F) -> Self
Source§fn as_ref_<T>(&self) -> &T
fn as_ref_<T>(&self) -> &T
AsRef
,
using the turbofish .as_ref_::<_>()
syntax. Read more