Skip to main content

checked_cast

Function checked_cast 

Source
fn checked_cast<T, U>(
    data: Option<T>,
    convert: impl Fn(&T) -> Option<U>,
) -> PgWireResult<Option<U>>
where T: Display,
Expand description

Converts a numeric value, rejecting one the target type cannot hold.