pub struct RouteHop {
pub leg: Option<u32>,
pub percent: u64,
pub program: Option<String>,
pub bps: Option<u64>,
pub swap_info: RouteHopSwapInfo,
}Expand description
One hop of a route: a swap through one venue. Wire keys are camelCase.
Fields§
§leg: Option<u32>Execution order, from a decoded transaction; the router’s plan is ordered but unnumbered.
percent: u64Share of the trade this hop carries, out of 100. Defaults to FULL_PERCENT.
program: Option<String>The venue program’s address, base58. Set by a decoded transaction, where the router sets
RouteHopSwapInfo::amm_key.
bps: Option<u64>Sent by the router, null in everything observed.
swap_info: RouteHopSwapInfoThe venue, pool, mints and amounts.
Implementations§
Trait Implementations§
Source§impl Default for RouteHop
percent starts at FULL_PERCENT: a hop is the whole trade unless a split says otherwise.
impl Default for RouteHop
percent starts at FULL_PERCENT: a hop is the whole trade unless a split says otherwise.
Source§impl<'de> Deserialize<'de> for RouteHop
impl<'de> Deserialize<'de> for RouteHop
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
impl Eq for RouteHop
impl StructuralPartialEq for RouteHop
Auto Trait Implementations§
impl Forget for RouteHop
impl Freeze for RouteHop
impl Move for RouteHop
impl RefUnwindSafe for RouteHop
impl Send for RouteHopwhere
RawVecInner: Send,
impl Sync for RouteHopwhere
RawVecInner: Sync,
impl Unpin for RouteHop
impl UnsafeUnpin for RouteHop
impl UnwindSafe for RouteHopwhere
RawVecInner: 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