pub struct QueryCondition {
pub lock_query_type: i32,
pub denom: String,
pub duration: Option<Duration>,
pub timestamp: Option<Timestamp>,
}Expand description
QueryCondition is a struct used for querying locks upon different conditions. Duration field and timestamp fields could be optional, depending on the LockQueryType.
Fields§
§lock_query_type: i32LockQueryType is a type of lock query, ByLockDuration | ByLockTime
denom: StringDenom represents the token denomination we are looking to lock up
duration: Option<Duration>Duration is used to query locks with longer duration than the specified
duration. Duration field must not be nil when the lock query type is
ByLockDuration.
timestamp: Option<Timestamp>Timestamp is used by locks started before the specified duration.
Timestamp field must not be nil when the lock query type is ByLockTime.
Querying locks with timestamp is currently not implemented.
Implementations§
Source§impl QueryCondition
impl QueryCondition
Sourcepub fn lock_query_type(&self) -> LockQueryType
pub fn lock_query_type(&self) -> LockQueryType
Returns the enum value of lock_query_type, or the default if the field is set to an invalid enum value.
Sourcepub fn set_lock_query_type(&mut self, value: LockQueryType)
pub fn set_lock_query_type(&mut self, value: LockQueryType)
Sets lock_query_type to the provided enum value.
Trait Implementations§
Source§impl Clone for QueryCondition
impl Clone for QueryCondition
Source§fn clone(&self) -> QueryCondition
fn clone(&self) -> QueryCondition
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for QueryCondition
impl Debug for QueryCondition
Source§impl Default for QueryCondition
impl Default for QueryCondition
Source§impl<'de> Deserialize<'de> for QueryCondition
impl<'de> Deserialize<'de> for QueryCondition
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>,
Source§impl From<QueryCondition> for Binary
impl From<QueryCondition> for Binary
Source§fn from(msg: QueryCondition) -> Self
fn from(msg: QueryCondition) -> Self
Source§impl<T> From<QueryCondition> for CosmosMsg<T>
impl<T> From<QueryCondition> for CosmosMsg<T>
Source§fn from(msg: QueryCondition) -> Self
fn from(msg: QueryCondition) -> Self
Source§impl JsonSchema for QueryCondition
impl JsonSchema for QueryCondition
Source§fn schema_name() -> String
fn schema_name() -> String
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref keyword. Read moreSource§impl Message for QueryCondition
impl Message for QueryCondition
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.Source§impl PartialEq for QueryCondition
impl PartialEq for QueryCondition
Source§impl Serialize for QueryCondition
impl Serialize for QueryCondition
Source§impl TryFrom<Binary> for QueryCondition
impl TryFrom<Binary> for QueryCondition
Source§impl TryFrom<SubMsgResult> for QueryCondition
impl TryFrom<SubMsgResult> for QueryCondition
impl Eq for QueryCondition
impl StructuralPartialEq for QueryCondition
Auto Trait Implementations§
impl Freeze for QueryCondition
impl RefUnwindSafe for QueryCondition
impl Send for QueryCondition
impl Sync for QueryCondition
impl Unpin for QueryCondition
impl UnwindSafe for QueryCondition
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
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§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more