pub struct List<T> { /* private fields */ }Expand description
A generic container with some search capabilities
This structure is used to hold master elements of the ledger than can be aliases such as commodities or accounts
It provides methods for:
- Adding new elements to the list
- Adding new aliases to existing elements
- Retrieving elements
- Retrieving elements with a regular expression
Implementations§
Source§impl<'a, T: Eq + Hash + HasName + Clone + FromDirective + HasAliases + Debug> List<T>
impl<'a, T: Eq + Hash + HasName + Clone + FromDirective + HasAliases + Debug> List<T>
pub fn new() -> Self
pub fn get(&self, index: &str) -> Result<&Rc<T>, LedgerError>
pub fn iter(&self) -> Iter<'_, String, Rc<T>>
pub fn values(&self) -> Values<'_, String, Rc<T>>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn len_alias(&self) -> usize
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for List<T>
impl<T> RefUnwindSafe for List<T>where
T: RefUnwindSafe,
impl<T> !Send for List<T>
impl<T> !Sync for List<T>
impl<T> Unpin for List<T>
impl<T> UnwindSafe for List<T>where
T: RefUnwindSafe,
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