pub struct RegisterEntries<'a, 'ctx> { /* private fields */ }Expand description
FallibleLender returned by Ledger::register_entries.
Holds the running cumulative Amount and a borrow into the underlying
transactions; each call to FallibleLender::next advances to the next
matching posting, updates the running total, and lends a borrow. Errors
from currency conversion are surfaced as QueryError.
Trait Implementations§
Source§impl<'a, 'ctx> FallibleLender for RegisterEntries<'a, 'ctx>
impl<'a, 'ctx> FallibleLender for RegisterEntries<'a, 'ctx>
Source§type Error = QueryError
type Error = QueryError
The error type.
Source§fn __check_covariance<'long: 'short, 'short>(
proof: CovariantProof<<Self as FallibleLending<'long>>::Lend>,
) -> CovariantProof<<Self as FallibleLending<'short>>::Lend>
fn __check_covariance<'long: 'short, 'short>( proof: CovariantProof<<Self as FallibleLending<'long>>::Lend>, ) -> CovariantProof<<Self as FallibleLending<'short>>::Lend>
Source§fn next(&mut self) -> Result<Option<FallibleLend<'_, Self>>, Self::Error>
fn next(&mut self) -> Result<Option<FallibleLend<'_, Self>>, Self::Error>
Yields the next lend, if any, of the lender, or
Ok(None) when iteration
is finished. Read moreSource§fn count(self) -> Result<usize, Self::Error>where
Self: Sized,
fn count(self) -> Result<usize, Self::Error>where
Self: Sized,
Counts the number of lends in the lender by consuming it until the
lender yields
Ok(None) or Err(_). Read moreSource§fn last<'call>(&'call mut self) -> Result<Option<Self::Lend>, Self::Error>where
Self: Sized,
fn last<'call>(&'call mut self) -> Result<Option<Self::Lend>, Self::Error>where
Self: Sized,
Gets the last lend of the lender, if any, by consuming it. Read more
Source§fn advance_by(
&mut self,
n: usize,
) -> Result<Result<(), NonZero<usize>>, Self::Error>
fn advance_by( &mut self, n: usize, ) -> Result<Result<(), NonZero<usize>>, Self::Error>
Advances the lender by
n lends. Read moreSource§fn nth(&mut self, n: usize) -> Result<Option<Self::Lend>, Self::Error>
fn nth(&mut self, n: usize) -> Result<Option<Self::Lend>, Self::Error>
Yields the nth lend of the lender, if any, by
consuming it. If the lender does not have enough
lends, returns
Ok(None). Read moreSource§fn step_by(self, step: usize) -> StepBy<Self>where
Self: Sized,
fn step_by(self, step: usize) -> StepBy<Self>where
Self: Sized,
Skips
step - 1 lends between each lend of the lender. Read moreSource§fn chain<U>(
self,
other: U,
) -> Chain<Self, <U as IntoFallibleLender>::FallibleLender>where
Self: Sized,
U: IntoFallibleLender<Error = Self::Error> + for<'all> FallibleLending<'all, Lend = Self::Lend>,
fn chain<U>(
self,
other: U,
) -> Chain<Self, <U as IntoFallibleLender>::FallibleLender>where
Self: Sized,
U: IntoFallibleLender<Error = Self::Error> + for<'all> FallibleLending<'all, Lend = Self::Lend>,
Chains the lender with another lender of the same type. Read more
Source§fn zip<U>(
self,
other: U,
) -> Zip<Self, <U as IntoFallibleLender>::FallibleLender>where
U: IntoFallibleLender,
Self: Sized,
fn zip<U>(
self,
other: U,
) -> Zip<Self, <U as IntoFallibleLender>::FallibleLender>where
U: IntoFallibleLender,
Self: Sized,
Zips the lender with another lender of the same or different type. Read more
Source§fn intersperse_with<'call, G>(
self,
separator: G,
) -> IntersperseWith<'call, Self, G>
fn intersperse_with<'call, G>( self, separator: G, ) -> IntersperseWith<'call, Self, G>
Intersperses each lend of this lender with the separator produced by
the given function. Read more
Source§fn map<F>(self, f: Covar<F>) -> Map<Self, F>
fn map<F>(self, f: Covar<F>) -> Map<Self, F>
Maps each lend of this lender using the given function. Read more
Source§fn map_err<E, F>(self, f: F) -> MapErr<E, Self, F>
fn map_err<E, F>(self, f: F) -> MapErr<E, Self, F>
Maps the error of this lender using the given function. Read more
Source§fn map_into_iter<O, F>(self, f: F) -> MapIntoIter<Self, O, F> ⓘ
fn map_into_iter<O, F>(self, f: F) -> MapIntoIter<Self, O, F> ⓘ
Maps each lend of this lender into an owned value using the given function. Read more
Source§fn for_each<F>(self, f: F) -> Result<(), Self::Error>
fn for_each<F>(self, f: F) -> Result<(), Self::Error>
Calls the given function with each lend of this lender. Read more
Source§fn filter<P>(self, predicate: P) -> Filter<Self, P>
fn filter<P>(self, predicate: P) -> Filter<Self, P>
Filters this lender using the given predicate. Read more
Source§fn filter_map<F>(self, f: Covar<F>) -> FilterMap<Self, F>
fn filter_map<F>(self, f: Covar<F>) -> FilterMap<Self, F>
Filters and maps this lender using the given function. Read more
Source§fn enumerate(self) -> Enumerate<Self>where
Self: Sized,
fn enumerate(self) -> Enumerate<Self>where
Self: Sized,
Enumerates this lender. Each lend is paired with its zero-based
index. Read more
Source§fn peekable<'call>(self) -> Peekable<'call, Self>where
Self: Sized,
fn peekable<'call>(self) -> Peekable<'call, Self>where
Self: Sized,
Makes this lender peekable, so that it is possible to peek at the next
lend without consuming it. Read more
Source§fn skip_while<P>(self, predicate: P) -> SkipWhile<Self, P>
fn skip_while<P>(self, predicate: P) -> SkipWhile<Self, P>
Skips the first contiguous sequence of lends of this lender that
satisfy the given predicate. Read more
Source§fn take_while<P>(self, predicate: P) -> TakeWhile<Self, P>
fn take_while<P>(self, predicate: P) -> TakeWhile<Self, P>
Takes the first contiguous sequence of lends of this lender that
satisfy the given predicate. Read more
Source§fn skip(self, n: usize) -> Skip<Self>where
Self: Sized,
fn skip(self, n: usize) -> Skip<Self>where
Self: Sized,
Skips the first
n lends of this lender. Read moreSource§fn take(self, n: usize) -> Take<Self>where
Self: Sized,
fn take(self, n: usize) -> Take<Self>where
Self: Sized,
Takes the first
n lends of this lender. Read moreSource§fn flat_map<'call, F>(self, f: Covar<F>) -> FlatMap<'call, Self, F>where
Self: Sized,
F: for<'all> FnMutHKARes<'all, Self::Lend, Self::Error>,
<F as FnMutHKARes<'all, Self::Lend, Self::Error>>::B: for<'all> IntoFallibleLender<Error = Self::Error>,
fn flat_map<'call, F>(self, f: Covar<F>) -> FlatMap<'call, Self, F>where
Self: Sized,
F: for<'all> FnMutHKARes<'all, Self::Lend, Self::Error>,
<F as FnMutHKARes<'all, Self::Lend, Self::Error>>::B: for<'all> IntoFallibleLender<Error = Self::Error>,
Source§fn mutate<F>(self, f: F) -> Mutate<Self, F>
fn mutate<F>(self, f: F) -> Mutate<Self, F>
Mutates each lend with the given function. Read more
Source§fn collect<B>(self) -> Result<B, (B, Self::Error)>where
Self: Sized,
B: for<'all> FromLender<NonFallibleAdapter<'all, Self>>,
fn collect<B>(self) -> Result<B, (B, Self::Error)>where
Self: Sized,
B: for<'all> FromLender<NonFallibleAdapter<'all, Self>>,
Transforms the fallible lender into a collection.
If any invocation of next returns Err, returns the collection built
from values yielded successfully, together with the error. Read more
Source§fn collect_into<E>(
self,
collection: &mut E,
) -> Result<&mut E, (&mut E, Self::Error)>where
Self: Sized,
E: for<'all> ExtendLender<NonFallibleAdapter<'all, Self>>,
fn collect_into<E>(
self,
collection: &mut E,
) -> Result<&mut E, (&mut E, Self::Error)>where
Self: Sized,
E: for<'all> ExtendLender<NonFallibleAdapter<'all, Self>>,
Extends an existing collection with lends from this fallible lender. Read more
Source§fn try_for_each<F, R>(&mut self, f: F) -> Result<R, Self::Error>
fn try_for_each<F, R>(&mut self, f: F) -> Result<R, Self::Error>
Source§fn find_map<'a, F>(
&'a mut self,
f: Covar<F>,
) -> Result<Option<<F as FnMutHKAResOpt<'a, Self::Lend, Self::Error>>::B>, Self::Error>
fn find_map<'a, F>( &'a mut self, f: Covar<F>, ) -> Result<Option<<F as FnMutHKAResOpt<'a, Self::Lend, Self::Error>>::B>, Self::Error>
Source§fn try_find<F, R>(
&mut self,
f: F,
) -> Result<<<R as Try>::Residual as Residual<Option<Self::Lend>>>::TryType, Self::Error>
fn try_find<F, R>( &mut self, f: F, ) -> Result<<<R as Try>::Residual as Residual<Option<Self::Lend>>>::TryType, Self::Error>
Source§fn product<P>(self) -> Result<P, Self::Error>where
Self: Sized,
P: ProductFallibleLender<Self>,
fn product<P>(self) -> Result<P, Self::Error>where
Self: Sized,
P: ProductFallibleLender<Self>,
Source§fn cmp_by<L, F>(self, other: L, cmp: F) -> Result<Ordering, Self::Error>where
Self: Sized,
L: IntoFallibleLender<Error = Self::Error>,
F: for<'all> FnMut(Self::Lend, <<L as IntoFallibleLender>::FallibleLender as FallibleLending<'all>>::Lend) -> Result<Ordering, Self::Error>,
fn cmp_by<L, F>(self, other: L, cmp: F) -> Result<Ordering, Self::Error>where
Self: Sized,
L: IntoFallibleLender<Error = Self::Error>,
F: for<'all> FnMut(Self::Lend, <<L as IntoFallibleLender>::FallibleLender as FallibleLending<'all>>::Lend) -> Result<Ordering, Self::Error>,
Source§fn partial_cmp<L>(self, other: L) -> Result<Option<Ordering>, Self::Error>where
L: IntoFallibleLender<Error = Self::Error>,
Self::Lend: for<'all> PartialOrd<<<L as IntoFallibleLender>::FallibleLender as FallibleLending<'all>>::Lend>,
Self: Sized,
fn partial_cmp<L>(self, other: L) -> Result<Option<Ordering>, Self::Error>where
L: IntoFallibleLender<Error = Self::Error>,
Self::Lend: for<'all> PartialOrd<<<L as IntoFallibleLender>::FallibleLender as FallibleLending<'all>>::Lend>,
Self: Sized,
Source§fn partial_cmp_by<L, F>(
self,
other: L,
partial_cmp: F,
) -> Result<Option<Ordering>, Self::Error>where
Self: Sized,
L: IntoFallibleLender<Error = Self::Error>,
F: for<'all> FnMut(Self::Lend, <<L as IntoFallibleLender>::FallibleLender as FallibleLending<'all>>::Lend) -> Result<Option<Ordering>, Self::Error>,
fn partial_cmp_by<L, F>(
self,
other: L,
partial_cmp: F,
) -> Result<Option<Ordering>, Self::Error>where
Self: Sized,
L: IntoFallibleLender<Error = Self::Error>,
F: for<'all> FnMut(Self::Lend, <<L as IntoFallibleLender>::FallibleLender as FallibleLending<'all>>::Lend) -> Result<Option<Ordering>, Self::Error>,
Source§fn eq<L>(self, other: L) -> Result<bool, Self::Error>where
L: IntoFallibleLender<Error = Self::Error>,
Self::Lend: for<'all> PartialEq<<<L as IntoFallibleLender>::FallibleLender as FallibleLending<'all>>::Lend>,
Self: Sized,
fn eq<L>(self, other: L) -> Result<bool, Self::Error>where
L: IntoFallibleLender<Error = Self::Error>,
Self::Lend: for<'all> PartialEq<<<L as IntoFallibleLender>::FallibleLender as FallibleLending<'all>>::Lend>,
Self: Sized,
Source§fn eq_by<L, F>(self, other: L, eq: F) -> Result<bool, Self::Error>where
Self: Sized,
L: IntoFallibleLender<Error = Self::Error>,
F: for<'all> FnMut(Self::Lend, <<L as IntoFallibleLender>::FallibleLender as FallibleLending<'all>>::Lend) -> Result<bool, Self::Error>,
fn eq_by<L, F>(self, other: L, eq: F) -> Result<bool, Self::Error>where
Self: Sized,
L: IntoFallibleLender<Error = Self::Error>,
F: for<'all> FnMut(Self::Lend, <<L as IntoFallibleLender>::FallibleLender as FallibleLending<'all>>::Lend) -> Result<bool, Self::Error>,
Source§fn ne<L>(self, other: L) -> Result<bool, Self::Error>where
L: IntoFallibleLender<Error = Self::Error>,
Self::Lend: for<'all> PartialEq<<<L as IntoFallibleLender>::FallibleLender as FallibleLending<'all>>::Lend>,
Self: Sized,
fn ne<L>(self, other: L) -> Result<bool, Self::Error>where
L: IntoFallibleLender<Error = Self::Error>,
Self::Lend: for<'all> PartialEq<<<L as IntoFallibleLender>::FallibleLender as FallibleLending<'all>>::Lend>,
Self: Sized,
Source§fn lt<L>(self, other: L) -> Result<bool, Self::Error>where
L: IntoFallibleLender<Error = Self::Error>,
Self::Lend: for<'all> PartialOrd<<<L as IntoFallibleLender>::FallibleLender as FallibleLending<'all>>::Lend>,
Self: Sized,
fn lt<L>(self, other: L) -> Result<bool, Self::Error>where
L: IntoFallibleLender<Error = Self::Error>,
Self::Lend: for<'all> PartialOrd<<<L as IntoFallibleLender>::FallibleLender as FallibleLending<'all>>::Lend>,
Self: Sized,
Source§fn le<L>(self, other: L) -> Result<bool, Self::Error>where
L: IntoFallibleLender<Error = Self::Error>,
Self::Lend: for<'all> PartialOrd<<<L as IntoFallibleLender>::FallibleLender as FallibleLending<'all>>::Lend>,
Self: Sized,
fn le<L>(self, other: L) -> Result<bool, Self::Error>where
L: IntoFallibleLender<Error = Self::Error>,
Self::Lend: for<'all> PartialOrd<<<L as IntoFallibleLender>::FallibleLender as FallibleLending<'all>>::Lend>,
Self: Sized,
Source§fn gt<L>(self, other: L) -> Result<bool, Self::Error>where
L: IntoFallibleLender<Error = Self::Error>,
Self::Lend: for<'all> PartialOrd<<<L as IntoFallibleLender>::FallibleLender as FallibleLending<'all>>::Lend>,
Self: Sized,
fn gt<L>(self, other: L) -> Result<bool, Self::Error>where
L: IntoFallibleLender<Error = Self::Error>,
Self::Lend: for<'all> PartialOrd<<<L as IntoFallibleLender>::FallibleLender as FallibleLending<'all>>::Lend>,
Self: Sized,
Source§fn ge<L>(self, other: L) -> Result<bool, Self::Error>where
L: IntoFallibleLender<Error = Self::Error>,
Self::Lend: for<'all> PartialOrd<<<L as IntoFallibleLender>::FallibleLender as FallibleLending<'all>>::Lend>,
Self: Sized,
fn ge<L>(self, other: L) -> Result<bool, Self::Error>where
L: IntoFallibleLender<Error = Self::Error>,
Self::Lend: for<'all> PartialOrd<<<L as IntoFallibleLender>::FallibleLender as FallibleLending<'all>>::Lend>,
Self: Sized,
Source§fn iter<'this>(self) -> Iter<'this, Self> ⓘ
fn iter<'this>(self) -> Iter<'this, Self> ⓘ
Turns this
FallibleLender into a
FallibleIterator where it has
already fulfilled the requirements of the
FallibleIterator trait. Read moreSource§fn lender_by_ref<'this>(self) -> FromIterRef<Iter<'this, Self>>
fn lender_by_ref<'this>(self) -> FromIterRef<Iter<'this, Self>>
Turns this
FallibleLender into a new
FallibleLender that lends references to the items
of the original lender. Read moreSource§impl<'a, 'ctx, 'lend> FallibleLending<'lend> for RegisterEntries<'a, 'ctx>
impl<'a, 'ctx, 'lend> FallibleLending<'lend> for RegisterEntries<'a, 'ctx>
Source§type Lend = RegisterEntry<'lend, 'ctx>
type Lend = RegisterEntry<'lend, 'ctx>
The type being lent.
Auto Trait Implementations§
impl<'a, 'ctx> !RefUnwindSafe for RegisterEntries<'a, 'ctx>
impl<'a, 'ctx> !Send for RegisterEntries<'a, 'ctx>
impl<'a, 'ctx> !Sync for RegisterEntries<'a, 'ctx>
impl<'a, 'ctx> !UnwindSafe for RegisterEntries<'a, 'ctx>
impl<'a, 'ctx> Freeze for RegisterEntries<'a, 'ctx>
impl<'a, 'ctx> Unpin for RegisterEntries<'a, 'ctx>
impl<'a, 'ctx> UnsafeUnpin for RegisterEntries<'a, 'ctx>
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<L> IntoFallibleLender for Lwhere
L: FallibleLender,
impl<L> IntoFallibleLender for Lwhere
L: FallibleLender,
Source§type Error = <L as FallibleLender>::Error
type Error = <L as FallibleLender>::Error
The error type of the resulting fallible lender.
Source§type FallibleLender = L
type FallibleLender = L
The fallible lender type that this type converts into.
Source§fn into_fallible_lender(self) -> L
fn into_fallible_lender(self) -> L
Converts this type into a
FallibleLender.