pub struct WorkspaceList {
pub data: Vec<Workspace>,
pub first_id: Option<String>,
pub last_id: Option<String>,
pub has_more: bool,
}Expand description
Response from the List Workspaces API.
Fields§
§data: Vec<Workspace>List of available workspaces
first_id: Option<String>First ID in the data list (for pagination)
last_id: Option<String>Last ID in the data list (for pagination)
has_more: boolIndicates if there are more results in the requested page direction
Implementations§
Source§impl WorkspaceList
impl WorkspaceList
Sourcepub fn builder() -> WorkspaceListBuilder
pub fn builder() -> WorkspaceListBuilder
Creates a builder for listing workspaces.
§Example
let credentials = Credentials::from_env();
let workspaces = WorkspaceList::builder()
.credentials(credentials)
.limit(10u32)
.create()
.await?;Sourcepub async fn create(request: WorkspaceListRequest) -> ApiResponseOrError<Self>
pub async fn create(request: WorkspaceListRequest) -> ApiResponseOrError<Self>
Lists available workspaces with the given request parameters.
§Example
let credentials = Credentials::from_env();
let request = WorkspaceListRequest {
include_archived: Some(true),
before_id: None,
after_id: None,
limit: Some(20),
credentials: Some(credentials),
};
let workspaces = WorkspaceList::create(request).await?;Trait Implementations§
Source§impl Clone for WorkspaceList
impl Clone for WorkspaceList
Source§fn clone(&self) -> WorkspaceList
fn clone(&self) -> WorkspaceList
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 WorkspaceList
impl Debug for WorkspaceList
Source§impl<'de> Deserialize<'de> for WorkspaceList
impl<'de> Deserialize<'de> for WorkspaceList
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for WorkspaceList
impl PartialEq for WorkspaceList
impl Eq for WorkspaceList
impl StructuralPartialEq for WorkspaceList
Auto Trait Implementations§
impl Freeze for WorkspaceList
impl RefUnwindSafe for WorkspaceList
impl Send for WorkspaceList
impl Sync for WorkspaceList
impl Unpin for WorkspaceList
impl UnwindSafe for WorkspaceList
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.