[][src]Struct polymesh::service::SecondaryKey

pub struct SecondaryKey<AccountId> where
    AccountId: Encode + Decode, 
{ pub signer: Signatory<AccountId>, pub permissions: Permissions, }

A secondary key is a signatory with defined permissions.

Fields

signer: Signatory<AccountId>

The account or identity that is the signatory of this key.

permissions: Permissions

The access permissions of the signing key.

Implementations

impl<AccountId> SecondaryKey<AccountId> where
    AccountId: Encode + Decode, 
[src]

pub fn new(
    signer: Signatory<AccountId>,
    permissions: Permissions
) -> SecondaryKey<AccountId>
[src]

Creates a SecondaryKey.

pub fn from_account_id(s: AccountId) -> SecondaryKey<AccountId>[src]

Creates a SecondaryKey from an AccountId.

pub fn has_asset_permission(&self, asset: Ticker) -> bool[src]

Checks if the given key has permission to access the given asset.

pub fn has_extrinsic_permission(
    &self,
    pallet_name: &PalletName,
    dispatchable_name: &DispatchableName
) -> bool
[src]

Checks if the given key has permission to call the given extrinsic.

pub fn has_portfolio_permission(
    &self,
    it: impl IntoIterator<Item = PortfolioId>
) -> bool
[src]

Checks if the given key has permission to access all given portfolios.

Trait Implementations

impl<AccountId> Clone for SecondaryKey<AccountId> where
    AccountId: Clone + Encode + Decode, 
[src]

impl<AccountId> Debug for SecondaryKey<AccountId> where
    AccountId: Debug + Encode + Decode, 
[src]

impl<AccountId> Decode for SecondaryKey<AccountId> where
    AccountId: Encode + Decode,
    Signatory<AccountId>: Decode, 
[src]

impl<AccountId> Default for SecondaryKey<AccountId> where
    AccountId: Default + Encode + Decode, 
[src]

impl<'de, AccountId> Deserialize<'de> for SecondaryKey<AccountId> where
    AccountId: Encode + Decode + Deserialize<'de>, 
[src]

impl<AccountId> Encode for SecondaryKey<AccountId> where
    AccountId: Encode + Decode,
    Signatory<AccountId>: Encode, 
[src]

impl<AccountId> EncodeLike<SecondaryKey<AccountId>> for SecondaryKey<AccountId> where
    AccountId: Encode + Decode,
    Signatory<AccountId>: Encode, 
[src]

impl<AccountId> Eq for SecondaryKey<AccountId> where
    AccountId: Eq + Encode + Decode, 
[src]

impl<AccountId> From<IdentityId> for SecondaryKey<AccountId> where
    AccountId: Encode + Decode, 
[src]

impl<AccountId> From<SecondaryKey<AccountId>> for SecondaryKey<AccountId> where
    AccountId: Encode + Decode, 
[src]

impl<AccountId> Ord for SecondaryKey<AccountId> where
    AccountId: Encode + Decode + Ord
[src]

impl<AccountId> PartialEq<IdentityId> for SecondaryKey<AccountId> where
    AccountId: Encode + Decode, 
[src]

impl<AccountId> PartialEq<SecondaryKey<AccountId>> for SecondaryKey<AccountId> where
    AccountId: Encode + Decode + PartialEq<AccountId>, 
[src]

impl<AccountId> PartialOrd<SecondaryKey<AccountId>> for SecondaryKey<AccountId> where
    AccountId: Encode + Decode + Ord
[src]

pub fn partial_cmp(&self, other: &SecondaryKey<AccountId>) -> Option<Ordering>[src]

Any key is less than any Identity.

impl<AccountId> Serialize for SecondaryKey<AccountId> where
    AccountId: Encode + Decode + Serialize
[src]

impl<AccountId> StructuralEq for SecondaryKey<AccountId> where
    AccountId: Encode + Decode, 
[src]

Auto Trait Implementations

impl<AccountId> RefUnwindSafe for SecondaryKey<AccountId> where
    AccountId: RefUnwindSafe
[src]

impl<AccountId> Send for SecondaryKey<AccountId> where
    AccountId: Send
[src]

impl<AccountId> Sync for SecondaryKey<AccountId> where
    AccountId: Sync
[src]

impl<AccountId> Unpin for SecondaryKey<AccountId> where
    AccountId: Unpin
[src]

impl<AccountId> UnwindSafe for SecondaryKey<AccountId> where
    AccountId: UnwindSafe
[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, U> Cast<U> for T where
    U: FromCast<T>, 

impl<T> CheckedConversion for T

impl<T> Clear for T where
    T: PartialEq<T> + Eq + Default

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> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

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<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> Erased for T

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

impl<T> FromBits<T> for T

impl<T> FromCast<T> for T

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

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

impl<T> Hashable for T where
    T: Codec

impl<T> IdentifierT for T where
    T: Clone + Eq + Ord + Default + Debug + Codec

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

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

impl<T, U> IntoBits<U> for T where
    U: FromBits<T>, 

impl<T> IsType<T> for T

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

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

Get a reference to the inner from the outer.

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

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> MaybeRefUnwindSafe for T where
    T: RefUnwindSafe

impl<T> MaybeSerialize for T where
    T: Serialize

impl<T> MaybeSerializeDeserialize for T where
    T: DeserializeOwned + Serialize

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

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

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> SaturatedConversion for T

impl<T> SendSyncUnwindSafe for T where
    T: Send + Sync + UnwindSafe + ?Sized

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

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 

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>, 

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

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