pub struct PayeeRepository { /* private fields */ }Expand description
Repository for payee persistence
Implementations§
Source§impl PayeeRepository
impl PayeeRepository
Sourcepub fn load(&self) -> Result<(), EnvelopeError>
pub fn load(&self) -> Result<(), EnvelopeError>
Load payees from disk
Sourcepub fn save(&self) -> Result<(), EnvelopeError>
pub fn save(&self) -> Result<(), EnvelopeError>
Save payees to disk
Sourcepub fn get_by_name(&self, name: &str) -> Result<Option<Payee>, EnvelopeError>
pub fn get_by_name(&self, name: &str) -> Result<Option<Payee>, EnvelopeError>
Get a payee by exact name (case-insensitive)
Sourcepub fn search(
&self,
query: &str,
limit: usize,
) -> Result<Vec<Payee>, EnvelopeError>
pub fn search( &self, query: &str, limit: usize, ) -> Result<Vec<Payee>, EnvelopeError>
Find payees matching a query (fuzzy search)
Sourcepub fn get_or_create(&self, name: &str) -> Result<Payee, EnvelopeError>
pub fn get_or_create(&self, name: &str) -> Result<Payee, EnvelopeError>
Get or create a payee by name
Sourcepub fn count(&self) -> Result<usize, EnvelopeError>
pub fn count(&self) -> Result<usize, EnvelopeError>
Count payees
Auto Trait Implementations§
impl !Freeze for PayeeRepository
impl RefUnwindSafe for PayeeRepository
impl Send for PayeeRepository
impl Sync for PayeeRepository
impl Unpin for PayeeRepository
impl UnwindSafe for PayeeRepository
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more