pub struct Report { /* private fields */ }Expand description
One venue’s flow across a set of reroute results, onchain against rerouted, by trade direction.
Implementations§
Source§impl Report
impl Report
Sourcepub fn from_records<'a>(
target: Target,
records: impl IntoIterator<Item = &'a LegRecord>,
) -> Result<Self, RerouteReportError>
pub fn from_records<'a>( target: Target, records: impl IntoIterator<Item = &'a LegRecord>, ) -> Result<Self, RerouteReportError>
Build from anything that yields records — a mapped notification stream, a DB read.
Sourcepub const fn sol_usd(&self) -> Option<f64>
pub const fn sol_usd(&self) -> Option<f64>
The SOL price the records gave, in USD. None when they carried no SOL-USDC reroutes to
anchor on, in which case nothing is priced.
Sourcepub fn by_direction(&self) -> impl Iterator<Item = (&Pair, &Direction)>
pub fn by_direction(&self) -> impl Iterator<Item = (&Pair, &Direction)>
Every direction the range priced, which includes those the venue never served — filter
on Direction::present for the venue’s own.
Trait Implementations§
Auto Trait Implementations§
impl Forget for Report
impl Freeze for Report
impl Move for Report
impl RefUnwindSafe for Report
impl Send for Report
impl Sync for Report
impl Unpin for Report
impl UnsafeUnpin for Reportwhere
*const LeafNode<(String, String), Direction> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<((String, String), Direction)>>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
impl UnwindSafe for Report
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