[][src]Struct cw_controllers::Claims

pub struct Claims<'a>(_);

Implementations

impl<'a> Claims<'a>[src]

pub const fn new(storage_key: &'a str) -> Self[src]

pub fn create_claim(
    &self,
    storage: &mut dyn Storage,
    addr: &CanonicalAddr,
    amount: Uint128,
    release_at: Expiration
) -> StdResult<()>
[src]

This creates a claim, such that the given address can claim an amount of tokens after the release date.

pub fn claim_tokens(
    &self,
    storage: &mut dyn Storage,
    addr: &CanonicalAddr,
    block: &BlockInfo,
    cap: Option<Uint128>
) -> StdResult<Uint128>
[src]

This iterates over all mature claims for the address, and removes them, up to an optional cap. it removes the finished claims and returns the total amount of tokens to be released.

pub fn query_claims(
    &self,
    deps: Deps<'_>,
    address: HumanAddr
) -> StdResult<ClaimsResponse>
[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for Claims<'a>[src]

impl<'a> Send for Claims<'a>[src]

impl<'a> Sync for Claims<'a>[src]

impl<'a> Unpin for Claims<'a>[src]

impl<'a> UnwindSafe for Claims<'a>[src]

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> From<T> for T[src]

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

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.