rkyv::rel_ptr

Trait Offset

Source
pub trait Offset: Copy + NoUndef {
    // Required methods
    fn from_isize<E: Source>(value: isize) -> Result<Self, E>;
    fn to_isize(self) -> isize;
}
Expand description

A offset that can be used with RawRelPtr.

Required Methods§

Source

fn from_isize<E: Source>(value: isize) -> Result<Self, E>

Creates a new offset between a from position and a to position.

Source

fn to_isize(self) -> isize

Gets the offset as an isize.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl Offset for i8

Source§

fn from_isize<E: Source>(value: isize) -> Result<Self, E>

Source§

fn to_isize(self) -> isize

Source§

impl Offset for u8

Source§

fn from_isize<E: Source>(value: isize) -> Result<Self, E>

Source§

fn to_isize(self) -> isize

Implementors§