pub struct WorkspaceCreateBuilder { /* private fields */ }Expand description
Builder for WorkspaceCreateRequest.
Implementations§
Source§impl WorkspaceCreateBuilder
impl WorkspaceCreateBuilder
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<WorkspaceCreateRequest, WorkspaceCreateBuilderError>
pub fn build( self, ) -> Result<WorkspaceCreateRequest, WorkspaceCreateBuilderError>
Source§impl WorkspaceCreateBuilder
impl WorkspaceCreateBuilder
Sourcepub async fn create(self) -> ApiResponseOrError<Workspace>
pub async fn create(self) -> ApiResponseOrError<Workspace>
Creates a new workspace create 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 new_workspace = Workspace::create_builder()
.credentials(credentials)
.name("My New Workspace")
.create()
.await?;Trait Implementations§
Source§impl Clone for WorkspaceCreateBuilder
impl Clone for WorkspaceCreateBuilder
Source§fn clone(&self) -> WorkspaceCreateBuilder
fn clone(&self) -> WorkspaceCreateBuilder
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 WorkspaceCreateBuilder
impl Debug for WorkspaceCreateBuilder
Source§impl Default for WorkspaceCreateBuilder
impl Default for WorkspaceCreateBuilder
Source§impl PartialEq for WorkspaceCreateBuilder
impl PartialEq for WorkspaceCreateBuilder
impl StructuralPartialEq for WorkspaceCreateBuilder
Auto Trait Implementations§
impl Freeze for WorkspaceCreateBuilder
impl RefUnwindSafe for WorkspaceCreateBuilder
impl Send for WorkspaceCreateBuilder
impl Sync for WorkspaceCreateBuilder
impl Unpin for WorkspaceCreateBuilder
impl UnwindSafe for WorkspaceCreateBuilder
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