pub struct ChainStateBuilder<PersistedState: ChainStore> { /* private fields */ }
Implementations§
source§impl<T: ChainStore> ChainStateBuilder<T>
impl<T: ChainStore> ChainStateBuilder<T>
pub fn new() -> Self
pub fn build(self) -> Result<ChainState<T>, BlockchainBuilderError>
pub fn with_chainstore(self, chainstore: T) -> Self
pub fn toggle_ibd(self, ibd: bool) -> Self
pub fn with_chain_params(self, chain_params: ChainParams) -> Self
pub fn with_assume_valid(self, assume_valid: BlockHash) -> Self
pub fn assume_utreexo(self, acc: Stump) -> Self
pub fn with_tip(self, tip: (BlockHash, u32), header: BlockHeader) -> Self
pub fn acc(&self) -> Stump
pub fn chainstore(&mut self) -> T
pub fn ibd(&self) -> bool
pub fn chain_params(&self) -> ChainParams
pub fn best_block(&self) -> BestChain
pub fn assume_valid(&self) -> Option<BlockHash>
Trait Implementations§
source§impl<PersistedState: Clone + ChainStore> Clone for ChainStateBuilder<PersistedState>
impl<PersistedState: Clone + ChainStore> Clone for ChainStateBuilder<PersistedState>
source§fn clone(&self) -> ChainStateBuilder<PersistedState>
fn clone(&self) -> ChainStateBuilder<PersistedState>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<PersistedState: Debug + ChainStore> Debug for ChainStateBuilder<PersistedState>
impl<PersistedState: Debug + ChainStore> Debug for ChainStateBuilder<PersistedState>
source§impl<PersistedState: Default + ChainStore> Default for ChainStateBuilder<PersistedState>
impl<PersistedState: Default + ChainStore> Default for ChainStateBuilder<PersistedState>
source§fn default() -> ChainStateBuilder<PersistedState>
fn default() -> ChainStateBuilder<PersistedState>
Returns the “default value” for a type. Read more
source§impl<T: ChainStore> From<ChainStateBuilder<T>> for ChainState<T>
impl<T: ChainStore> From<ChainStateBuilder<T>> for ChainState<T>
source§fn from(builder: ChainStateBuilder<T>) -> Self
fn from(builder: ChainStateBuilder<T>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<PersistedState> RefUnwindSafe for ChainStateBuilder<PersistedState>where PersistedState: RefUnwindSafe,
impl<PersistedState> Send for ChainStateBuilder<PersistedState>where PersistedState: Send,
impl<PersistedState> Sync for ChainStateBuilder<PersistedState>where PersistedState: Sync,
impl<PersistedState> Unpin for ChainStateBuilder<PersistedState>where PersistedState: Unpin,
impl<PersistedState> UnwindSafe for ChainStateBuilder<PersistedState>where PersistedState: UnwindSafe,
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