pub struct Archive {
pub mc_block_ids: BTreeMap<u32, BlockId>,
pub blocks: FastHashMap<BlockId, ArchiveDataEntry>,
}Fields§
§mc_block_ids: BTreeMap<u32, BlockId>§blocks: FastHashMap<BlockId, ArchiveDataEntry>Implementations§
Source§impl Archive
impl Archive
pub fn new<T>(data: T) -> Result<Self>
pub fn check_mc_blocks_range(&self) -> Result<()>
Sourcepub async fn get_entry_by_id(
self: &Arc<Self>,
id: &BlockId,
) -> Result<(BlockStuffAug, BlockProofStuffAug, QueueDiffStuffAug), ArchiveError>
pub async fn get_entry_by_id( self: &Arc<Self>, id: &BlockId, ) -> Result<(BlockStuffAug, BlockProofStuffAug, QueueDiffStuffAug), ArchiveError>
NOTE: Takes up to a magnitude of seconds to run on large blocks.
Sourcepub fn get_block_by_id(
&self,
id: &BlockId,
) -> Result<BlockStuffAug, ArchiveError>
pub fn get_block_by_id( &self, id: &BlockId, ) -> Result<BlockStuffAug, ArchiveError>
NOTE: Takes up to a magnitude of seconds to run on large blocks.
pub fn get_proof_by_id( &self, id: &BlockId, ) -> Result<BlockProofStuffAug, ArchiveError>
pub fn get_queue_diff_by_id( &self, id: &BlockId, ) -> Result<QueueDiffStuffAug, ArchiveError>
Auto Trait Implementations§
impl Freeze for Archive
impl RefUnwindSafe for Archive
impl Send for Archive
impl Sync for Archive
impl Unpin for Archive
impl UnwindSafe for Archive
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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