Skip to main content

UnwrapZero

Trait UnwrapZero 

Source
pub trait UnwrapZero {
    type Output: Zero;

    // Required method
    fn unwrap_or_zero(self) -> Self::Output;
}

Required Associated Types§

Required Methods§

Source

fn unwrap_or_zero(self) -> Self::Output

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T, E> UnwrapZero for Result<T, E>
where T: Zero,

Source§

impl<T> UnwrapZero for Option<T>
where T: Zero,

Implementors§