Struct shadow_rs::host::context::ThreadContextObjs
source · pub struct ThreadContextObjs<'a> { /* private fields */ }
Expand description
Shadow’s C code doesn’t know about contexts. In places where C code calls Rust code, we can build them from C pointers.
Implementations§
source§impl<'a> ThreadContextObjs<'a>
impl<'a> ThreadContextObjs<'a>
pub fn from_thread(host: &'a Host, thread: &'a Thread) -> Self
pub fn with_ctx<F, R>(&mut self, f: F) -> Rwhere
F: FnOnce(&mut ThreadContext<'_>) -> R,
Auto Trait Implementations§
impl<'a> Freeze for ThreadContextObjs<'a>
impl<'a> !RefUnwindSafe for ThreadContextObjs<'a>
impl<'a> !Send for ThreadContextObjs<'a>
impl<'a> !Sync for ThreadContextObjs<'a>
impl<'a> Unpin for ThreadContextObjs<'a>
impl<'a> !UnwindSafe for ThreadContextObjs<'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