pub struct QuerySetup<EP, BU, BR, PP, HV> {
client: Client,
phantom_ep: PhantomData<EP>,
url: BU,
request: BR,
path_params: PP,
auth_header: Option<HV>,
timeout: Option<Duration>,
quiet: bool,
}Expand description
Details for a query to be sent to a pubhubs server
Fields§
§client: Client§phantom_ep: PhantomData<EP>§url: BU§request: BR§path_params: PP§auth_header: Option<HV>§timeout: Option<Duration>§quiet: boolImplementations§
Source§impl<'pp, EP, BU, BR, PP, HV> QuerySetup<EP, BU, BR, PP, HV>where
EP: EndpointDetails + 'static,
BU: Borrow<Url>,
BR: Borrow<EP::RequestType>,
PP: Borrow<HashMap<&'static str, Cow<'pp, str>>>,
HV: Borrow<HeaderValue>,
impl<'pp, EP, BU, BR, PP, HV> QuerySetup<EP, BU, BR, PP, HV>where
EP: EndpointDetails + 'static,
BU: Borrow<Url>,
BR: Borrow<EP::RequestType>,
PP: Borrow<HashMap<&'static str, Cow<'pp, str>>>,
HV: Borrow<HeaderValue>,
fn borrow<'s>(
&'s self,
) -> QuerySetup<EP, &'s Url, &'s <EP as EndpointDetails>::RequestType, &'s HashMap<&'static str, Cow<'s, str>>, &'s HeaderValue>where
'pp: 's,
pub async fn with_retry(self) -> EP::ResponseType
Source§impl<EP, BU, BR, HV, PP> QuerySetup<EP, BU, BR, PP, HV>
impl<EP, BU, BR, HV, PP> QuerySetup<EP, BU, BR, PP, HV>
Source§impl<'a, EP, BU, BR, HV> QuerySetup<EP, BU, BR, HashMap<&'static str, Cow<'a, str>>, HV>
impl<'a, EP, BU, BR, HV> QuerySetup<EP, BU, BR, HashMap<&'static str, Cow<'a, str>>, HV>
Sourcepub fn path_param(
self,
name: &'static str,
value: impl Into<Cow<'a, str>>,
) -> Self
pub fn path_param( self, name: &'static str, value: impl Into<Cow<'a, str>>, ) -> Self
Sets path parameter name in EndpointDetails::PATH to value.
Source§impl<EP, BU, BR, PP> QuerySetup<EP, BU, BR, PP, HeaderValue>
impl<EP, BU, BR, PP> QuerySetup<EP, BU, BR, PP, HeaderValue>
Sourcepub fn auth_header(self, value: impl TryIntoHeaderValue) -> Self
pub fn auth_header(self, value: impl TryIntoHeaderValue) -> Self
Set Authorization header value.
Source§impl<EP: EndpointDetails + 'static> QuerySetup<EP, &'_ Url, &'_ <EP as EndpointDetails>::RequestType, &'_ HashMap<&'static str, Cow<'_, str>>, &'_ HeaderValue>
impl<EP: EndpointDetails + 'static> QuerySetup<EP, &'_ Url, &'_ <EP as EndpointDetails>::RequestType, &'_ HashMap<&'static str, Cow<'_, str>>, &'_ HeaderValue>
fn into_future_impl( self, ) -> impl Future<Output = EP::ResponseType> + 'static + use<EP>
Trait Implementations§
Source§impl<EP: EndpointDetails + 'static> Clone for QuerySetup<EP, &'_ Url, &'_ <EP as EndpointDetails>::RequestType, &'_ HashMap<&'static str, Cow<'_, str>>, &'_ HeaderValue>
impl<EP: EndpointDetails + 'static> Clone for QuerySetup<EP, &'_ Url, &'_ <EP as EndpointDetails>::RequestType, &'_ HashMap<&'static str, Cow<'_, str>>, &'_ HeaderValue>
Source§impl<'a, EP, BU, BR, PP, HV> IntoFuture for QuerySetup<EP, BU, BR, PP, HV>where
EP: EndpointDetails + 'static,
BU: Borrow<Url>,
BR: Borrow<EP::RequestType>,
PP: Borrow<HashMap<&'static str, Cow<'a, str>>>,
HV: Borrow<HeaderValue>,
impl<'a, EP, BU, BR, PP, HV> IntoFuture for QuerySetup<EP, BU, BR, PP, HV>where
EP: EndpointDetails + 'static,
BU: Borrow<Url>,
BR: Borrow<EP::RequestType>,
PP: Borrow<HashMap<&'static str, Cow<'a, str>>>,
HV: Borrow<HeaderValue>,
Source§type Output = <EP as EndpointDetails>::ResponseType
type Output = <EP as EndpointDetails>::ResponseType
The output that the future will produce on completion.
Source§type IntoFuture = Pin<Box<dyn Future<Output = <QuerySetup<EP, BU, BR, PP, HV> as IntoFuture>::Output>>>
type IntoFuture = Pin<Box<dyn Future<Output = <QuerySetup<EP, BU, BR, PP, HV> as IntoFuture>::Output>>>
Which kind of future are we turning this into?
Source§fn into_future(self) -> Self::IntoFuture
fn into_future(self) -> Self::IntoFuture
Creates a future from a value. Read more
Auto Trait Implementations§
impl<EP, BU, BR, PP, HV> Freeze for QuerySetup<EP, BU, BR, PP, HV>
impl<EP, BU, BR, PP, HV> !RefUnwindSafe for QuerySetup<EP, BU, BR, PP, HV>
impl<EP, BU, BR, PP, HV> !Send for QuerySetup<EP, BU, BR, PP, HV>
impl<EP, BU, BR, PP, HV> !Sync for QuerySetup<EP, BU, BR, PP, HV>
impl<EP, BU, BR, PP, HV> Unpin for QuerySetup<EP, BU, BR, PP, HV>
impl<EP, BU, BR, PP, HV> UnsafeUnpin for QuerySetup<EP, BU, BR, PP, HV>
impl<EP, BU, BR, PP, HV> !UnwindSafe for QuerySetup<EP, BU, BR, PP, HV>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more