[][src]Trait sunshine_util::traits::ReservableProfile

pub trait ReservableProfile<AccountId>: ShareBank<AccountId> {
    type ReservationContext: GetMagnitude<Self::Shares>;
    fn reserve(
        organization: u32,
        share_id: u32,
        who: &AccountId,
        amount: Option<Self::ReservationContext>
    ) -> Result<Self::ReservationContext, DispatchError>;
fn unreserve(
        organization: u32,
        share_id: u32,
        who: &AccountId,
        amount: Option<Self::ReservationContext>
    ) -> Result<Self::ReservationContext, DispatchError>; }

Reserve shares for an individual AccountId

Associated Types

Loading content...

Required methods

fn reserve(
    organization: u32,
    share_id: u32,
    who: &AccountId,
    amount: Option<Self::ReservationContext>
) -> Result<Self::ReservationContext, DispatchError>

Reserves amount iff certain conditions are met wrt existing profile and how it will change

fn unreserve(
    organization: u32,
    share_id: u32,
    who: &AccountId,
    amount: Option<Self::ReservationContext>
) -> Result<Self::ReservationContext, DispatchError>

Unreserves amount iff certain conditions are met wrt existing profile and how it will change

Loading content...

Implementors

Loading content...