#[repr(u8)]pub enum AccountType {
Asset = 0,
Liability = 1,
Equity = 2,
Revenue = 3,
Expense = 4,
Contra = 5,
}Expand description
The five fundamental account types in double-entry bookkeeping. Each has a “normal balance” side (debit or credit).
Variants§
Asset = 0
Assets: What the company owns (Cash, Inventory, Equipment) Normal balance: Debit (increases with debits)
Liability = 1
Liabilities: What the company owes (Accounts Payable, Loans) Normal balance: Credit (increases with credits)
Equity = 2
Equity: Owner’s stake (Common Stock, Retained Earnings) Normal balance: Credit
Revenue = 3
Revenue: Income from operations (Sales, Service Revenue) Normal balance: Credit
Expense = 4
Expense: Costs of operations (Salaries, Rent, Utilities) Normal balance: Debit
Contra = 5
Contra accounts: Offset their parent account type (Accumulated Depreciation, Sales Returns)
Implementations§
Source§impl AccountType
impl AccountType
Sourcepub fn normal_balance(&self) -> BalanceSide
pub fn normal_balance(&self) -> BalanceSide
Returns the normal balance side for this account type.
Sourcepub fn debit_increases(&self) -> bool
pub fn debit_increases(&self) -> bool
Returns true if debits increase this account’s balance.
Sourcepub fn display_name(&self) -> &'static str
pub fn display_name(&self) -> &'static str
Returns a display name.
Trait Implementations§
Source§impl Archive for AccountType
impl Archive for AccountType
Source§type Archived = ArchivedAccountType
type Archived = ArchivedAccountType
Source§type Resolver = AccountTypeResolver
type Resolver = AccountTypeResolver
Source§impl Clone for AccountType
impl Clone for AccountType
Source§fn clone(&self) -> AccountType
fn clone(&self) -> AccountType
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AccountType
impl Debug for AccountType
Source§impl<__D: Fallible + ?Sized> Deserialize<AccountType, __D> for Archived<AccountType>
impl<__D: Fallible + ?Sized> Deserialize<AccountType, __D> for Archived<AccountType>
Source§fn deserialize(&self, deserializer: &mut __D) -> Result<AccountType, __D::Error>
fn deserialize(&self, deserializer: &mut __D) -> Result<AccountType, __D::Error>
Source§impl Hash for AccountType
impl Hash for AccountType
Source§impl PartialEq<AccountType> for ArchivedAccountType
impl PartialEq<AccountType> for ArchivedAccountType
Source§impl PartialEq<ArchivedAccountType> for AccountType
impl PartialEq<ArchivedAccountType> for AccountType
Source§impl PartialEq for AccountType
impl PartialEq for AccountType
impl Copy for AccountType
impl Eq for AccountType
impl StructuralPartialEq for AccountType
Auto Trait Implementations§
impl Freeze for AccountType
impl RefUnwindSafe for AccountType
impl Send for AccountType
impl Sync for AccountType
impl Unpin for AccountType
impl UnwindSafe for AccountType
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Source§impl<T> ArchiveUnsized for Twhere
T: Archive,
impl<T> ArchiveUnsized for Twhere
T: Archive,
Source§type Archived = <T as Archive>::Archived
type Archived = <T as Archive>::Archived
Archive, it may be unsized. Read moreSource§type MetadataResolver = ()
type MetadataResolver = ()
Source§unsafe fn resolve_metadata(
&self,
_: usize,
_: <T as ArchiveUnsized>::MetadataResolver,
_: *mut <<T as ArchiveUnsized>::Archived as ArchivePointee>::ArchivedMetadata,
)
unsafe fn resolve_metadata( &self, _: usize, _: <T as ArchiveUnsized>::MetadataResolver, _: *mut <<T as ArchiveUnsized>::Archived as ArchivePointee>::ArchivedMetadata, )
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CallHasher for T
impl<T> CallHasher for T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)Source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, S> SerializeUnsized<S> for T
impl<T, S> SerializeUnsized<S> for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.