pub struct OrderQueryBuilder { /* private fields */ }Expand description
Builder for a validated OrderQuery.
Implementations§
Source§impl OrderQueryBuilder
impl OrderQueryBuilder
Sourcepub fn statuses(self, statuses: impl IntoIterator<Item = OrderStatus>) -> Self
pub fn statuses(self, statuses: impl IntoIterator<Item = OrderStatus>) -> Self
Replaces the lifecycle-status filter.
Sourcepub fn contract_id(self, contract_id: ContractId) -> Self
pub fn contract_id(self, contract_id: ContractId) -> Self
Restricts results to one provider contract.
Sourcepub const fn created_after(self, created_after: Timestamp) -> Self
pub const fn created_after(self, created_after: Timestamp) -> Self
Sets the lower creation-time bound.
Sourcepub const fn created_before(self, created_before: Timestamp) -> Self
pub const fn created_before(self, created_before: Timestamp) -> Self
Sets the upper creation-time bound.
Sourcepub const fn page_size(self, page_size: i32) -> Self
pub const fn page_size(self, page_size: i32) -> Self
Sets the positive number of orders requested per page.
Sourcepub const fn page_offset(self, page_offset: i32) -> Self
pub const fn page_offset(self, page_offset: i32) -> Self
Sets the non-negative result offset.
Sourcepub const fn sort_by(self, sort_by: OrderSortBy) -> Self
pub const fn sort_by(self, sort_by: OrderSortBy) -> Self
Selects the result sort field.
Sourcepub const fn sort_direction(self, sort_direction: OrderSortDirection) -> Self
pub const fn sort_direction(self, sort_direction: OrderSortDirection) -> Self
Selects the result sort direction.
Sourcepub const fn include_total_count(self, include: bool) -> Self
pub const fn include_total_count(self, include: bool) -> Self
Selects whether the response should include a total matching count.
Sourcepub fn build(self) -> Result<OrderQuery, RequestValidationError>
pub fn build(self) -> Result<OrderQuery, RequestValidationError>
Validates and builds the v2 order query.
§Errors
Returns an error for an unknown request-status code, a creation range that does not increase, a non-positive page size, or a negative page offset.
Trait Implementations§
Source§impl Clone for OrderQueryBuilder
impl Clone for OrderQueryBuilder
Source§fn clone(&self) -> OrderQueryBuilder
fn clone(&self) -> OrderQueryBuilder
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for OrderQueryBuilder
impl RefUnwindSafe for OrderQueryBuilder
impl Send for OrderQueryBuilder
impl Sync for OrderQueryBuilder
impl Unpin for OrderQueryBuilder
impl UnsafeUnpin for OrderQueryBuilder
impl UnwindSafe for OrderQueryBuilder
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