workers-rs
workers-rs copied to clipboard
BREAKING: Implement more of the R2 API
This PR adds two missing parts of the R2 API:
- An (accidentally) undocmented
startAfteroption in R2's list objects call - R2 PutObject Conditional Support.
- This is a BREAKING change. When a provided conditional to an R2 PutObject fails, the resultant Object could be
null, orNonein Rust. The returned object from a PUT is not aOption<Object>.
- This is a BREAKING change. When a provided conditional to an R2 PutObject fails, the resultant Object could be
This API is successfully being used to implement a compare-and-swap (CAS) primitive for an internal project. We ended up not needing the list changes, but I thought it'd be useful nonetheless.
Tasks:
- [ ] clean up workers-rs tests