pub enum DepthKind {
OnchainSlot,
OnchainOracle,
RouterSlot,
}Expand description
A depth dataset: a source at a granularity it can be measured at.
Variants§
OnchainSlot
On-chain depth sampled every slot.
OnchainOracle
On-chain depth sampled at oracle updates.
RouterSlot
Router depth sampled every slot.
Implementations§
Source§impl DepthKind
impl DepthKind
Sourcepub const fn source(self) -> DepthSource
pub const fn source(self) -> DepthSource
The source measured.
Sourcepub const fn granularity(self) -> DepthGranularity
pub const fn granularity(self) -> DepthGranularity
When the source is sampled.
Trait Implementations§
impl Copy for DepthKind
Source§impl<'de> Deserialize<'de> for DepthKind
impl<'de> Deserialize<'de> for DepthKind
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 DepthKind
impl StructuralPartialEq for DepthKind
Source§impl TryFrom<(DepthSource, DepthGranularity)> for DepthKind
impl TryFrom<(DepthSource, DepthGranularity)> for DepthKind
Source§type Error = UnmeasuredDepth
type Error = UnmeasuredDepth
The type returned in the event of a conversion error.
Source§fn try_from(
(source, granularity): (DepthSource, DepthGranularity),
) -> Result<Self, Self::Error>
fn try_from( (source, granularity): (DepthSource, DepthGranularity), ) -> Result<Self, Self::Error>
Performs the conversion.
Auto Trait Implementations§
impl Forget for DepthKind
impl Freeze for DepthKind
impl Move for DepthKind
impl RefUnwindSafe for DepthKind
impl Send for DepthKind
impl Sync for DepthKind
impl Unpin for DepthKind
impl UnsafeUnpin for DepthKind
impl UnwindSafe for DepthKind
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