pub struct State {
pub id: UID,
pub governance_data_source: DataSource,
pub stale_price_threshold: u64,
pub base_update_fee: u64,
pub fee_recipient_address: Address,
pub last_executed_governance_sequence: u64,
pub consumed_vaas: ConsumedVAAs,
pub upgrade_cap: UpgradeCap,
}
Fields§
§id: UID
§governance_data_source: DataSource
§stale_price_threshold: u64
§base_update_fee: u64
§fee_recipient_address: Address
§last_executed_governance_sequence: u64
§consumed_vaas: ConsumedVAAs
§upgrade_cap: UpgradeCap
Implementations§
Source§impl State
impl State
Sourcepub fn new(
id: UID,
governance_data_source: DataSource,
stale_price_threshold: u64,
base_update_fee: u64,
fee_recipient_address: Address,
last_executed_governance_sequence: u64,
consumed_vaas: ConsumedVAAs,
upgrade_cap: UpgradeCap,
) -> Self
pub fn new( id: UID, governance_data_source: DataSource, stale_price_threshold: u64, base_update_fee: u64, fee_recipient_address: Address, last_executed_governance_sequence: u64, consumed_vaas: ConsumedVAAs, upgrade_cap: UpgradeCap, ) -> Self
Constructs a new State
.
Source§impl State
impl State
pub fn move_instance(self, address: Address) -> MoveInstance<Self>
pub fn type_(address: Address) -> StateTypeTag
Trait Implementations§
Source§impl<'de> Deserialize<'de> for State
impl<'de> Deserialize<'de> for State
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 MoveStruct for State
impl MoveStruct for State
type StructTag = StateTypeTag
Source§impl MoveType for State
impl MoveType for State
Source§impl StaticModule for State
impl StaticModule for State
fn module() -> Identifier
Source§impl StaticName for State
impl StaticName for State
fn name() -> Identifier
Source§impl StaticTypeParams for State
impl StaticTypeParams for State
fn type_params() -> Vec<TypeTag>
impl Eq for State
impl StructuralPartialEq for State
Auto Trait Implementations§
impl Freeze for State
impl RefUnwindSafe for State
impl Send for State
impl Sync for State
impl Unpin for State
impl UnwindSafe for State
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.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
Converts
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>
Converts
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