pub struct Query(/* private fields */);Expand description
Query builder that keeps insertion order and supports repeated key[]=.
Implementations§
Source§impl Query
impl Query
pub fn new() -> Self
pub fn push(self, key: &str, value: impl ToString) -> Self
pub fn push_opt(self, key: &str, value: Option<impl ToString>) -> Self
pub fn push_if(self, key: &str, cond: bool) -> Self
Sourcepub fn push_all<I, T>(self, key: &str, values: I) -> Selfwhere
I: IntoIterator<Item = T>,
T: ToString,
pub fn push_all<I, T>(self, key: &str, values: I) -> Selfwhere
I: IntoIterator<Item = T>,
T: ToString,
key should include the [] suffix, e.g. statuses[].
pub fn extend(self, other: Query) -> Self
pub fn pairs(&self) -> &[(String, String)]
pub fn get(&self, key: &str) -> Option<&str>
Trait Implementations§
impl StructuralPartialEq for Query
Auto Trait Implementations§
impl Forget for Query
impl Freeze for Query
impl Move for Query
impl RefUnwindSafe for Query
impl Send for Query
impl Sync for Query
impl Unpin for Query
impl UnsafeUnpin for Query
impl UnwindSafe for Query
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more