Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement std::convert::TryFrom<aerospike::Value> for each variant #124

Closed
austinjones opened this issue Jun 20, 2022 · 1 comment
Closed

Comments

@austinjones
Copy link

If the aerospike client implemented TryFrom, it would be much easier to unpack Values. It would be much easier to write this:

let field: i64 = value.try_into()?

Rather than this:

let field: i64 = match value {
  Value::Int(v) => Ok(v),
  _ => Err(CustomError::InvalidType)
 }?;
@khaf
Copy link
Collaborator

khaf commented May 1, 2023

Released in v1.3.0.

@khaf khaf closed this as completed May 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants