[][src]Struct polymesh::service::IdentityId

pub struct IdentityId(pub [u8; 32]);

Polymesh Identifier ID. It is stored internally as an u128 but it can be load from string with the following format: "did:poly:<32 Hex characters>".

From str

The current implementation of TryFrom<&str> requires exactly 32 hexadecimal characters for code part of DID. Valid examples are the following:

Implementations

impl IdentityId[src]

pub fn for_event(self) -> EventOnly<IdentityId>[src]

Protect the DID as only for use in events.

pub fn as_bytes(&self) -> &[u8][src]

Returns a byte slice of this IdentityId's contents

pub fn as_fixed_bytes(&self) -> &[u8; 32][src]

Extracts a reference to the byte array containing the entire fixed id.

pub fn to_bytes(self) -> [u8; 32][src]

Transform this IdentityId into raw bytes.

pub fn iter(&self) -> Iter<'_, u8>[src]

Returns an iterator over the slice.

Trait Implementations

impl AsRef<[u8]> for IdentityId[src]

impl Clone for IdentityId[src]

impl Copy for IdentityId[src]

impl Debug for IdentityId[src]

impl Decode for IdentityId[src]

impl Default for IdentityId[src]

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

impl Display for IdentityId[src]

impl Encode for IdentityId[src]

impl EncodeLike<IdentityId> for IdentityId[src]

impl Eq for IdentityId[src]

impl From<[u8; 32]> for IdentityId[src]

impl<AccountId> From<IdentityId> for Signatory<AccountId>[src]

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

impl From<u128> for IdentityId[src]

impl Hash for IdentityId[src]

impl Ord for IdentityId[src]

impl<AccountId> PartialEq<IdentityId> for Signatory<AccountId>[src]

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

impl PartialEq<IdentityId> for IdentityId[src]

impl PartialOrd<IdentityId> for IdentityId[src]

impl Printable for IdentityId[src]

impl Serialize for IdentityId[src]

impl StructuralEq for IdentityId[src]

impl StructuralPartialEq for IdentityId[src]

impl<'_> TryFrom<&'_ [u8]> for IdentityId[src]

type Error = &'static str

The type returned in the event of a conversion error.

impl<'_> TryFrom<&'_ str> for IdentityId[src]

type Error = &'static str

The type returned in the event of a conversion error.

Auto Trait Implementations

impl RefUnwindSafe for IdentityId[src]

impl Send for IdentityId[src]

impl Sync for IdentityId[src]

impl Unpin for IdentityId[src]

impl UnwindSafe for IdentityId[src]

Blanket Implementations

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

impl<T, U> AsByteSlice<T> for U where
    T: ToByteSlice,
    U: AsRef<[T]> + ?Sized

impl<U> AsSliceOf for U where
    U: AsRef<[u8]> + ?Sized

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, 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> Error for T where
    T: 'static + Send + Debug + Display

impl<T> ExHashT for T where
    T: Hash + Eq + Debug + Clone + Send + Sync + 'static, 

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> Hash for T where
    T: 'static + Clone + PartialEq<T> + Eq + Default + Send + Sync + Debug + Hash + Codec

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> MaybeDisplay for T where
    T: Display

impl<T> MaybeHash for T where
    T: Hash

impl<T> MaybeHash for T where
    T: Hash

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<Ctx, T> MeasureWith<Ctx> for T where
    T: AsRef<[u8]>, 

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> ProtocolName for T where
    T: AsRef<[u8]>, 

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> SaturatedConversion for T

impl<T> Scalar for T where
    T: PartialEq<T> + Copy + Any + Debug
[src]

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> ToHex for T where
    T: AsRef<[u8]>, 
[src]

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

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[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.

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