pub struct InviteCreateBuilder { /* private fields */ }Expand description
Builder for InviteCreateRequest.
Implementations§
Source§impl InviteCreateBuilder
impl InviteCreateBuilder
Sourcepub fn role<VALUE: Into<InviteRole>>(self, value: VALUE) -> Self
pub fn role<VALUE: Into<InviteRole>>(self, value: VALUE) -> Self
Role for the invited user (cannot be “admin”)
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<InviteCreateRequest, InviteCreateBuilderError>
pub fn build(self) -> Result<InviteCreateRequest, InviteCreateBuilderError>
Source§impl InviteCreateBuilder
impl InviteCreateBuilder
Sourcepub async fn create(self) -> ApiResponseOrError<Invite>
pub async fn create(self) -> ApiResponseOrError<Invite>
Creates a new invite create request and returns the response.
This is a convenience method that builds the request from the builder and sends it to the Invites API.
§Example
let credentials = Credentials::from_env();
let new_invite = Invite::create_builder()
.credentials(credentials)
.email("user@example.com")
.role(InviteRole::Developer)
.create()
.await?;Trait Implementations§
Source§impl Clone for InviteCreateBuilder
impl Clone for InviteCreateBuilder
Source§fn clone(&self) -> InviteCreateBuilder
fn clone(&self) -> InviteCreateBuilder
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 InviteCreateBuilder
impl Debug for InviteCreateBuilder
Source§impl Default for InviteCreateBuilder
impl Default for InviteCreateBuilder
Source§impl PartialEq for InviteCreateBuilder
impl PartialEq for InviteCreateBuilder
impl StructuralPartialEq for InviteCreateBuilder
Auto Trait Implementations§
impl Freeze for InviteCreateBuilder
impl RefUnwindSafe for InviteCreateBuilder
impl Send for InviteCreateBuilder
impl Sync for InviteCreateBuilder
impl Unpin for InviteCreateBuilder
impl UnwindSafe for InviteCreateBuilder
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