[][src]Struct cw4::Cw4Contract

pub struct Cw4Contract(pub HumanAddr);

Cw4Contract is a wrapper around HumanAddr that provides a lot of helpers for working with cw4 contracts

If you wish to persist this, convert to Cw4CanonicalContract via .canonical()

Implementations

impl Cw4Contract[src]

pub fn addr(&self) -> HumanAddr[src]

pub fn canonical<A: Api>(&self, api: &A) -> StdResult<Cw4CanonicalContract>[src]

Convert this address to a form fit for storage

pub fn update_admin<T: Into<HumanAddr>>(
    &self,
    admin: Option<HumanAddr>
) -> StdResult<CosmosMsg>
[src]

pub fn update_members(
    &self,
    remove: Vec<HumanAddr>,
    add: Vec<Member>
) -> StdResult<CosmosMsg>
[src]

pub fn admin<Q: Querier>(&self, querier: &Q) -> StdResult<Option<HumanAddr>>[src]

Read the admin

pub fn total_weight<Q: Querier>(&self, querier: &Q) -> StdResult<u64>[src]

Read the total weight

pub fn is_member<Q: Querier, T: Into<CanonicalAddr>>(
    &self,
    querier: &Q,
    addr: T
) -> StdResult<Option<u64>>
[src]

Check if this address is a member, and if so, with which weight

pub fn list_members<Q: Querier>(
    &self,
    querier: &Q,
    start_after: Option<HumanAddr>,
    limit: Option<u32>
) -> StdResult<Vec<Member>>
[src]

Trait Implementations

impl Clone for Cw4Contract[src]

impl Debug for Cw4Contract[src]

impl<'de> Deserialize<'de> for Cw4Contract[src]

impl JsonSchema for Cw4Contract[src]

impl PartialEq<Cw4Contract> for Cw4Contract[src]

impl Serialize for Cw4Contract[src]

impl StructuralPartialEq for Cw4Contract[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.