Skip to main content

PokePointer

Struct PokePointer 

Source
pub struct PokePointer<'mem, 'facet> { /* private fields */ }
Expand description

Poke-side wrapper over a pointer value, for symmetry with PeekPointer.

The current PointerVTable exposes no mutating operations on the pointee, so this type is effectively read-only: it offers borrow_inner (returning a Peek) plus conversions back to Poke / PeekPointer. Mutating methods will be added once the core vtable grows the corresponding hooks.

Implementations§

Source§

impl<'mem, 'facet> PokePointer<'mem, 'facet>

Source

pub const fn def(&self) -> &PointerDef

Returns a reference to the pointer definition.

Source

pub fn borrow_inner(&self) -> Option<Peek<'_, 'facet>>

Borrows the inner value of the pointer as a read-only Peek.

Returns None if the pointer doesn’t have a borrow function or pointee shape.

Source

pub const fn into_inner(self) -> Poke<'mem, 'facet>

Converts this back into the underlying Poke.

Source

pub fn as_peek_pointer(&self) -> PeekPointer<'_, 'facet>

Returns a read-only PeekPointer view.

Trait Implementations§

Source§

impl<'mem, 'facet> Debug for PokePointer<'mem, 'facet>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'mem, 'facet> Freeze for PokePointer<'mem, 'facet>

§

impl<'mem, 'facet> RefUnwindSafe for PokePointer<'mem, 'facet>

§

impl<'mem, 'facet> !Send for PokePointer<'mem, 'facet>

§

impl<'mem, 'facet> !Sync for PokePointer<'mem, 'facet>

§

impl<'mem, 'facet> Unpin for PokePointer<'mem, 'facet>

§

impl<'mem, 'facet> UnsafeUnpin for PokePointer<'mem, 'facet>

§

impl<'mem, 'facet> !UnwindSafe for PokePointer<'mem, 'facet>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.