pub struct Pool { /* private fields */ }Implementations§
Source§impl Pool
impl Pool
Sourcepub fn open(
path: impl AsRef<Path>,
budget: usize,
max_prepares: usize,
) -> Result<Self, String>
pub fn open( path: impl AsRef<Path>, budget: usize, max_prepares: usize, ) -> Result<Self, String>
budget bounds the estimated bytes of cached prepared blocks; one
block is always kept even if it alone exceeds the budget.
Sourcepub fn seal(&self, threads: usize) -> Result<Vec<Vec<[u8; 32]>>, String>
pub fn seal(&self, threads: usize) -> Result<Vec<Vec<[u8; 32]>>, String>
Checks every block in full, on up to threads threads, and returns
the seal: the digests of every block, in directory order.
Sourcepub fn set_seal(&mut self, seal: Vec<Vec<[u8; 32]>>) -> Result<(), String>
pub fn set_seal(&mut self, seal: Vec<Vec<[u8; 32]>>) -> Result<(), String>
Sets the seal from seal (as returned by seal for this archive). A
seal with the wrong number of digests is refused.
pub fn first(&self) -> Option<u32>
Sourcepub fn cached_bytes(&self) -> usize
pub fn cached_bytes(&self) -> usize
Bytes of cached prepared blocks and remembered transaction hashes.
Sourcepub fn block_id(&self, seq: u32) -> Result<usize, String>
pub fn block_id(&self, seq: u32) -> Result<usize, String>
Index of the block holding ledger seq: callers group reads by it.
pub fn ledger(&self, seq: u32) -> Result<Row, String>
Sourcepub fn ledger_txs(&self, seq: u32) -> Result<Row, String>
pub fn ledger_txs(&self, seq: u32) -> Result<Row, String>
Ledger seq with transactions but no patches (patches is empty).
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Pool
impl RefUnwindSafe for Pool
impl Send for Pool
impl Sync for Pool
impl Unpin for Pool
impl UnsafeUnpin for Pool
impl UnwindSafe for Pool
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