Skip to content

CqlValue conversion methods - retain Self in Result::Err() upon conversion failure #1441

@wprzytula

Description

@wprzytula

Problem

Some CqlValue conversions consume Self upon error, hindering further interaction with such CqlValue.

For example, conversion method into_vec(self) returns Option<Vec<CqlValue>>, returning None in case of conversion failure, but consuming self.

Suggested solution

Return Result<EndType, Self>, this way preserving self in case of conversion failure. This is API-breaking.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions