pub struct Account {
pub name: String,
pub accounts: HashMap<String, Account>,
pub posts: Vec<*const Post>,
/* private fields */
}
Fields§
§name: String
§accounts: HashMap<String, Account>
§posts: Vec<*const Post>
Implementations§
Source§impl Account
impl Account
pub fn new(name: &str) -> Self
pub fn fullname(&self) -> &str
Sourcepub fn find_account(&self, name: &str) -> Option<&Account>
pub fn find_account(&self, name: &str) -> Option<&Account>
Finds account by full name. i.e. “Assets:Cash”
Sourcepub fn find_or_create(
&self,
name: &str,
auto_create: bool,
) -> Option<*const Account>
pub fn find_or_create( &self, name: &str, auto_create: bool, ) -> Option<*const Account>
The variant with all the parameters. account_t * find_account(const string& name, bool auto_create = true);
pub fn from_ptr<'a>(acct_ptr: *const Account) -> &'a Account
pub fn get_account_mut(&self, acct_ptr: *const Account) -> &mut Account
pub fn flatten_account_tree(&self) -> Vec<&Account>
Trait Implementations§
impl StructuralPartialEq for Account
Auto Trait Implementations§
impl Freeze for Account
impl RefUnwindSafe for Account
impl !Send for Account
impl !Sync for Account
impl Unpin for Account
impl UnwindSafe for Account
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