Skip to main content

InvariantsEq

Trait InvariantsEq 

Source
pub unsafe trait InvariantsEq<T: ?Sized> { }
Expand description

Denotes that two types have the same invariants.

§Safety

It is sound for safe code to operate on a &T and a &Self pointing to the same referent at the same time - no such safe code can cause undefined behavior.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§