add search function with more parameters#69
Conversation
|
|
||
| pub async fn search<S: Into<String>>( | ||
| &mut self, | ||
| basedn: S, |
There was a problem hiding this comment.
You could use the same impl Into<String> here, we don't otherwise use S
There was a problem hiding this comment.
Yes we could do that but that would technically be a breaking change. And I don't now what the policy around that for this project is.
There was a problem hiding this comment.
Would it really be a breaking change? What code would stop compiling? AFAIU this is equivalent syntactic sugar
There was a problem hiding this comment.
Code that uses that explicitly uses that generic parameter like search::<String> would stop to compile
There was a problem hiding this comment.
Fair enough. That's a bit of an edge case, but it is indeed a breaking change
Firstyear
left a comment
There was a problem hiding this comment.
I think this could get messy pretty fast if we keep adding parameters. I think perhaps we could consider a search builder pattern?
yes I was thinking the same thing! in the latest commit the implementation is changed to the a builder pattern. |
expose the
scopeandattrsparameter for search insearch_withfunction