[−][src]Struct polymesh::service::IdentityId
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:
- "did:poly:ab01cd12ef34ab01cd12ef34ab01cd12" Invalid examples:
- "did:poly:ab01"
- "did:poly:1"
- "DID:poly:..."
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]
pub fn clone(&self) -> IdentityId
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for IdentityId
[src]
impl Debug for IdentityId
[src]
impl Decode for IdentityId
[src]
pub fn decode<__CodecInputEdqy>(
__codec_input_edqy: &mut __CodecInputEdqy
) -> Result<IdentityId, Error> where
__CodecInputEdqy: Input,
[src]
__codec_input_edqy: &mut __CodecInputEdqy
) -> Result<IdentityId, Error> where
__CodecInputEdqy: Input,
impl Default for IdentityId
[src]
pub fn default() -> IdentityId
[src]
impl<'de> Deserialize<'de> for IdentityId
[src]
pub fn deserialize<D>(
deserializer: D
) -> Result<IdentityId, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
[src]
deserializer: D
) -> Result<IdentityId, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
impl Display for IdentityId
[src]
impl Encode for IdentityId
[src]
pub fn encode_to<__CodecOutputEdqy>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy
) where
__CodecOutputEdqy: Output,
[src]
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy
) where
__CodecOutputEdqy: Output,
pub fn encode(&self) -> Vec<u8, Global>
[src]
pub fn using_encoded<R, F>(&self, f: F) -> R where
F: FnOnce(&[u8]) -> R,
[src]
F: FnOnce(&[u8]) -> R,
pub fn size_hint(&self) -> usize
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]
pub fn from(v: IdentityId) -> Signatory<AccountId>
[src]
impl<AccountId> From<IdentityId> for SecondaryKey<AccountId> where
AccountId: Encode + Decode,
[src]
AccountId: Encode + Decode,
pub fn from(id: IdentityId) -> SecondaryKey<AccountId>
[src]
impl From<u128> for IdentityId
[src]
pub fn from(id: u128) -> IdentityId
[src]
impl Hash for IdentityId
[src]
pub fn hash<__H>(&self, state: &mut __H) where
__H: Hasher,
[src]
__H: Hasher,
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Ord for IdentityId
[src]
pub fn cmp(&self, other: &IdentityId) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl<AccountId> PartialEq<IdentityId> for Signatory<AccountId>
[src]
pub fn eq(&self, other: &IdentityId) -> bool
[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl<AccountId> PartialEq<IdentityId> for SecondaryKey<AccountId> where
AccountId: Encode + Decode,
[src]
AccountId: Encode + Decode,
pub fn eq(&self, other: &IdentityId) -> bool
[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl PartialEq<IdentityId> for IdentityId
[src]
pub fn eq(&self, other: &IdentityId) -> bool
[src]
pub fn ne(&self, other: &IdentityId) -> bool
[src]
impl PartialOrd<IdentityId> for IdentityId
[src]
pub fn partial_cmp(&self, other: &IdentityId) -> Option<Ordering>
[src]
pub fn lt(&self, other: &IdentityId) -> bool
[src]
pub fn le(&self, other: &IdentityId) -> bool
[src]
pub fn gt(&self, other: &IdentityId) -> bool
[src]
pub fn ge(&self, other: &IdentityId) -> bool
[src]
impl Printable for IdentityId
[src]
impl Serialize for IdentityId
[src]
pub fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
[src]
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
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.
pub fn try_from(
did: &[u8]
) -> Result<IdentityId, <IdentityId as TryFrom<&'_ [u8]>>::Error>
[src]
did: &[u8]
) -> Result<IdentityId, <IdentityId as TryFrom<&'_ [u8]>>::Error>
impl<'_> TryFrom<&'_ str> for IdentityId
[src]
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]
T: 'static + ?Sized,
impl<T, U> AsByteSlice<T> for U where
T: ToByteSlice,
U: AsRef<[T]> + ?Sized,
T: ToByteSlice,
U: AsRef<[T]> + ?Sized,
pub fn as_byte_slice(&self) -> &[u8]
impl<U> AsSliceOf for U where
U: AsRef<[u8]> + ?Sized,
U: AsRef<[u8]> + ?Sized,
pub fn as_slice_of<T>(&self) -> Result<&[T], Error> where
T: FromByteSlice,
T: FromByteSlice,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> CallHasher for T where
T: Hash,
T: Hash,
impl<T, U> Cast<U> for T where
U: FromCast<T>,
U: FromCast<T>,
pub fn cast(self) -> U
impl<T> CheckedConversion for T
pub fn checked_from<T>(t: T) -> Option<Self> where
Self: TryFrom<T>,
Self: TryFrom<T>,
pub fn checked_into<T>(self) -> Option<T> where
Self: TryInto<T>,
Self: TryInto<T>,
impl<T> Clear for T where
T: PartialEq<T> + Eq + Default,
T: PartialEq<T> + Eq + Default,
impl<S> Codec for S where
S: Encode + Decode,
S: Encode + Decode,
impl<T> DecodeAll for T where
T: Decode,
T: Decode,
pub fn decode_all(input: &[u8]) -> Result<T, Error>
impl<T> DecodeLimit for T where
T: Decode,
T: Decode,
pub fn decode_all_with_depth_limit(limit: u32, input: &[u8]) -> Result<T, Error>
pub fn decode_with_depth_limit(limit: u32, input: &[u8]) -> Result<T, Error>
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> DynClone for T where
T: Clone,
[src]
T: Clone,
pub fn __clone_box(&self, Private) -> *mut ()
[src]
impl<'_, '_, T> EncodeLike<&'_ &'_ T> for T where
T: Encode,
T: Encode,
impl<'_, T> EncodeLike<&'_ T> for T where
T: Encode,
T: Encode,
impl<'_, T> EncodeLike<&'_ mut T> for T where
T: Encode,
T: Encode,
impl<T> EncodeLike<Arc<T>> for T where
T: Encode,
T: Encode,
impl<T> EncodeLike<Box<T, Global>> for T where
T: Encode,
T: Encode,
impl<'a, T> EncodeLike<Cow<'a, T>> for T where
T: Encode + ToOwned,
T: Encode + ToOwned,
impl<T> EncodeLike<Rc<T>> for T where
T: Encode,
T: Encode,
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
pub fn equivalent(&self, key: &K) -> bool
[src]
impl<T> Erased for T
impl<T> Error for T where
T: 'static + Send + Debug + Display,
T: 'static + Send + Debug + Display,
impl<T> ExHashT for T where
T: Hash + Eq + Debug + Clone + Send + Sync + 'static,
T: Hash + Eq + Debug + Clone + Send + Sync + 'static,
impl<T> From<T> for T
[src]
impl<T> FromBits<T> for T
pub fn from_bits(t: T) -> T
impl<T> FromCast<T> for T
pub fn from_cast(t: T) -> T
impl<S> FullCodec for S where
S: Decode + FullEncode,
S: Decode + FullEncode,
impl<S> FullEncode for S where
S: Encode + EncodeLike<S>,
S: Encode + EncodeLike<S>,
impl<T> Hash for T where
T: 'static + Clone + PartialEq<T> + Eq + Default + Send + Sync + Debug + Hash + Codec,
T: 'static + Clone + PartialEq<T> + Eq + Default + Send + Sync + Debug + Hash + Codec,
impl<T> Hashable for T where
T: Codec,
T: Codec,
pub fn blake2_128(&self) -> [u8; 16]
pub fn blake2_256(&self) -> [u8; 32]
pub fn blake2_128_concat(&self) -> Vec<u8, Global>
pub fn twox_128(&self) -> [u8; 16]
pub fn twox_256(&self) -> [u8; 32]
pub fn twox_64_concat(&self) -> Vec<u8, Global>
pub fn identity(&self) -> Vec<u8, Global>
impl<T> IdentifierT for T where
T: Clone + Eq + Ord + Default + Debug + Codec,
T: Clone + Eq + Ord + Default + Debug + Codec,
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> IntoBits<U> for T where
U: FromBits<T>,
U: FromBits<T>,
pub fn into_bits(self) -> U
impl<T> IsType<T> for T
pub fn from_ref(t: &T) -> &T
pub fn into_ref(&self) -> &T
pub fn from_mut(t: &mut T) -> &mut T
pub fn into_mut(&mut self) -> &mut T
impl<T, Outer> IsWrappedBy<Outer> for T where
T: From<Outer>,
Outer: AsRef<T> + AsMut<T> + From<T>,
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,
T: Codec,
impl<T> MaybeDebug for T where
T: Debug,
T: Debug,
impl<T> MaybeDebug for T where
T: Debug,
T: Debug,
impl<T> MaybeDisplay for T where
T: Display,
T: Display,
impl<T> MaybeHash for T where
T: Hash,
T: Hash,
impl<T> MaybeHash for T where
T: Hash,
T: Hash,
impl<T> MaybeRefUnwindSafe for T where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> MaybeSerialize for T where
T: Serialize,
T: Serialize,
impl<T> MaybeSerializeDeserialize for T where
T: DeserializeOwned + Serialize,
T: DeserializeOwned + Serialize,
impl<Ctx, T> MeasureWith<Ctx> for T where
T: AsRef<[u8]>,
T: AsRef<[u8]>,
pub fn measure_with(&self, _ctx: &Ctx) -> usize
impl<T> Member for T where
T: 'static + Clone + PartialEq<T> + Eq + Send + Sync + Debug,
T: 'static + Clone + PartialEq<T> + Eq + Send + Sync + Debug,
impl<T> Parameter for T where
T: Codec + EncodeLike<T> + Clone + Eq + Debug,
T: Codec + EncodeLike<T> + Clone + Eq + Debug,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T> ProtocolName for T where
T: AsRef<[u8]>,
T: AsRef<[u8]>,
pub fn protocol_name(&self) -> &[u8]
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> SaturatedConversion for T
pub fn saturated_from<T>(t: T) -> Self where
Self: UniqueSaturatedFrom<T>,
Self: UniqueSaturatedFrom<T>,
pub fn saturated_into<T>(self) -> T where
Self: UniqueSaturatedInto<T>,
Self: UniqueSaturatedInto<T>,
impl<T> Scalar for T where
T: PartialEq<T> + Copy + Any + Debug,
[src]
T: PartialEq<T> + Copy + Any + Debug,
impl<T> SendSyncUnwindSafe for T where
T: Send + Sync + UnwindSafe + ?Sized,
T: Send + Sync + UnwindSafe + ?Sized,
impl<T> Serialize for T where
T: Serialize + ?Sized,
[src]
T: Serialize + ?Sized,
pub fn erased_serialize(
&self,
serializer: &mut dyn Serializer
) -> Result<Ok, Error>
[src]
&self,
serializer: &mut dyn Serializer
) -> Result<Ok, Error>
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
SS: SubsetOf<SP>,
pub fn to_subset(&self) -> Option<SS>
pub fn is_in_subset(&self) -> bool
pub unsafe fn to_subset_unchecked(&self) -> SS
pub fn from_subset(element: &SS) -> SP
impl<T> ToHex for T where
T: AsRef<[u8]>,
[src]
T: AsRef<[u8]>,
pub fn encode_hex<U>(&self) -> U where
U: FromIterator<char>,
[src]
U: FromIterator<char>,
pub fn encode_hex_upper<U>(&self) -> U where
U: FromIterator<char>,
[src]
U: FromIterator<char>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<S, T> UncheckedInto<T> for S where
T: UncheckedFrom<S>,
T: UncheckedFrom<S>,
pub fn unchecked_into(self) -> T
impl<T, S> UniqueSaturatedInto<T> for S where
T: Bounded,
S: TryInto<T>,
T: Bounded,
S: TryInto<T>,
pub fn unique_saturated_into(self) -> T
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,