User

Struct User 

Source
pub struct User {
Show 17 fields pub avatar_url: Option<String>, pub access_roles: Option<Vec<String>>, pub last_name: Option<String>, pub timezone: Option<String>, pub email: Option<String>, pub cost_rate: Option<f64>, pub id: Option<i64>, pub created_at: Option<String>, pub first_name: Option<String>, pub updated_at: Option<String>, pub weekly_capacity: Option<i64>, pub roles: Option<Vec<String>>, pub has_access_to_all_future_projects: Option<bool>, pub telephone: Option<String>, pub is_contractor: Option<bool>, pub is_active: Option<bool>, pub default_hourly_rate: Option<f64>,
}

Fields§

§avatar_url: Option<String>

The URL to the user’s avatar image.

§access_roles: Option<Vec<String>>

Access role(s) that determine the user’s permissions in Harvest. Possible values: administrator, manager or member. Users with the manager role can additionally be granted one or more of these roles: project_creator, billable_rates_manager, managed_projects_invoice_drafter, managed_projects_invoice_manager, client_and_task_manager, time_and_expenses_manager, estimates_manager.

§last_name: Option<String>

The last name of the user.

§timezone: Option<String>

The user’s timezone.

§email: Option<String>

The email address of the user.

§cost_rate: Option<f64>

The cost rate to use for this user when calculating a project’s costs vs billable amount.

§id: Option<i64>

Unique ID for the user.

§created_at: Option<String>

Date and time the user was created.

§first_name: Option<String>

The first name of the user.

§updated_at: Option<String>

Date and time the user was last updated.

§weekly_capacity: Option<i64>

The number of hours per week this person is available to work in seconds, in half hour increments. For example, if a person’s capacity is 35 hours, the API will return 126000 seconds.

§roles: Option<Vec<String>>

Descriptive names of the business roles assigned to this person. They can be used for filtering reports, and have no effect in their permissions in Harvest.

§has_access_to_all_future_projects: Option<bool>

Whether the user should be automatically added to future projects.

§telephone: Option<String>

The user’s telephone number.

§is_contractor: Option<bool>

Whether the user is a contractor or an employee.

§is_active: Option<bool>

Whether the user is active or archived.

§default_hourly_rate: Option<f64>

The billable rate to use for this user when they are added to a project.

Trait Implementations§

Source§

impl Debug for User

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for User

Source§

fn default() -> User

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for User

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Display for User

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Serialize for User

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

§

impl Freeze for User

§

impl RefUnwindSafe for User

§

impl Send for User

§

impl Sync for User

§

impl Unpin for User

§

impl UnwindSafe for User

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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
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
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,