pub struct ConfigValidator;Expand description
Validates that a proposed IndexerConfig update is safe to apply.
Implementations§
Source§impl ConfigValidator
impl ConfigValidator
Sourcepub fn validate(
old: &IndexerConfig,
new: &IndexerConfig,
) -> Result<Vec<ConfigWarning>, IndexerError>
pub fn validate( old: &IndexerConfig, new: &IndexerConfig, ) -> Result<Vec<ConfigWarning>, IndexerError>
Validate the transition from old to new.
Returns Ok(warnings) when the change is permitted (possibly with
advisory warnings), or Err(IndexerError) when the change is rejected
outright (breaking change).
Sourcepub fn is_safe_reload(old: &IndexerConfig, new: &IndexerConfig) -> bool
pub fn is_safe_reload(old: &IndexerConfig, new: &IndexerConfig) -> bool
Returns true when the transition from old to new contains no
breaking changes (i.e. validate would succeed with no Critical
warnings).
Auto Trait Implementations§
impl Freeze for ConfigValidator
impl RefUnwindSafe for ConfigValidator
impl Send for ConfigValidator
impl Sync for ConfigValidator
impl Unpin for ConfigValidator
impl UnsafeUnpin for ConfigValidator
impl UnwindSafe for ConfigValidator
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