zino_orm

Function decode_optional

Source
pub fn decode_optional<'r, T>(
    row: &'r DatabaseRow,
    field: &str,
) -> Result<Option<T>, Error>
where T: Decode<'r, DatabaseDriver>,
Available on crate feature orm-sqlx only.
Expand description

Decodes a single value as T for the field in a row, returning None if it was not found.