pub struct Query(/* private fields */);Expand description
A percent-encoded query string.
Kept here rather than in each endpoint module so every request encodes the
same way, and so Option parameters can be dropped without an if at each
call site.
Implementations§
Source§impl Query
impl Query
pub fn new() -> Self
pub fn push(&mut self, key: &str, value: impl ToString) -> &mut Self
Sourcepub fn push_opt<T: ToString>(
&mut self,
key: &str,
value: Option<T>,
) -> &mut Self
pub fn push_opt<T: ToString>( &mut self, key: &str, value: Option<T>, ) -> &mut Self
Append only when the value is present, so unset filters never reach the server as empty strings (which GitFox treats as a real filter).
pub fn extend<T: ToString>( &mut self, key: &str, values: impl IntoIterator<Item = T>, ) -> &mut Self
pub fn is_empty(&self) -> bool
pub fn encode(&self) -> String
Trait Implementations§
Auto Trait Implementations§
impl Freeze 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