# Trait Offset

    pub trait Offset: Copy {
        // Required method
        fn to_usize(self) -> usize;

        // Provided method
        fn non_null(self) -> Option<usize> { ... }
    }

Expand description

Any offset type.

## Required Methods§

#### fn to_usize(self) -> usize

## Provided Methods§

#### fn non_null(self) -> Option<usize>

## 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.

## Implementors§

§

### impl Offset for Offset16

§

### impl Offset for Offset24

§

### impl Offset for Offset32