pub enum CreateObjectMappings {
Block(NonZeroU64),
Yes,
No,
}Expand description
Whether to create object mappings.
Variants§
Block(NonZeroU64)
Start creating object mappings from this block number.
This can be lower than the latest archived block, but must be greater than genesis.
The genesis block doesn’t have mappings, so starting mappings at genesis is pointless. The archiver will fail if it can’t get the data for this block, but snap sync doesn’t store the genesis data on disk. So avoiding genesis also avoids this error. https://github.com/paritytech/polkadot-sdk/issues/5366
Yes
Create object mappings as archiving is happening
No
Don’t create object mappings
Implementations§
Source§impl CreateObjectMappings
impl CreateObjectMappings
Sourcepub fn is_enabled(&self) -> bool
pub fn is_enabled(&self) -> bool
Returns true if object mappings will be created from a past or future block.
Sourcepub fn is_enabled_for_block(&self, block: BlockNumber) -> bool
pub fn is_enabled_for_block(&self, block: BlockNumber) -> bool
Does the supplied block number need object mappings?
Trait Implementations§
Source§impl Clone for CreateObjectMappings
impl Clone for CreateObjectMappings
Source§fn clone(&self) -> CreateObjectMappings
fn clone(&self) -> CreateObjectMappings
Returns a duplicate 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 Debug for CreateObjectMappings
impl Debug for CreateObjectMappings
Source§impl Default for CreateObjectMappings
impl Default for CreateObjectMappings
Source§fn default() -> CreateObjectMappings
fn default() -> CreateObjectMappings
Returns the “default value” for a type. Read more
Source§impl PartialEq for CreateObjectMappings
impl PartialEq for CreateObjectMappings
impl Copy for CreateObjectMappings
impl Eq for CreateObjectMappings
impl StructuralPartialEq for CreateObjectMappings
Auto Trait Implementations§
impl Freeze for CreateObjectMappings
impl RefUnwindSafe for CreateObjectMappings
impl Send for CreateObjectMappings
impl Sync for CreateObjectMappings
impl Unpin for CreateObjectMappings
impl UnwindSafe for CreateObjectMappings
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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