pub struct Credential<'a> {
pub common_fields: CommonFields<'a, CredentialFlag>,
pub subject: Cow<'a, str>,
pub issuer: Cow<'a, str>,
pub credential_type: Cow<'a, str>,
pub expiration: Option<u32>,
pub uri: Option<Cow<'a, str>>,
pub subject_node: Option<Cow<'a, str>>,
pub issuer_node: Cow<'a, str>,
pub previous_txn_id: Cow<'a, str>,
pub previous_txn_lgr_seq: u32,
}Expand description
A Credential object is an on-ledger representation of a credential.
<https://github.com/XRPLF/XRPL-Standards/tree/master/XLS-0070-credentials>
Fields§
§common_fields: CommonFields<'a, CredentialFlag>The base fields for all ledger object models.
subject: Cow<'a, str>The account the credential is for.
issuer: Cow<'a, str>The account that issued the credential.
credential_type: Cow<'a, str>A hex-encoded value identifying the credential type from this issuer.
expiration: Option<u32>Optional expiration for the credential.
uri: Option<Cow<'a, str>>Optional additional data, represented as a hex-encoded string.
subject_node: Option<Cow<'a, str>>A hint indicating which page of the subject’s owner directory links to this object. Omitted for self-issued credentials, which only appear in the issuer’s owner directory.
issuer_node: Cow<'a, str>A hint indicating which page of the issuer’s owner directory links to this object.
previous_txn_id: Cow<'a, str>The identifying hash of the transaction that most recently modified this object.
previous_txn_lgr_seq: u32The index of the ledger containing the transaction that most recently modified this object.
Implementations§
Source§impl<'a> Credential<'a>
impl<'a> Credential<'a>
pub fn new( index: Option<Cow<'a, str>>, ledger_index: Option<Cow<'a, str>>, subject: Cow<'a, str>, issuer: Cow<'a, str>, credential_type: Cow<'a, str>, expiration: Option<u32>, uri: Option<Cow<'a, str>>, subject_node: Option<Cow<'a, str>>, issuer_node: Cow<'a, str>, previous_txn_id: Cow<'a, str>, previous_txn_lgr_seq: u32, ) -> Self
Trait Implementations§
Source§impl<'a> Clone for Credential<'a>
impl<'a> Clone for Credential<'a>
Source§fn clone(&self) -> Credential<'a>
fn clone(&self) -> Credential<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<'a> Debug for Credential<'a>
impl<'a> Debug for Credential<'a>
Source§impl<'de, 'a> Deserialize<'de> for Credential<'a>
impl<'de, 'a> Deserialize<'de> for Credential<'a>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl<'a> Eq for Credential<'a>
Source§impl<'a> LedgerObject<CredentialFlag> for Credential<'a>
impl<'a> LedgerObject<CredentialFlag> for Credential<'a>
fn get_ledger_entry_type(&self) -> LedgerEntryType
fn has_flag(&self, flag: &T) -> bool
Source§impl<'a> Model for Credential<'a>
impl<'a> Model for Credential<'a>
Source§fn get_errors(&self) -> XRPLModelResult<()>
fn get_errors(&self) -> XRPLModelResult<()>
Source§fn validate(&self) -> XRPLModelResult<()>
fn validate(&self) -> XRPLModelResult<()>
get_errors if there was one.Source§impl<'a> PartialEq for Credential<'a>
impl<'a> PartialEq for Credential<'a>
Source§impl<'a> Serialize for Credential<'a>
impl<'a> Serialize for Credential<'a>
impl<'a> StructuralPartialEq for Credential<'a>
Auto Trait Implementations§
impl<'a> Freeze for Credential<'a>
impl<'a> RefUnwindSafe for Credential<'a>
impl<'a> Send for Credential<'a>
impl<'a> Sync for Credential<'a>
impl<'a> Unpin for Credential<'a>
impl<'a> UnsafeUnpin for Credential<'a>
impl<'a> UnwindSafe for Credential<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.