pub unsafe trait Zeroable {
fn zeroed() -> Self { ... }
}
Expand description
Trait for types that can be safely created with
zeroed
.
An all-zeroes value may or may not be the same value as the
Default value of the type.
- Your type must be inhabited (eg: no
Infallible).
- Your type must be allowed to be an “all zeroes” bit pattern (eg: no
NonNull<T>
).
Calls zeroed
.
This is a trait method so that you can write MyType::zeroed()
in your
code. It is a contract of this trait that if you implement it on your type
you must not override this method.
impl Zeroable for bevy::render::render_resource::std140::Mat2
impl Zeroable for bevy::render::render_resource::std140::Mat3
impl Zeroable for bevy::render::render_resource::std140::Mat4
impl Zeroable for bevy::render::render_resource::std140::Vec2
impl Zeroable for bevy::render::render_resource::std140::Vec3
impl Zeroable for bevy::render::render_resource::std140::Vec4
impl Zeroable for bevy::render::render_resource::std430::Mat2
impl Zeroable for bevy::render::render_resource::std430::Mat3
impl Zeroable for bevy::render::render_resource::std430::Mat4
impl Zeroable for bevy::render::render_resource::std430::Vec2
impl Zeroable for bevy::render::render_resource::std430::Vec3
impl Zeroable for bevy::render::render_resource::std430::Vec4