[][src]Struct frame_support::traits::WithdrawReasons

pub struct WithdrawReasons { /* fields omitted */ }

Reasons for moving funds out of an account.

Implementations

impl WithdrawReasons[src]

pub const TRANSACTION_PAYMENT: WithdrawReasons[src]

In order to pay for (system) transaction costs.

pub const TRANSFER: WithdrawReasons[src]

In order to transfer ownership.

pub const RESERVE: WithdrawReasons[src]

In order to reserve some funds for a later return or repatriation.

pub const FEE: WithdrawReasons[src]

In order to pay some other (higher-level) fees.

pub const TIP: WithdrawReasons[src]

In order to tip a validator for transaction inclusion.

pub const fn empty() -> WithdrawReasons[src]

Returns an empty set of flags

pub const fn all() -> WithdrawReasons[src]

Returns the set containing all flags.

pub const fn bits(&self) -> i8[src]

Returns the raw value of the flags currently stored.

pub fn from_bits(bits: i8) -> Option<WithdrawReasons>[src]

Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.

pub const fn from_bits_truncate(bits: i8) -> WithdrawReasons[src]

Convert from underlying bit representation, dropping any bits that do not correspond to flags.

pub const unsafe fn from_bits_unchecked(bits: i8) -> WithdrawReasons[src]

Convert from underlying bit representation, preserving all bits (even those not corresponding to a defined flag).

pub const fn is_empty(&self) -> bool[src]

Returns true if no flags are currently stored.

pub const fn is_all(&self) -> bool[src]

Returns true if all flags are currently set.

pub const fn intersects(&self, other: WithdrawReasons) -> bool[src]

Returns true if there are flags common to both self and other.

pub const fn contains(&self, other: WithdrawReasons) -> bool[src]

Returns true all of the flags in other are contained within self.

pub fn insert(&mut self, other: WithdrawReasons)[src]

Inserts the specified flags in-place.

pub fn remove(&mut self, other: WithdrawReasons)[src]

Removes the specified flags in-place.

pub fn toggle(&mut self, other: WithdrawReasons)[src]

Toggles the specified flags in-place.

pub fn set(&mut self, other: WithdrawReasons, value: bool)[src]

Inserts or removes the specified flags depending on the passed value.

impl WithdrawReasons[src]

pub fn except(one: WithdrawReasons) -> WithdrawReasons[src]

Choose all variants except for one.

assert_eq!(
	WithdrawReasons::FEE | WithdrawReasons::TRANSFER | WithdrawReasons::RESERVE | WithdrawReasons::TIP,
	WithdrawReasons::except(WithdrawReasons::TRANSACTION_PAYMENT),
);

Trait Implementations

impl Binary for WithdrawReasons[src]

impl BitAnd<WithdrawReasons> for WithdrawReasons[src]

type Output = WithdrawReasons

The resulting type after applying the & operator.

pub fn bitand(self, other: WithdrawReasons) -> WithdrawReasons[src]

Returns the intersection between the two sets of flags.

impl BitAndAssign<WithdrawReasons> for WithdrawReasons[src]

pub fn bitand_assign(&mut self, other: WithdrawReasons)[src]

Disables all flags disabled in the set.

impl BitOr<WithdrawReasons> for WithdrawReasons[src]

type Output = WithdrawReasons

The resulting type after applying the | operator.

pub fn bitor(self, other: WithdrawReasons) -> WithdrawReasons[src]

Returns the union of the two sets of flags.

impl BitOrAssign<WithdrawReasons> for WithdrawReasons[src]

pub fn bitor_assign(&mut self, other: WithdrawReasons)[src]

Adds the set of flags.

impl BitXor<WithdrawReasons> for WithdrawReasons[src]

type Output = WithdrawReasons

The resulting type after applying the ^ operator.

pub fn bitxor(self, other: WithdrawReasons) -> WithdrawReasons[src]

Returns the left flags, but with all the right flags toggled.

impl BitXorAssign<WithdrawReasons> for WithdrawReasons[src]

pub fn bitxor_assign(&mut self, other: WithdrawReasons)[src]

Toggles the set of flags.

impl Clone for WithdrawReasons[src]

impl Copy for WithdrawReasons[src]

impl Debug for WithdrawReasons[src]

impl Decode for WithdrawReasons[src]

impl Encode for WithdrawReasons[src]

impl EncodeLike<WithdrawReasons> for WithdrawReasons[src]

impl Eq for WithdrawReasons[src]

impl Extend<WithdrawReasons> for WithdrawReasons[src]

impl FromIterator<WithdrawReasons> for WithdrawReasons[src]

impl Hash for WithdrawReasons[src]

impl LowerHex for WithdrawReasons[src]

impl Not for WithdrawReasons[src]

type Output = WithdrawReasons

The resulting type after applying the ! operator.

pub fn not(self) -> WithdrawReasons[src]

Returns the complement of this set of flags.

impl Octal for WithdrawReasons[src]

impl Ord for WithdrawReasons[src]

impl PartialEq<WithdrawReasons> for WithdrawReasons[src]

impl PartialOrd<WithdrawReasons> for WithdrawReasons[src]

impl StructuralEq for WithdrawReasons[src]

impl StructuralPartialEq for WithdrawReasons[src]

impl Sub<WithdrawReasons> for WithdrawReasons[src]

type Output = WithdrawReasons

The resulting type after applying the - operator.

pub fn sub(self, other: WithdrawReasons) -> WithdrawReasons[src]

Returns the set difference of the two sets of flags.

impl SubAssign<WithdrawReasons> for WithdrawReasons[src]

pub fn sub_assign(&mut self, other: WithdrawReasons)[src]

Disables all flags enabled in the set.

impl UpperHex for WithdrawReasons[src]

Auto Trait Implementations

impl RefUnwindSafe for WithdrawReasons[src]

impl Send for WithdrawReasons[src]

impl Sync for WithdrawReasons[src]

impl Unpin for WithdrawReasons[src]

impl UnwindSafe for WithdrawReasons[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> CallHasher for T where
    T: Hash

impl<T> CheckedConversion for T[src]

impl<S> Codec for S where
    S: Encode + Decode

impl<T> DecodeAll for T where
    T: Decode

impl<T> DecodeLimit for T where
    T: Decode

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

impl<'_, '_, T> EncodeLike<&'_ &'_ T> for T where
    T: Encode

impl<'_, T> EncodeLike<&'_ T> for T where
    T: Encode

impl<'_, T> EncodeLike<&'_ mut T> for T where
    T: Encode

impl<T> EncodeLike<Arc<T>> for T where
    T: Encode

impl<T> EncodeLike<Box<T, Global>> for T where
    T: Encode

impl<'a, T> EncodeLike<Cow<'a, T>> for T where
    T: Encode + ToOwned

impl<T> EncodeLike<Rc<T>> for T where
    T: Encode

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

impl<S> FullCodec for S where
    S: Decode + FullEncode, 

impl<S> FullEncode for S where
    S: Encode + EncodeLike<S>, 

impl<T> Instrument for T[src]

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

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

impl<T, Outer> IsWrappedBy<Outer> for T where
    T: From<Outer>,
    Outer: AsRef<T> + AsMut<T> + From<T>, 
[src]

pub fn from_ref(outer: &Outer) -> &T[src]

Get a reference to the inner from the outer.

pub fn from_mut(outer: &mut Outer) -> &mut T[src]

Get a mutable reference to the inner from the outer.

impl<T> KeyedVec for T where
    T: Codec

impl<T> MaybeDebug for T where
    T: Debug

impl<T> MaybeDebug for T where
    T: Debug

impl<T> MaybeHash for T where
    T: Hash
[src]

impl<T> MaybeHash for T where
    T: Hash
[src]

impl<T> MaybeRefUnwindSafe for T where
    T: RefUnwindSafe
[src]

impl<T> Member for T where
    T: 'static + Clone + PartialEq<T> + Eq + Send + Sync + Debug
[src]

impl<T> Parameter for T where
    T: Codec + EncodeLike<T> + Clone + Eq + Debug
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> SaturatedConversion for 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.

impl<S, T> UncheckedInto<T> for S where
    T: UncheckedFrom<S>, 
[src]

impl<T, S> UniqueSaturatedInto<T> for S where
    T: Bounded,
    S: TryInto<T>, 
[src]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,