pub struct ListOptions {
pub from: Option<i64>,
pub to: Option<i64>,
pub count: Option<u32>,
pub skip: Option<u32>,
}Expand description
Filters accepted by every all() / list endpoint.
All fields are optional and omitted from the query string when None —
Razorpay rejects count=null, so an unset field must not be serialized at all.
§Examples
The common case is “just give me the defaults”:
use razorpay_api::ListOptions;
let opts = ListOptions::default();
assert!(opts.count.is_none());Or build up a filtered window with the chainable setters:
use razorpay_api::ListOptions;
let opts = ListOptions::new().count(25).skip(50).from(1_700_000_000);
assert_eq!(opts.count, Some(25));
assert_eq!(opts.skip, Some(50));Fields§
§from: Option<i64>Unix timestamp (seconds); returns records created at or after this time.
to: Option<i64>Unix timestamp (seconds); returns records created at or before this time.
count: Option<u32>Number of records to fetch. Razorpay’s default is 10 and its maximum is 100.
skip: Option<u32>Number of records to skip — combine with count to page.
Implementations§
Source§impl ListOptions
impl ListOptions
Sourcepub fn new() -> Self
pub fn new() -> Self
An empty set of filters, equivalent to ListOptions::default().
Sourcepub fn from(self, from: i64) -> Self
pub fn from(self, from: i64) -> Self
Only return records created at or after this Unix timestamp (seconds).
Trait Implementations§
Source§impl Clone for ListOptions
impl Clone for ListOptions
Source§impl Debug for ListOptions
impl Debug for ListOptions
Source§impl Default for ListOptions
impl Default for ListOptions
impl Eq for ListOptions
Source§impl PartialEq for ListOptions
impl PartialEq for ListOptions
Source§impl Serialize for ListOptions
impl Serialize for ListOptions
impl StructuralPartialEq for ListOptions
Auto Trait Implementations§
impl Freeze for ListOptions
impl RefUnwindSafe for ListOptions
impl Send for ListOptions
impl Sync for ListOptions
impl Unpin for ListOptions
impl UnsafeUnpin for ListOptions
impl UnwindSafe for ListOptions
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.