pub trait OptionalQueryElement: Sized {
// Required method
fn optional_from_view(
view: &ViewValue,
) -> Result<Option<Self>, ZeroValueError>;
}Expand description
What an Option query value holds: the row of one(), or the value of
sum, avg, min or max, which is None over no rows. Generated
rows implement it with optional_row, generated enumerations with
optional_value.
Required Methods§
Sourcefn optional_from_view(view: &ViewValue) -> Result<Option<Self>, ZeroValueError>
fn optional_from_view(view: &ViewValue) -> Result<Option<Self>, ZeroValueError>
Reads the query’s result from its view: None for no row, or for an
aggregate over no rows.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".