Type Alias public_credentials::pallet::InputCredentialOf
source · pub type InputCredentialOf<T> = Credential<CtypeHashOf<T>, InputSubjectIdOf<T>, InputClaimsContentOf<T>, <T as Config>::AccessControl>;
Expand description
The type of a public credential as the pallet expects it.
Aliased Type§
struct InputCredentialOf<T> {
pub ctype_hash: <T as Config>::Hash,
pub subject: BoundedVec<u8, <T as Config>::MaxSubjectIdLength>,
pub claims: BoundedVec<u8, <T as Config>::MaxEncodedClaimsLength>,
pub authorization: Option<<T as Config>::AccessControl>,
}
Fields§
§ctype_hash: <T as Config>::Hash
The Ctype of the credential.
subject: BoundedVec<u8, <T as Config>::MaxSubjectIdLength>
The credential subject ID as specified by the attester.
claims: BoundedVec<u8, <T as Config>::MaxEncodedClaimsLength>
The credential claims.
The access control logic to authorize the creation operation.
Trait Implementations§
source§impl<CtypeHash: Clone, SubjectIdentifier: Clone, Claims: Clone, AccessControl: Clone> Clone for Credential<CtypeHash, SubjectIdentifier, Claims, AccessControl>
impl<CtypeHash: Clone, SubjectIdentifier: Clone, Claims: Clone, AccessControl: Clone> Clone for Credential<CtypeHash, SubjectIdentifier, Claims, AccessControl>
source§fn clone(
&self
) -> Credential<CtypeHash, SubjectIdentifier, Claims, AccessControl>
fn clone( &self ) -> Credential<CtypeHash, SubjectIdentifier, Claims, AccessControl>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<CtypeHash, SubjectIdentifier, Claims, AccessControl> Debug for Credential<CtypeHash, SubjectIdentifier, Claims, AccessControl>where
CtypeHash: Debug,
SubjectIdentifier: Debug,
Claims: Debug,
AccessControl: Debug,
impl<CtypeHash, SubjectIdentifier, Claims, AccessControl> Debug for Credential<CtypeHash, SubjectIdentifier, Claims, AccessControl>where CtypeHash: Debug, SubjectIdentifier: Debug, Claims: Debug, AccessControl: Debug,
source§impl<CtypeHash, SubjectIdentifier, Claims, AccessControl> Decode for Credential<CtypeHash, SubjectIdentifier, Claims, AccessControl>where
CtypeHash: Decode,
SubjectIdentifier: Decode,
Claims: Decode,
Option<AccessControl>: Decode,
impl<CtypeHash, SubjectIdentifier, Claims, AccessControl> Decode for Credential<CtypeHash, SubjectIdentifier, Claims, AccessControl>where CtypeHash: Decode, SubjectIdentifier: Decode, Claims: Decode, Option<AccessControl>: Decode,
source§fn decode<__CodecInputEdqy: Input>(
__codec_input_edqy: &mut __CodecInputEdqy
) -> Result<Self, Error>
fn decode<__CodecInputEdqy: Input>( __codec_input_edqy: &mut __CodecInputEdqy ) -> Result<Self, Error>
Attempt to deserialise the value from input.
§fn decode_into<I>(
input: &mut I,
dst: &mut MaybeUninit<Self>
) -> Result<DecodeFinished, Error>where
I: Input,
fn decode_into<I>( input: &mut I, dst: &mut MaybeUninit<Self> ) -> Result<DecodeFinished, Error>where I: Input,
Attempt to deserialize the value from input into a pre-allocated piece of memory. Read more
§fn skip<I>(input: &mut I) -> Result<(), Error>where
I: Input,
fn skip<I>(input: &mut I) -> Result<(), Error>where I: Input,
Attempt to skip the encoded value from input. Read more
§fn encoded_fixed_size() -> Option<usize>
fn encoded_fixed_size() -> Option<usize>
Returns the fixed encoded size of the type. Read more
source§impl<CtypeHash, SubjectIdentifier, Claims, AccessControl> Encode for Credential<CtypeHash, SubjectIdentifier, Claims, AccessControl>where
CtypeHash: Encode,
SubjectIdentifier: Encode,
Claims: Encode,
Option<AccessControl>: Encode,
impl<CtypeHash, SubjectIdentifier, Claims, AccessControl> Encode for Credential<CtypeHash, SubjectIdentifier, Claims, AccessControl>where CtypeHash: Encode, SubjectIdentifier: Encode, Claims: Encode, Option<AccessControl>: Encode,
source§fn size_hint(&self) -> usize
fn size_hint(&self) -> usize
If possible give a hint of expected size of the encoding. Read more
source§fn encode_to<__CodecOutputEdqy: Output + ?Sized>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy
)
fn encode_to<__CodecOutputEdqy: Output + ?Sized>( &self, __codec_dest_edqy: &mut __CodecOutputEdqy )
Convert self to a slice and append it to the destination.
§fn using_encoded<R, F>(&self, f: F) -> Rwhere
F: FnOnce(&[u8]) -> R,
fn using_encoded<R, F>(&self, f: F) -> Rwhere F: FnOnce(&[u8]) -> R,
Convert self to a slice and then invoke the given closure with it.
§fn encoded_size(&self) -> usize
fn encoded_size(&self) -> usize
Calculates the encoded size. Read more
source§impl<CtypeHash: Ord, SubjectIdentifier: Ord, Claims: Ord, AccessControl: Ord> Ord for Credential<CtypeHash, SubjectIdentifier, Claims, AccessControl>
impl<CtypeHash: Ord, SubjectIdentifier: Ord, Claims: Ord, AccessControl: Ord> Ord for Credential<CtypeHash, SubjectIdentifier, Claims, AccessControl>
source§fn cmp(
&self,
other: &Credential<CtypeHash, SubjectIdentifier, Claims, AccessControl>
) -> Ordering
fn cmp( &self, other: &Credential<CtypeHash, SubjectIdentifier, Claims, AccessControl> ) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl<CtypeHash: PartialEq, SubjectIdentifier: PartialEq, Claims: PartialEq, AccessControl: PartialEq> PartialEq<Credential<CtypeHash, SubjectIdentifier, Claims, AccessControl>> for Credential<CtypeHash, SubjectIdentifier, Claims, AccessControl>
impl<CtypeHash: PartialEq, SubjectIdentifier: PartialEq, Claims: PartialEq, AccessControl: PartialEq> PartialEq<Credential<CtypeHash, SubjectIdentifier, Claims, AccessControl>> for Credential<CtypeHash, SubjectIdentifier, Claims, AccessControl>
source§fn eq(
&self,
other: &Credential<CtypeHash, SubjectIdentifier, Claims, AccessControl>
) -> bool
fn eq( &self, other: &Credential<CtypeHash, SubjectIdentifier, Claims, AccessControl> ) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<CtypeHash: PartialOrd, SubjectIdentifier: PartialOrd, Claims: PartialOrd, AccessControl: PartialOrd> PartialOrd<Credential<CtypeHash, SubjectIdentifier, Claims, AccessControl>> for Credential<CtypeHash, SubjectIdentifier, Claims, AccessControl>
impl<CtypeHash: PartialOrd, SubjectIdentifier: PartialOrd, Claims: PartialOrd, AccessControl: PartialOrd> PartialOrd<Credential<CtypeHash, SubjectIdentifier, Claims, AccessControl>> for Credential<CtypeHash, SubjectIdentifier, Claims, AccessControl>
source§fn partial_cmp(
&self,
other: &Credential<CtypeHash, SubjectIdentifier, Claims, AccessControl>
) -> Option<Ordering>
fn partial_cmp( &self, other: &Credential<CtypeHash, SubjectIdentifier, Claims, AccessControl> ) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more