pub struct VersionParam {
pub timestamp: Option<NaiveDateTime>,
pub block: Option<BlockParam>,
}Expand description
The version of the requested state, given as either a timestamp or a block.
If block is provided, the state at that exact block is returned. Will error if the block has not been processed yet. If timestamp is provided, the state at the latest block before that timestamp is returned. Defaults to the current time.
Fields§
§timestamp: Option<NaiveDateTime>§block: Option<BlockParam>Implementations§
Source§impl VersionParam
impl VersionParam
pub fn new(timestamp: Option<NaiveDateTime>, block: Option<BlockParam>) -> Self
Trait Implementations§
Source§impl Clone for VersionParam
impl Clone for VersionParam
Source§fn clone(&self) -> VersionParam
fn clone(&self) -> VersionParam
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for VersionParam
impl Debug for VersionParam
Source§impl Default for VersionParam
impl Default for VersionParam
Source§impl<'de> Deserialize<'de> for VersionParam
impl<'de> Deserialize<'de> for VersionParam
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 Hash for VersionParam
impl Hash for VersionParam
Source§impl PartialEq for VersionParam
impl PartialEq for VersionParam
Source§impl Serialize for VersionParam
impl Serialize for VersionParam
Source§impl<'__s> ToSchema<'__s> for VersionParam
impl<'__s> ToSchema<'__s> for VersionParam
Source§impl TryFrom<&VersionParam> for BlockOrTimestamp
impl TryFrom<&VersionParam> for BlockOrTimestamp
impl Eq for VersionParam
impl StructuralPartialEq for VersionParam
Auto Trait Implementations§
impl !Freeze for VersionParam
impl RefUnwindSafe for VersionParam
impl Send for VersionParam
impl Sync for VersionParam
impl Unpin for VersionParam
impl UnwindSafe for VersionParam
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
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.