#[non_exhaustive]pub enum StakingTarget {
Contract(Addr),
Id(u64),
}Expand description
Possible staking targets to support staking on cosmwasm contract or cosmos Lockup module
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Contract(Addr)
Address of the staking contract (Cosmwasm)
Id(u64)
Pool id of the staking contract (Osmosis)
Implementations§
Source§impl StakingTarget
impl StakingTarget
Sourcepub fn expect_contract(self) -> AbstractResult<Addr>
pub fn expect_contract(self) -> AbstractResult<Addr>
Extract contract address
Sourcepub fn expect_id(self) -> AbstractResult<u64>
pub fn expect_id(self) -> AbstractResult<u64>
Extract pool id
Trait Implementations§
Source§impl Clone for StakingTarget
impl Clone for StakingTarget
Source§impl Debug for StakingTarget
impl Debug for StakingTarget
Source§impl<'de> Deserialize<'de> for StakingTarget
impl<'de> Deserialize<'de> for StakingTarget
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 From<Addr> for StakingTarget
impl From<Addr> for StakingTarget
Source§impl From<u64> for StakingTarget
impl From<u64> for StakingTarget
Source§impl JsonSchema for StakingTarget
impl JsonSchema for StakingTarget
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for StakingTarget
impl PartialEq for StakingTarget
Source§impl Serialize for StakingTarget
impl Serialize for StakingTarget
impl StructuralPartialEq for StakingTarget
Auto Trait Implementations§
impl Freeze for StakingTarget
impl RefUnwindSafe for StakingTarget
impl Send for StakingTarget
impl Sync for StakingTarget
impl Unpin for StakingTarget
impl UnsafeUnpin for StakingTarget
impl UnwindSafe for StakingTarget
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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