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.

§authorization: Option<<T as Config>::AccessControl>

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>

source§

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)

Performs copy-assignment from source. Read more
source§

impl<CtypeHash, SubjectIdentifier, Claims, AccessControl> Debug for Credential<CtypeHash, SubjectIdentifier, Claims, AccessControl>where CtypeHash: Debug, SubjectIdentifier: Debug, Claims: Debug, AccessControl: Debug,

source§

fn fmt(&self, fmt: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

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>

Attempt to deserialise the value from 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,

Attempt to skip the encoded value from input. Read more
§

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,

source§

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 )

Convert self to a slice and append it to the destination.
§

fn encode(&self) -> Vec<u8, Global>

Convert self to an owned vector.
§

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

Calculates the encoded size. Read more
source§

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

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Selfwhere Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Selfwhere Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Selfwhere Self: Sized + PartialOrd<Self>,

Restrict a value to a certain interval. Read more
source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

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>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl<CtypeHash, SubjectIdentifier, Claims, AccessControl> TypeInfo for Credential<CtypeHash, SubjectIdentifier, Claims, AccessControl>where CtypeHash: TypeInfo + 'static, SubjectIdentifier: TypeInfo + 'static, Claims: TypeInfo + 'static, Option<AccessControl>: TypeInfo + 'static, AccessControl: TypeInfo + 'static,

§

type Identity = Credential<CtypeHash, SubjectIdentifier, Claims, AccessControl>

The type identifying for which type info is provided. Read more
source§

fn type_info() -> Type

Returns the static type identifier for Self.
source§

impl<CtypeHash, SubjectIdentifier, Claims, AccessControl> EncodeLike<Credential<CtypeHash, SubjectIdentifier, Claims, AccessControl>> for Credential<CtypeHash, SubjectIdentifier, Claims, AccessControl>where CtypeHash: Encode, SubjectIdentifier: Encode, Claims: Encode, Option<AccessControl>: Encode,

source§

impl<CtypeHash: Eq, SubjectIdentifier: Eq, Claims: Eq, AccessControl: Eq> Eq for Credential<CtypeHash, SubjectIdentifier, Claims, AccessControl>

source§

impl<CtypeHash, SubjectIdentifier, Claims, AccessControl> StructuralEq for Credential<CtypeHash, SubjectIdentifier, Claims, AccessControl>

source§

impl<CtypeHash, SubjectIdentifier, Claims, AccessControl> StructuralPartialEq for Credential<CtypeHash, SubjectIdentifier, Claims, AccessControl>