pub struct In<P, R: Region> { /* private fields */ }
Expand description
A pointer which has its pointee in a specific memory region.
Implementations
sourceimpl<P: Pointer, R: Region> In<P, R>where
P::Target: Pointee,
impl<P: Pointer, R: Region> In<P, R>where
P::Target: Pointee,
sourcepub unsafe fn new_unchecked(ptr: P) -> Self
pub unsafe fn new_unchecked(ptr: P) -> Self
sourcepub fn map<F, Q>(self, f: F) -> In<Q, R>where
F: FnOnce(P) -> Q,
Q: Pointer + Within<R>,
Q::Target: Pointee,
pub fn map<F, Q>(self, f: F) -> In<Q, R>where
F: FnOnce(P) -> Q,
Q: Pointer + Within<R>,
Q::Target: Pointee,
Maps this In
to another pointer in its region.
sourceimpl<P, R: Region> In<P, R>
impl<P, R: Region> In<P, R>
sourcepub fn into_inner(this: Self) -> P
pub fn into_inner(this: Self) -> P
Unwraps an In
, returning the underlying pointer.
Trait Implementations
sourceimpl<P: Destructure, R: Region> Destructure for In<P, R>
impl<P: Destructure, R: Region> Destructure for In<P, R>
type Underlying = <P as Destructure>::Underlying
type Underlying = <P as Destructure>::Underlying
The underlying type that is destructured.
type Destructuring = <P as Destructure>::Destructuring
type Destructuring = <P as Destructure>::Destructuring
The type of destructuring to perform.
sourcefn underlying(&mut self) -> *mut Self::Underlying
fn underlying(&mut self) -> *mut Self::Underlying
Returns a mutable pointer to the underlying type.
sourceimpl<P, R: Region, U> Restructure<U> for In<P, R>where
P: RestructurablePointer + Restructure<U>,
<P as Restructure<U>>::Restructured: Pointer,
<<P as Restructure<U>>::Restructured as Pointer>::Target: Pointee,
impl<P, R: Region, U> Restructure<U> for In<P, R>where
P: RestructurablePointer + Restructure<U>,
<P as Restructure<U>>::Restructured: Pointer,
<<P as Restructure<U>>::Restructured as Pointer>::Target: Pointee,
type Restructured = In<<P as Restructure<U>>::Restructured, R>
type Restructured = In<<P as Restructure<U>>::Restructured, R>
The restructured version of this type.
sourceunsafe fn restructure(&self, ptr: *mut U) -> Self::Restructured
unsafe fn restructure(&self, ptr: *mut U) -> Self::Restructured
Restructures a pointer to this type into the target type. Read more
impl<P: Copy, R: Copy + Region> Copy for In<P, R>
Auto Trait Implementations
impl<P, R> RefUnwindSafe for In<P, R>where
P: RefUnwindSafe,
R: RefUnwindSafe,
impl<P, R> Send for In<P, R>where
P: Send,
R: Send,
impl<P, R> Sync for In<P, R>where
P: Sync,
R: Sync,
impl<P, R> Unpin for In<P, R>where
P: Unpin,
R: Unpin,
impl<P, R> UnwindSafe for In<P, R>where
P: UnwindSafe,
R: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more