devela::_dep::bytemuck

Trait PodInOption

pub unsafe trait PodInOption:
    ZeroableInOption
    + Copy
    + 'static { }
Available on crate feature dep_bytemuck only.
Expand description

Trait for types which are Pod when wrapped in Option.

§Safety

  • Option<T> must uphold the same invariants as Pod.
  • Reminder: pointers are not pod! Do not mix this trait with a newtype over NonNull.

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 PodInOption for NonZero<i8>

§

impl PodInOption for NonZero<i16>

§

impl PodInOption for NonZero<i32>

§

impl PodInOption for NonZero<i64>

§

impl PodInOption for NonZero<i128>

§

impl PodInOption for NonZero<isize>

§

impl PodInOption for NonZero<u8>

§

impl PodInOption for NonZero<u16>

§

impl PodInOption for NonZero<u32>

§

impl PodInOption for NonZero<u64>

§

impl PodInOption for NonZero<u128>

§

impl PodInOption for NonZero<usize>

Source§

impl<const V: i8> PodInOption for devela::_info::examples::niche::NonValueI8<V>

Available on doc only.
Source§

impl<const V: i8> PodInOption for devela::all::NonValueI8<V>

Source§

impl<const V: u8> PodInOption for NonValueU8<V>

Source§

impl<const V: u16> PodInOption for NonValueU16<V>