pub trait Assignable<T: ValueType> {
// Required method
fn into_value(self) -> Result<PropertyValue, DbError>;
}Expand description
A Rust value that may be assigned to a property of value type T.
This is the compile-time gate behind the typed write surface: a value
implements Assignable<T> only for the T it can legally inhabit, so a
type-mismatched assignment fails to compile.
§Performance
Assignable::into_value is O(1) except for text (O(value length)).
Required Methods§
Sourcefn into_value(self) -> Result<PropertyValue, DbError>
fn into_value(self) -> Result<PropertyValue, DbError>
Converts into a PropertyValue, checking range where narrowing.
§Errors
Returns DbError::ValueOutOfRange when an unsigned value exceeds
i64::MAX.
§Performance
This function is O(1) except for text (O(value length)).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".