Trait mesh::payload::transparent::Transparent

source ·
pub unsafe trait Transparent {
    type Inner;

    const OFFSET: usize;
}
Expand description

A type that can be encoded as a transparent wrapper around an inner type.

§Safety

The caller must ensure that there is only one non-zero-sized field in the struct, at the provided offset, and that constructing the struct by writing just that field is safe.

Required Associated Types§

source

type Inner

The inner type.

Required Associated Constants§

source

const OFFSET: usize

The offset of the inner type. This should almost always be zero unless Rust decides to add some padding at the beginning in some debug mode.

Object Safety§

This trait is not object safe.

Implementors§