Skip to main content

Decrement

Trait Decrement 

Source
pub trait Decrement {
    type Output;

    // Required method
    unsafe fn dec(&self) -> Self::Output;
}
Expand description

Represents C++’s prefix decrement (--a).

Required Associated Types§

Source

type Output

Output type.

Required Methods§

Source

unsafe fn dec(&self) -> Self::Output

Decrement self.

§Safety

The caller must make sure self contains a valid pointer. This function may invoke arbitrary foreign code, so no safety guarantees can be made.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§