pub struct WorkspaceMemberUpdateBuilder { /* private fields */ }Expand description
Builder for WorkspaceMemberUpdateRequest.
Implementations§
Source§impl WorkspaceMemberUpdateBuilder
impl WorkspaceMemberUpdateBuilder
Sourcepub fn workspace_id<VALUE: Into<String>>(self, value: VALUE) -> Self
pub fn workspace_id<VALUE: Into<String>>(self, value: VALUE) -> Self
Workspace identifier (not serialized)
Sourcepub fn user_id<VALUE: Into<String>>(self, value: VALUE) -> Self
pub fn user_id<VALUE: Into<String>>(self, value: VALUE) -> Self
User identifier (not serialized)
Sourcepub fn workspace_role<VALUE: Into<WorkspaceMemberRole>>(
self,
value: VALUE,
) -> Self
pub fn workspace_role<VALUE: Into<WorkspaceMemberRole>>( self, value: VALUE, ) -> Self
New role for the workspace member
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<WorkspaceMemberUpdateRequest, WorkspaceMemberUpdateBuilderError>
pub fn build( self, ) -> Result<WorkspaceMemberUpdateRequest, WorkspaceMemberUpdateBuilderError>
Source§impl WorkspaceMemberUpdateBuilder
impl WorkspaceMemberUpdateBuilder
Sourcepub async fn create(self) -> ApiResponseOrError<WorkspaceMember>
pub async fn create(self) -> ApiResponseOrError<WorkspaceMember>
Creates a new workspace member update request and returns the response.
This is a convenience method that builds the request from the builder and sends it to the Workspace Members API.
§Example
let credentials = Credentials::from_env();
let updated_member = WorkspaceMember::update_builder("workspace_123456789", "user_123456789")
.credentials(credentials)
.workspace_role(WorkspaceMemberRole::WorkspaceAdmin)
.create()
.await?;Trait Implementations§
Source§impl Clone for WorkspaceMemberUpdateBuilder
impl Clone for WorkspaceMemberUpdateBuilder
Source§fn clone(&self) -> WorkspaceMemberUpdateBuilder
fn clone(&self) -> WorkspaceMemberUpdateBuilder
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 WorkspaceMemberUpdateBuilder
impl Debug for WorkspaceMemberUpdateBuilder
Source§impl PartialEq for WorkspaceMemberUpdateBuilder
impl PartialEq for WorkspaceMemberUpdateBuilder
Source§fn eq(&self, other: &WorkspaceMemberUpdateBuilder) -> bool
fn eq(&self, other: &WorkspaceMemberUpdateBuilder) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for WorkspaceMemberUpdateBuilder
Auto Trait Implementations§
impl Freeze for WorkspaceMemberUpdateBuilder
impl RefUnwindSafe for WorkspaceMemberUpdateBuilder
impl Send for WorkspaceMemberUpdateBuilder
impl Sync for WorkspaceMemberUpdateBuilder
impl Unpin for WorkspaceMemberUpdateBuilder
impl UnwindSafe for WorkspaceMemberUpdateBuilder
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