Struct rkyv::RawRelPtr [−][src]
#[repr(transparent)]pub struct RawRelPtr { /* fields omitted */ }
Expand description
An untyped pointer which resolves relative to its position in memory.
Implementations
pub unsafe fn manual_check_bytes<'a, C: Fallible + ?Sized>(
value: *const RawRelPtr,
context: &mut C
) -> Result<&'a Self, Unreachable>
[src]
pub unsafe fn manual_check_bytes<'a, C: Fallible + ?Sized>(
value: *const RawRelPtr,
context: &mut C
) -> Result<&'a Self, Unreachable>
[src]Checks the bytes of the given raw relative pointer.
This is done rather than implementing CheckBytes
to force users to manually write their
CheckBytes
implementation since they need to also provide the ownership model of their
memory.
Safety
The caller must guarantee that the given pointer is aligned and points to enough bytes to
represent a RawRelPtr
.
Emplaces a new relative pointer between the given positions and stores it in the given output.
Calculates the memory address being pointed to by this relative pointer.
Returns an unsafe mutable pointer to the memory address being pointed to by this relative pointer.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for RawRelPtr
impl UnwindSafe for RawRelPtr
Blanket Implementations
type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Converts some archived metadata to the pointer metadata for itself.
Mutably borrows from an owned value. Read more