Struct osmosis_std::types::osmosis::lockup::PeriodLock
source · pub struct PeriodLock {
pub id: u64,
pub owner: String,
pub duration: Option<Duration>,
pub end_time: Option<Timestamp>,
pub coins: Vec<Coin>,
pub reward_receiver_address: String,
}Expand description
PeriodLock is a single lock unit by period defined by the x/lockup module.
It’s a record of a locked coin at a specific time. It stores owner, duration,
unlock time and the number of coins locked. A state of a period lock is
created upon lock creation, and deleted once the lock has been matured after
the duration has passed since unbonding started.
Fields§
§id: u64ID is the unique id of the lock. The ID of the lock is decided upon lock creation, incrementing by 1 for every lock.
owner: StringOwner is the account address of the lock owner. Only the owner can modify the state of the lock.
duration: Option<Duration>Duration is the time needed for a lock to mature after unlocking has started.
end_time: Option<Timestamp>EndTime refers to the time at which the lock would mature and get deleted. This value is first initialized when an unlock has started for the lock, end time being block time + duration.
coins: Vec<Coin>Coins are the tokens locked within the lock, kept in the module account.
reward_receiver_address: StringReward Receiver Address is the address that would be receiving rewards for the incentives for the lock. This is set to owner by default and can be changed via separate msg.
Implementations§
Trait Implementations§
source§impl Clone for PeriodLock
impl Clone for PeriodLock
source§fn clone(&self) -> PeriodLock
fn clone(&self) -> PeriodLock
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for PeriodLock
impl Debug for PeriodLock
source§impl Default for PeriodLock
impl Default for PeriodLock
source§impl<'de> Deserialize<'de> for PeriodLock
impl<'de> Deserialize<'de> for PeriodLock
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<PeriodLock> for Binary
impl From<PeriodLock> for Binary
source§fn from(msg: PeriodLock) -> Self
fn from(msg: PeriodLock) -> Self
source§impl<T> From<PeriodLock> for CosmosMsg<T>
impl<T> From<PeriodLock> for CosmosMsg<T>
source§fn from(msg: PeriodLock) -> Self
fn from(msg: PeriodLock) -> Self
source§impl JsonSchema for PeriodLock
impl JsonSchema for PeriodLock
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(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref keyword. Read moresource§impl Message for PeriodLock
impl Message for PeriodLock
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
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<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
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<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
fn decode<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
self. Read moresource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
self.source§impl PartialEq for PeriodLock
impl PartialEq for PeriodLock
source§fn eq(&self, other: &PeriodLock) -> bool
fn eq(&self, other: &PeriodLock) -> bool
self and other values to be equal, and is used
by ==.source§impl Serialize for PeriodLock
impl Serialize for PeriodLock
source§impl TryFrom<Binary> for PeriodLock
impl TryFrom<Binary> for PeriodLock
source§impl TryFrom<SubMsgResult> for PeriodLock
impl TryFrom<SubMsgResult> for PeriodLock
impl Eq for PeriodLock
impl StructuralEq for PeriodLock
impl StructuralPartialEq for PeriodLock
Auto Trait Implementations§
impl RefUnwindSafe for PeriodLock
impl Send for PeriodLock
impl Sync for PeriodLock
impl Unpin for PeriodLock
impl UnwindSafe for PeriodLock
Blanket Implementations§
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
fn as_<T>(self) -> Twhere
T: CastFrom<U>,
self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. Read more