pub struct WorkspaceListBuilder { /* private fields */ }Expand description
Builder for WorkspaceListRequest.
Implementations§
Source§impl WorkspaceListBuilder
impl WorkspaceListBuilder
Sourcepub fn include_archived<VALUE: Into<bool>>(self, value: VALUE) -> Self
pub fn include_archived<VALUE: Into<bool>>(self, value: VALUE) -> Self
Whether to include workspaces that have been archived in the response
Sourcepub fn before_id<VALUE: Into<String>>(self, value: VALUE) -> Self
pub fn before_id<VALUE: Into<String>>(self, value: VALUE) -> Self
ID of the object to use as a cursor for pagination (previous page)
Sourcepub fn after_id<VALUE: Into<String>>(self, value: VALUE) -> Self
pub fn after_id<VALUE: Into<String>>(self, value: VALUE) -> Self
ID of the object to use as a cursor for pagination (next page)
Sourcepub fn limit<VALUE: Into<u32>>(self, value: VALUE) -> Self
pub fn limit<VALUE: Into<u32>>(self, value: VALUE) -> Self
Number of items to return per page (1-1000)
Sourcepub fn credentials<VALUE: Into<Credentials>>(self, value: VALUE) -> Self
pub fn credentials<VALUE: Into<Credentials>>(self, value: VALUE) -> Self
Credentials for authentication (not serialized)
Sourcepub fn build(self) -> Result<WorkspaceListRequest, WorkspaceListBuilderError>
pub fn build(self) -> Result<WorkspaceListRequest, WorkspaceListBuilderError>
Source§impl WorkspaceListBuilder
impl WorkspaceListBuilder
Sourcepub async fn create(self) -> ApiResponseOrError<WorkspaceList>
pub async fn create(self) -> ApiResponseOrError<WorkspaceList>
Creates a new workspace list request and returns the response.
This is a convenience method that builds the request from the builder and sends it to the Workspaces API.
§Example
let credentials = Credentials::from_env();
let workspaces = WorkspaceList::builder()
.credentials(credentials)
.limit(10u32)
.create()
.await?;Trait Implementations§
Source§impl Clone for WorkspaceListBuilder
impl Clone for WorkspaceListBuilder
Source§fn clone(&self) -> WorkspaceListBuilder
fn clone(&self) -> WorkspaceListBuilder
Returns a copy 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 WorkspaceListBuilder
impl Debug for WorkspaceListBuilder
Source§impl Default for WorkspaceListBuilder
impl Default for WorkspaceListBuilder
Source§impl PartialEq for WorkspaceListBuilder
impl PartialEq for WorkspaceListBuilder
impl StructuralPartialEq for WorkspaceListBuilder
Auto Trait Implementations§
impl Freeze for WorkspaceListBuilder
impl RefUnwindSafe for WorkspaceListBuilder
impl Send for WorkspaceListBuilder
impl Sync for WorkspaceListBuilder
impl Unpin for WorkspaceListBuilder
impl UnwindSafe for WorkspaceListBuilder
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