The SampleBuilder::put and SampleBuilder::delete accepts IntoKeyexpr which is inconvenient as it can't accept the &str. E.g. this code is not possible:
let sample = SampleBuilder::put("foo/bar", "payload").into();
and instead user should write
let sample = SampleBuilder::put(KeyExpr::try_from("foo/bar").unwrap(), "payload").into();
There are already multiple SampleBuilder constructors which panics if parameter is wrong. It makes sense to make the put and delete constructors behave the same way: accept TryIntoKeyexpr and panic if keyexpr is incorrect.
The change is not breaking: it just extends possible variants of parameter types, existing code should not be affected
The
SampleBuilder::putandSampleBuilder::deleteacceptsIntoKeyexprwhich is inconvenient as it can't accept the&str. E.g. this code is not possible:and instead user should write
There are already multiple
SampleBuilderconstructors which panics if parameter is wrong. It makes sense to make theputanddeleteconstructors behave the same way: acceptTryIntoKeyexprand panic if keyexpr is incorrect.The change is not breaking: it just extends possible variants of parameter types, existing code should not be affected