Text of rust.docs.kernel.org › pin_init › fn.zeroed.html as Styx crawled it on Nov 19, 2026. The page may have changed since. Only its words are kept, without pictures or layout.

Open the live page

zeroed in pin_init - Rust

Skip to main content zeroed pin_init Function zeroed Source pub const fn zeroed<T: Zeroable >() -> T Expand description Create a T consisting of all zeroes. Whenever a type implements Zeroable , this function should be preferred over core::mem::zeroed() or using MaybeUninit<T>::zeroed().assume_init() . While const traits remain unstable, this function serves as the const version of Zeroable::zeroed() . § Examples use pin_init::{Zeroable, zeroed}; #[derive(Zeroable)] struct Point { x: u32, y: u32, } let point: Point = zeroed(); assert_eq! (point.x, 0 ); assert_eq! (point.y, 0 );