pub struct Outcome<T> {
pub price: f64,
pub trade: f64,
pub data: Option<T>,
}Expand description
An outcome represents the result of an auction for a particular auth or product.
An outcome contains:
- A
priceat which the asset was cleared in the auction - A
tradeamount representing the quantity that was traded - Optional implementation-dependent
datafor additional context
The sign convention for trades follows the flow trading standard:
- Positive values indicate buying
- Negative values indicate selling
Fields§
§price: f64The clearing price determined by the auction solver
trade: f64The trade amount (positive for buying, negative for selling)
data: Option<T>Optional implementation-specific data related to the outcome
Trait Implementations§
Source§impl<'de, T> Deserialize<'de> for Outcome<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for Outcome<T>where
T: Deserialize<'de>,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl<T> Freeze for Outcome<T>where
T: Freeze,
impl<T> RefUnwindSafe for Outcome<T>where
T: RefUnwindSafe,
impl<T> Send for Outcome<T>where
T: Send,
impl<T> Sync for Outcome<T>where
T: Sync,
impl<T> Unpin for Outcome<T>where
T: Unpin,
impl<T> UnwindSafe for Outcome<T>where
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> 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