pub trait Comparable<Other: SqlType>: SqlType { }Expand description
Which SQL types may be compared with each other. A nullable column and a
non-nullable one hold the same values, so users::manager_id.eq(users::id)
is an ordinary join predicate; without this relation the two would be
unrelated types and every optional foreign key would be unwritable.
Option still isn’t an expression, so .eq(None) remains unwritable:
x = NULL is never true, and .is_null() is the question that was meant.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".