MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / new

Method new

atomic-repository/src/history/iter.rs:37–58  ·  view source on GitHub ↗

Create a new history iterator.

(
        txn: &'a T,
        view: ViewState,
        inner: Box<
            dyn Iterator<
                    Item = Result<
                        (u64, atomic_core::types::NodeId, atomic_core::t

Source from the content-addressed store, hash-verified

35impl<'a, T: ViewTxnT> HistoryIter<'a, T> {
36 /// Create a new history iterator.
37 pub(crate) fn new(
38 txn: &'a T,
39 view: ViewState,
40 inner: Box<
41 dyn Iterator<
42 Item = Result<
43 (u64, atomic_core::types::NodeId, atomic_core::types::Merkle),
44 atomic_core::pristine::PristineError,
45 >,
46 > + 'a,
47 >,
48 options: &HistoryOptions,
49 ) -> Self {
50 Self {
51 txn,
52 view,
53 inner,
54 limit: options.limit,
55 count: 0,
56 load_headers: options.load_headers,
57 }
58 }
59
60 /// Get the view being iterated.
61 pub fn view(&self) -> &ViewState {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected