Struct Category

Source
pub struct Category {
Show 24 fields pub id: Uuid, pub category_group_id: Uuid, pub category_group_name: Option<String>, pub name: String, pub hidden: bool, pub original_category_group_id: Option<Option<Uuid>>, pub note: Option<Option<String>>, pub budgeted: i64, pub activity: i64, pub balance: i64, pub goal_type: Option<Option<GoalType>>, pub goal_needs_whole_amount: Option<Option<bool>>, pub goal_day: Option<Option<i32>>, pub goal_cadence: Option<Option<i32>>, pub goal_cadence_frequency: Option<Option<i32>>, pub goal_creation_month: Option<Option<String>>, pub goal_target: Option<Option<i64>>, pub goal_target_month: Option<Option<String>>, pub goal_percentage_complete: Option<Option<i32>>, pub goal_months_to_budget: Option<Option<i32>>, pub goal_under_funded: Option<Option<i64>>, pub goal_overall_funded: Option<Option<i64>>, pub goal_overall_left: Option<Option<i64>>, pub deleted: bool,
}

Fields§

§id: Uuid§category_group_id: Uuid§category_group_name: Option<String>§name: String§hidden: bool

Whether or not the category is hidden

§original_category_group_id: Option<Option<Uuid>>

DEPRECATED: No longer used. Value will always be null.

§note: Option<Option<String>>§budgeted: i64

Budgeted amount in milliunits format

§activity: i64

Activity amount in milliunits format

§balance: i64

Balance in milliunits format

§goal_type: Option<Option<GoalType>>

The type of goal, if the category has a goal (TB=‘Target Category Balance’, TBD=‘Target Category Balance by Date’, MF=‘Monthly Funding’, NEED=‘Plan Your Spending’)

§goal_needs_whole_amount: Option<Option<bool>>

Indicates the monthly rollover behavior for "NEED"-type goals. When "true", the goal will always ask for the target amount in the new month ("Set Aside"). When "false", previous month category funding is used ("Refill"). For other goal types, this field will be null.

§goal_day: Option<Option<i32>>

A day offset modifier for the goal’s due date. When goal_cadence is 2 (Weekly), this value specifies which day of the week the goal is due (0 = Sunday, 6 = Saturday). Otherwise, this value specifies which day of the month the goal is due (1 = 1st, 31 = 31st, null = Last day of Month).

§goal_cadence: Option<Option<i32>>

The goal cadence. Value in range 0-14. There are two subsets of these values which behave differently. For values 0, 1, 2, and 13, the goal’s due date repeats every goal_cadence * goal_cadence_frequency, where 0 = None, 1 = Monthly, 2 = Weekly, and 13 = Yearly. For example, goal_cadence 1 with goal_cadence_frequency 2 means the goal is due every other month. For values 3-12 and 14, goal_cadence_frequency is ignored and the goal’s due date repeats every goal_cadence, where 3 = Every 2 Months, 4 = Every 3 Months, …, 12 = Every 11 Months, and 14 = Every 2 Years.

§goal_cadence_frequency: Option<Option<i32>>

The goal cadence frequency. When goal_cadence is 0, 1, 2, or 13, a goal’s due date repeats every goal_cadence * goal_cadence_frequency. For example, goal_cadence 1 with goal_cadence_frequency 2 means the goal is due every other month. When goal_cadence is 3-12 or 14, goal_cadence_frequency is ignored.

§goal_creation_month: Option<Option<String>>

The month a goal was created

§goal_target: Option<Option<i64>>

The goal target amount in milliunits

§goal_target_month: Option<Option<String>>

The original target month for the goal to be completed. Only some goal types specify this date.

§goal_percentage_complete: Option<Option<i32>>

The percentage completion of the goal

§goal_months_to_budget: Option<Option<i32>>

The number of months, including the current month, left in the current goal period.

§goal_under_funded: Option<Option<i64>>

The amount of funding still needed in the current month to stay on track towards completing the goal within the current goal period. This amount will generally correspond to the ‘Underfunded’ amount in the web and mobile clients except when viewing a category with a Needed for Spending Goal in a future month. The web and mobile clients will ignore any funding from a prior goal period when viewing category with a Needed for Spending Goal in a future month.

§goal_overall_funded: Option<Option<i64>>

The total amount funded towards the goal within the current goal period.

§goal_overall_left: Option<Option<i64>>

The amount of funding still needed to complete the goal within the current goal period.

§deleted: bool

Whether or not the category has been deleted. Deleted categories will only be included in delta requests.

Implementations§

Source§

impl Category

Source

pub fn new( id: Uuid, category_group_id: Uuid, name: String, hidden: bool, budgeted: i64, activity: i64, balance: i64, deleted: bool, ) -> Category

Trait Implementations§

Source§

impl Clone for Category

Source§

fn clone(&self) -> Category

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Category

Source§

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

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

impl Default for Category

Source§

fn default() -> Category

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

impl<'de> Deserialize<'de> for Category

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 PartialEq for Category

Source§

fn eq(&self, other: &Category) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for Category

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
Source§

impl StructuralPartialEq for Category

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. 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>,

Source§

impl<T> ErasedDestructor for T
where T: 'static,