pub struct QuoteData {
pub sell_token: Address,
pub buy_token: Address,
pub receiver: Option<Address>,
pub sell_amount: String,
pub buy_amount: String,
pub valid_to: u32,
pub app_data: String,
pub fee_amount: String,
pub kind: OrderKind,
pub partially_fillable: bool,
pub sell_token_balance: TokenBalance,
pub buy_token_balance: TokenBalance,
}Expand description
The core quote amounts returned by the orderbook.
Fields§
§sell_token: AddressToken to sell.
buy_token: AddressToken to buy.
receiver: Option<Address>Who receives the bought tokens.
sell_amount: StringAmount of sell_token to sell (after fee, in atoms).
buy_amount: StringMinimum amount of buy_token to receive (in atoms).
valid_to: u32Order expiry as Unix timestamp.
app_data: StringApp-data hash (bytes32 hex).
fee_amount: StringProtocol fee included in sell_amount (in atoms).
kind: OrderKindSell or buy.
partially_fillable: boolWhether the order may be partially filled.
sell_token_balance: TokenBalanceSource of sell funds.
buy_token_balance: TokenBalanceDestination of buy funds.
Implementations§
Source§impl QuoteData
impl QuoteData
Sourcepub const fn is_partially_fillable(&self) -> bool
pub const fn is_partially_fillable(&self) -> bool
Returns true if the order may be partially filled.
Sourcepub const fn has_receiver(&self) -> bool
pub const fn has_receiver(&self) -> bool
Returns true if a custom receiver address has been set.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for QuoteData
impl<'de> Deserialize<'de> for QuoteData
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<QuoteData, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<QuoteData, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for QuoteData
impl Serialize for QuoteData
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for QuoteData
impl RefUnwindSafe for QuoteData
impl Send for QuoteData
impl Sync for QuoteData
impl Unpin for QuoteData
impl UnsafeUnpin for QuoteData
impl UnwindSafe for QuoteData
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,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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 moreSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.