Struct orml_oracle::DefaultCombineData
source · pub struct DefaultCombineData<T, MinimumCount, ExpiresIn, I = ()>(/* private fields */);
Expand description
Sort by value and returns median timestamped value. Returns prev_value if not enough valid values.
Trait Implementations§
source§impl<T, I, MinimumCount, ExpiresIn> CombineData<<T as Config<I>>::OracleKey, TimestampedValue<<T as Config<I>>::OracleValue, <<T as Config<I>>::Time as Time>::Moment>> for DefaultCombineData<T, MinimumCount, ExpiresIn, I>where
T: Config<I>,
I: 'static,
MinimumCount: Get<u32>,
ExpiresIn: Get<<<T as Config<I>>::Time as Time>::Moment>,
impl<T, I, MinimumCount, ExpiresIn> CombineData<<T as Config<I>>::OracleKey, TimestampedValue<<T as Config<I>>::OracleValue, <<T as Config<I>>::Time as Time>::Moment>> for DefaultCombineData<T, MinimumCount, ExpiresIn, I>where T: Config<I>, I: 'static, MinimumCount: Get<u32>, ExpiresIn: Get<<<T as Config<I>>::Time as Time>::Moment>,
source§fn combine_data(
_key: &<T as Config<I>>::OracleKey,
values: Vec<TimestampedValue<<T as Config<I>>::OracleValue, <<T as Config<I>>::Time as Time>::Moment>>,
prev_value: Option<TimestampedValue<<T as Config<I>>::OracleValue, <<T as Config<I>>::Time as Time>::Moment>>
) -> Option<TimestampedValue<<T as Config<I>>::OracleValue, <<T as Config<I>>::Time as Time>::Moment>>
fn combine_data( _key: &<T as Config<I>>::OracleKey, values: Vec<TimestampedValue<<T as Config<I>>::OracleValue, <<T as Config<I>>::Time as Time>::Moment>>, prev_value: Option<TimestampedValue<<T as Config<I>>::OracleValue, <<T as Config<I>>::Time as Time>::Moment>> ) -> Option<TimestampedValue<<T as Config<I>>::OracleValue, <<T as Config<I>>::Time as Time>::Moment>>
Combine data provided by operators
Auto Trait Implementations§
impl<T, MinimumCount, ExpiresIn, I> RefUnwindSafe for DefaultCombineData<T, MinimumCount, ExpiresIn, I>where ExpiresIn: RefUnwindSafe, I: RefUnwindSafe, MinimumCount: RefUnwindSafe, T: RefUnwindSafe,
impl<T, MinimumCount, ExpiresIn, I> Send for DefaultCombineData<T, MinimumCount, ExpiresIn, I>where ExpiresIn: Send, I: Send, MinimumCount: Send, T: Send,
impl<T, MinimumCount, ExpiresIn, I> Sync for DefaultCombineData<T, MinimumCount, ExpiresIn, I>where ExpiresIn: Sync, I: Sync, MinimumCount: Sync, T: Sync,
impl<T, MinimumCount, ExpiresIn, I> Unpin for DefaultCombineData<T, MinimumCount, ExpiresIn, I>where ExpiresIn: Unpin, I: Unpin, MinimumCount: Unpin, T: Unpin,
impl<T, MinimumCount, ExpiresIn, I> UnwindSafe for DefaultCombineData<T, MinimumCount, ExpiresIn, I>where ExpiresIn: UnwindSafe, I: UnwindSafe, MinimumCount: UnwindSafe, T: 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
source§impl<T> CheckedConversion for T
impl<T> CheckedConversion for T
§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>
§impl<T> SaturatedConversion for T
impl<T> SaturatedConversion for T
§fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
fn saturated_from<T>(t: T) -> Selfwhere Self: UniqueSaturatedFrom<T>,
§fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
fn saturated_into<T>(self) -> Twhere Self: UniqueSaturatedInto<T>,
Consume self to return an equivalent value of
T
. Read more§impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for Swhere T: UncheckedFrom<S>,
§fn unchecked_into(self) -> T
fn unchecked_into(self) -> T
The counterpart to
unchecked_from
.§impl<T, S> UniqueSaturatedInto<T> for Swhere
T: Bounded,
S: TryInto<T>,
impl<T, S> UniqueSaturatedInto<T> for Swhere T: Bounded, S: TryInto<T>,
§fn unique_saturated_into(self) -> T
fn unique_saturated_into(self) -> T
Consume self to return an equivalent value of
T
.