CreateUserRequest

Struct CreateUserRequest 

Source
pub struct CreateUserRequest<'a> {
    pub first_name: Option<String>,
    pub last_name: Option<String>,
    pub email: Option<String>,
    pub timezone: Option<String>,
    pub has_access_to_all_future_projects: Option<bool>,
    pub is_contractor: Option<bool>,
    pub is_active: Option<bool>,
    pub weekly_capacity: Option<i64>,
    pub default_hourly_rate: Option<f64>,
    pub cost_rate: Option<f64>,
    pub roles: Option<Vec<String>>,
    pub access_roles: Option<Vec<String>>,
    /* private fields */
}
Expand description

Create this with the associated client method.

That method takes required values as arguments. Set optional values using builder methods on this struct.

Fields§

§first_name: Option<String>§last_name: Option<String>§email: Option<String>§timezone: Option<String>§has_access_to_all_future_projects: Option<bool>§is_contractor: Option<bool>§is_active: Option<bool>§weekly_capacity: Option<i64>§default_hourly_rate: Option<f64>§cost_rate: Option<f64>§roles: Option<Vec<String>>§access_roles: Option<Vec<String>>

Implementations§

Source§

impl<'a> CreateUserRequest<'a>

Source

pub async fn send(self) -> Result<User>

Source

pub fn first_name(self, first_name: &str) -> Self

Source

pub fn last_name(self, last_name: &str) -> Self

Source

pub fn email(self, email: &str) -> Self

Source

pub fn timezone(self, timezone: &str) -> Self

Source

pub fn has_access_to_all_future_projects( self, has_access_to_all_future_projects: bool, ) -> Self

Source

pub fn is_contractor(self, is_contractor: bool) -> Self

Source

pub fn is_active(self, is_active: bool) -> Self

Source

pub fn weekly_capacity(self, weekly_capacity: i64) -> Self

Source

pub fn default_hourly_rate(self, default_hourly_rate: f64) -> Self

Source

pub fn cost_rate(self, cost_rate: f64) -> Self

Source

pub fn roles(self, roles: impl IntoIterator<Item = impl AsRef<str>>) -> Self

Source

pub fn access_roles( self, access_roles: impl IntoIterator<Item = impl AsRef<str>>, ) -> Self

Auto Trait Implementations§

§

impl<'a> Freeze for CreateUserRequest<'a>

§

impl<'a> !RefUnwindSafe for CreateUserRequest<'a>

§

impl<'a> Send for CreateUserRequest<'a>

§

impl<'a> Sync for CreateUserRequest<'a>

§

impl<'a> Unpin for CreateUserRequest<'a>

§

impl<'a> !UnwindSafe for CreateUserRequest<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more