pub trait ToFilterValue {
// Required method
fn to_filter_value(&self) -> FilterValue;
}Expand description
Reverse of crate::row::FromColumn: convert an in-memory value to
a FilterValue suitable for parameter binding.
Used by the relation executor and crate::traits::ModelWithPk to
project a fetched row’s primary/foreign key into a placeholder value
without going through the From<T> path (which consumes the value).
§Intentional omissions
u64 is omitted by design: From<u64> panics on overflow, but
to_filter_value(&self) takes a borrow and cannot recover or fail
gracefully without hidden clamping. Callers with u64 primary keys
should cast explicitly ((self.id as i64).to_filter_value()) or
use FilterValue::String(self.id.to_string()) when full range
preservation matters.
Required Methods§
Sourcefn to_filter_value(&self) -> FilterValue
fn to_filter_value(&self) -> FilterValue
Convert this value to a FilterValue by borrowing.