pub struct ThreadContext<'a> {
pub host: &'a Host,
pub process: &'a Process,
pub thread: &'a Thread,
}
Fields§
§host: &'a Host
§process: &'a Process
§thread: &'a Thread
Implementations§
source§impl<'a> ThreadContext<'a>
impl<'a> ThreadContext<'a>
pub fn new(host: &'a Host, process: &'a Process, thread: &'a Thread) -> Self
sourcepub fn split_process(&self) -> (HostContext<'_>, &Process)
pub fn split_process(&self) -> (HostContext<'_>, &Process)
Split into a &Process
and a HostContext
. Useful e.g.
for calling Process
methods that take a &HostContext
.
sourcepub fn split_thread(&self) -> (ProcessContext<'_>, &Thread)
pub fn split_thread(&self) -> (ProcessContext<'_>, &Thread)
Split into a &Thread
and a ProcessContext
. Useful e.g.
for calling Thread
methods that take a &ProcessContext
.
pub fn mthread(&self) -> impl Deref<Target = ManagedThread> + '_
Auto Trait Implementations§
impl<'a> Freeze for ThreadContext<'a>
impl<'a> !RefUnwindSafe for ThreadContext<'a>
impl<'a> !Send for ThreadContext<'a>
impl<'a> !Sync for ThreadContext<'a>
impl<'a> Unpin for ThreadContext<'a>
impl<'a> !UnwindSafe for ThreadContext<'a>
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> 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>
Converts
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>
Converts
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