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

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.

Creates a new relative pointer that has an offset of 0.

Checks whether the relative pointer is null.

Gets the base pointer for the relative pointer.

Gets the offset of the relative pointer.

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

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

The archived version of the pointer metadata for this type.

Converts some archived metadata to the pointer metadata for itself.

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type for metadata in pointers and references to Self.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.