pub struct ListFilesParams {
pub purpose: Option<FilePurpose>,
pub limit: Option<u32>,
pub after: Option<String>,
pub before: Option<String>,
pub order: Option<SortOrder>,
}Expand description
Parameters for listing files
Fields§
§purpose: Option<FilePurpose>Filter files by purpose
limit: Option<u32>Maximum number of files to return (default 20, max 10,000)
after: Option<String>Pagination cursor - list files after this ID
before: Option<String>Pagination cursor - list files before this ID
order: Option<SortOrder>Sort order for the results
Implementations§
Source§impl ListFilesParams
impl ListFilesParams
Sourcepub fn with_purpose(self, purpose: FilePurpose) -> Self
pub fn with_purpose(self, purpose: FilePurpose) -> Self
Set the purpose filter
Sourcepub fn with_limit(self, limit: u32) -> Self
pub fn with_limit(self, limit: u32) -> Self
Set the limit
Sourcepub fn with_after(self, after: String) -> Self
pub fn with_after(self, after: String) -> Self
Set the after cursor for pagination
Sourcepub fn with_before(self, before: String) -> Self
pub fn with_before(self, before: String) -> Self
Set the before cursor for pagination
Sourcepub fn with_order(self, order: SortOrder) -> Self
pub fn with_order(self, order: SortOrder) -> Self
Set the sort order
Sourcepub fn to_query_params(&self) -> Vec<(String, String)>
pub fn to_query_params(&self) -> Vec<(String, String)>
Build query parameters for the API request
Trait Implementations§
Source§impl Clone for ListFilesParams
impl Clone for ListFilesParams
Source§fn clone(&self) -> ListFilesParams
fn clone(&self) -> ListFilesParams
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ListFilesParams
impl Debug for ListFilesParams
Source§impl Default for ListFilesParams
impl Default for ListFilesParams
Source§fn default() -> ListFilesParams
fn default() -> ListFilesParams
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ListFilesParams
impl RefUnwindSafe for ListFilesParams
impl Send for ListFilesParams
impl Sync for ListFilesParams
impl Unpin for ListFilesParams
impl UnwindSafe for ListFilesParams
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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