Zeroable

Trait Zeroable 

Source
pub unsafe trait Zeroable: Slice { }
Expand description

A slice that can be safely initialized from an all-zero byte-pattern.

§Safety

An item slice allocated with alloc_zeroed must be valid and safely interpretable as the slice type without undefined behavior.

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 Zeroable for str

Source§

impl Zeroable for BStr

Available on crate feature bstr only.
Source§

impl<T: Zeroable + Send + Sync + 'static> Zeroable for [T]

Available on crate feature bytemuck only.

Implementors§