check_same

Function check_same 

Source
pub fn check_same<'f, T: Facet<'f>>(left: &T, right: &T) -> Sameness
Expand description

Check if two Facet values are structurally the same.

This does NOT require PartialEq - it walks the structure via reflection. Both values must have the same type, which enables type inference to flow between arguments.

ยงExample

use facet_assert::check_same;

let x: Option<Option<i32>> = Some(None);
check_same(&x, &Some(None)); // Type of Some(None) inferred from x

For comparing values of different types, use check_sameish.