pub struct WorkspaceBuilder { /* private fields */ }Expand description
Builder for WorkspaceRequest.
Implementations§
Source§impl WorkspaceBuilder
impl WorkspaceBuilder
Sourcepub fn workspace_id<VALUE: Into<String>>(self, value: VALUE) -> Self
pub fn workspace_id<VALUE: Into<String>>(self, value: VALUE) -> Self
Workspace identifier
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<WorkspaceRequest, WorkspaceBuilderError>
pub fn build(self) -> Result<WorkspaceRequest, WorkspaceBuilderError>
Source§impl WorkspaceBuilder
impl WorkspaceBuilder
Sourcepub async fn create(self) -> ApiResponseOrError<Workspace>
pub async fn create(self) -> ApiResponseOrError<Workspace>
Creates a new workspace 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 workspace = Workspace::builder("workspace_123456789")
.credentials(credentials)
.create()
.await?;Trait Implementations§
Source§impl Clone for WorkspaceBuilder
impl Clone for WorkspaceBuilder
Source§fn clone(&self) -> WorkspaceBuilder
fn clone(&self) -> WorkspaceBuilder
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 WorkspaceBuilder
impl Debug for WorkspaceBuilder
Source§impl Default for WorkspaceBuilder
impl Default for WorkspaceBuilder
Source§impl PartialEq for WorkspaceBuilder
impl PartialEq for WorkspaceBuilder
impl StructuralPartialEq for WorkspaceBuilder
Auto Trait Implementations§
impl Freeze for WorkspaceBuilder
impl RefUnwindSafe for WorkspaceBuilder
impl Send for WorkspaceBuilder
impl Sync for WorkspaceBuilder
impl Unpin for WorkspaceBuilder
impl UnwindSafe for WorkspaceBuilder
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