pub struct SplitOutcome { /* private fields */ }Expand description
{"type":"userOutcome","splitOutcome":{"outcome","amount"}}: amount of
the quote token into that many of each side. The amount goes as a decimal
with no trailing zeros, so 12.50 and 12.5 are one action.
Implementations§
Source§impl SplitOutcome
impl SplitOutcome
Sourcepub fn new(
outcome: u32,
amount_of_quote: Dec,
) -> Result<SplitOutcome, OutcomeError>
pub fn new( outcome: u32, amount_of_quote: Dec, ) -> Result<SplitOutcome, OutcomeError>
amount_of_quote of the quote token on outcome; refused when not positive or finer than
MAX_AMOUNT_PLACES places.
Trait Implementations§
Source§impl Clone for SplitOutcome
impl Clone for SplitOutcome
impl Copy for SplitOutcome
Source§impl Debug for SplitOutcome
impl Debug for SplitOutcome
impl Eq for SplitOutcome
Source§impl L1Action for SplitOutcome
impl L1Action for SplitOutcome
Source§fn action(&self) -> Map
fn action(&self) -> Map
The action’s keys and values in wire order, which is the hashed order.
Source§fn msgpack(&self) -> Vec<u8> ⓘ
fn msgpack(&self) -> Vec<u8> ⓘ
The action as msgpack bytes, the first part of the connection id’s hash.
Source§fn typed(
&self,
nonce: u64,
vault: Option<Address>,
network: Network,
) -> TypedStruct<'static>
fn typed( &self, nonce: u64, vault: Option<Address>, network: Network, ) -> TypedStruct<'static>
The phantom agent struct the key signs for this action.
Source§fn digest(
&self,
nonce: u64,
vault: Option<Address>,
network: Network,
) -> [u8; 32]
fn digest( &self, nonce: u64, vault: Option<Address>, network: Network, ) -> [u8; 32]
What the key signs for this action: the phantom agent’s digest under
Domain::EXCHANGE.Source§impl PartialEq for SplitOutcome
impl PartialEq for SplitOutcome
impl StructuralPartialEq for SplitOutcome
Auto Trait Implementations§
impl Forget for SplitOutcome
impl Freeze for SplitOutcome
impl Move for SplitOutcome
impl RefUnwindSafe for SplitOutcome
impl Send for SplitOutcome
impl Sync for SplitOutcome
impl Unpin for SplitOutcome
impl UnsafeUnpin for SplitOutcome
impl UnwindSafe for SplitOutcome
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.