RequestBuilder

Struct RequestBuilder 

Source
pub struct RequestBuilder { /* private fields */ }
Expand description

RequestBuilder provides a mechanism for setting optional parameters on a request.

Each RequestBuilder parameter method call returns Self, so setting of multiple parameters can be chained.

To finalize and submit the request, invoke .await, which converts the RequestBuilder into a future, executes the request and returns a Result with the parsed response.

If you need lower-level access to the raw response details (e.g. to inspect response headers or raw body data) then you can finalize the request using the RequestBuilder::send() method which returns a future that resolves to a lower-level Response value.

Implementations§

Source§

impl RequestBuilder

Source

pub fn max_change_count(self, max_change_count: i32) -> Self

Number of changes to return (maximum 100 changes) Default: 0

Source

pub fn include_details(self, include_details: bool) -> Self

Include policy details and check-in notes in the response. Default: false

Source

pub fn include_work_items(self, include_work_items: bool) -> Self

Include workitems. Default: false

Source

pub fn max_comment_length(self, max_comment_length: i32) -> Self

Include details about associated work items in the response. Default: null

Source

pub fn include_source_rename(self, include_source_rename: bool) -> Self

Include renames. Default: false

Source

pub fn skip(self, skip: i32) -> Self

Number of results to skip. Default: null

Source

pub fn top(self, top: i32) -> Self

The maximum number of results to return. Default: null

Source

pub fn orderby(self, orderby: impl Into<String>) -> Self

Results are sorted by ID in descending order by default. Use id asc to sort by ID in ascending order.

Source

pub fn search_criteria_author( self, search_criteria_author: impl Into<String>, ) -> Self

Alias or display name of user who made the changes.

Source

pub fn search_criteria_follow_renames( self, search_criteria_follow_renames: bool, ) -> Self

Whether or not to follow renames for the given item being queried.

Source

pub fn search_criteria_from_date( self, search_criteria_from_date: impl Into<String>, ) -> Self

If provided, only include changesets created after this date (string).

Source

pub fn search_criteria_from_id(self, search_criteria_from_id: i32) -> Self

If provided, only include changesets after this changesetID.

Whether to include the _links field on the shallow references.

Source

pub fn search_criteria_item_path( self, search_criteria_item_path: impl Into<String>, ) -> Self

Path of item to search under.

Source

pub fn search_criteria_mappings( self, search_criteria_mappings: Vec<TfvcMappingFilter>, ) -> Self

Following criteria available (.itemPath, .version, .versionType, .versionOption, .author, .fromId, .toId, .fromDate, .toDate) Default: null

Source

pub fn search_criteria_to_date( self, search_criteria_to_date: impl Into<String>, ) -> Self

If provided, only include changesets created before this date (string).

Source

pub fn search_criteria_to_id(self, search_criteria_to_id: i32) -> Self

If provided, a version descriptor for the latest change list to include.

Source

pub fn send(self) -> BoxFuture<'static, Result<Response>>

Returns a future that sends the request and returns a Response object that provides low-level access to full response details.

You should typically use .await (which implicitly calls IntoFuture::into_future()) to finalize and send requests rather than send(). However, this function can provide more flexibility when required.

Trait Implementations§

Source§

impl Clone for RequestBuilder

Source§

fn clone(&self) -> RequestBuilder

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl IntoFuture for RequestBuilder

Source§

fn into_future(self) -> Self::IntoFuture

Returns a future that sends the request and returns the parsed response body.

You should not normally call this method directly, simply invoke .await which implicitly calls IntoFuture::into_future.

See IntoFuture documentation for more details.

Source§

type Output = Result<TfvcChangeset, Error>

The output that the future will produce on completion.
Source§

type IntoFuture = Pin<Box<dyn Future<Output = Result<TfvcChangeset, Error>> + Send>>

Which kind of future are we turning this into?

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,