pub enum DepthSource {
Onchain,
Router,
}Expand description
Which side of a venue a depth run measures.
The two sources publish separate datasets over the same range, so this picks the dataset as much as the measurement.
Variants§
Onchain
What the venues’ own on-chain liquidity would have filled.
Router
What Jupiter Metis would have quoted.
Implementations§
Source§impl DepthSource
impl DepthSource
Sourcepub const fn as_str(self) -> &'static str
pub const fn as_str(self) -> &'static str
Stable string form matching the serde wire representation.
Sourcepub fn from_str_opt(value: &str) -> Option<Self>
pub fn from_str_opt(value: &str) -> Option<Self>
Inverse of Self::as_str; returns None for an unrecognized value.
Sourcepub const fn discriminant(self) -> u8
pub const fn discriminant(self) -> u8
A frozen identity for hashing, deliberately divorced from Self::as_str.
Request ids are derived from it, so renaming what callers see must never move them, or a resubmit of the same measurement would trigger a second run they pay for again.
Trait Implementations§
Source§impl Clone for DepthSource
impl Clone for DepthSource
impl Copy for DepthSource
Source§impl Debug for DepthSource
impl Debug for DepthSource
Source§impl Default for DepthSource
impl Default for DepthSource
Source§impl<'de> Deserialize<'de> for DepthSource
impl<'de> Deserialize<'de> for DepthSource
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
Source§impl Display for DepthSource
impl Display for DepthSource
impl Eq for DepthSource
Source§impl PartialEq for DepthSource
impl PartialEq for DepthSource
Source§impl Serialize for DepthSource
impl Serialize for DepthSource
impl StructuralPartialEq for DepthSource
Auto Trait Implementations§
impl Freeze for DepthSource
impl RefUnwindSafe for DepthSource
impl Send for DepthSource
impl Sync for DepthSource
impl Unpin for DepthSource
impl UnsafeUnpin for DepthSource
impl UnwindSafe for DepthSource
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