pub struct LatestVersionResolver;Expand description
Picks the candidate with the highest version field.
If two candidates share the same version the one with the lower chain ID wins, giving a deterministic tie-break.
Trait Implementations§
Source§impl ConflictResolver for LatestVersionResolver
impl ConflictResolver for LatestVersionResolver
Source§fn resolve<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 StateKey,
candidates: Vec<(ChainId, StateValue)>,
) -> Pin<Box<dyn Future<Output = Result<StateValue>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn resolve<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 StateKey,
candidates: Vec<(ChainId, StateValue)>,
) -> Pin<Box<dyn Future<Output = Result<StateValue>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Reduce
candidates (one value per chain) to a single resolved StateValue.Auto Trait Implementations§
impl Freeze for LatestVersionResolver
impl RefUnwindSafe for LatestVersionResolver
impl Send for LatestVersionResolver
impl Sync for LatestVersionResolver
impl Unpin for LatestVersionResolver
impl UnsafeUnpin for LatestVersionResolver
impl UnwindSafe for LatestVersionResolver
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