pub struct CredentialEnvelope;Expand description
CredentialEnvelope
Portable credential data envelope, not an issuer endpoint or signing format.
Implementations§
Source§impl CredentialEnvelope
impl CredentialEnvelope
Sourcepub const ID: u64 = 0x415554480001
pub const ID: u64 = 0x415554480001
Fixed routing identity, not an authentication or signing domain.
Sourcepub const NAME: &'static str = "credential"
pub const NAME: &'static str = "credential"
Contract name used by generated clients. The credential envelope has no endpoint.
Sourcepub const REQUEST_LIMITS: Limits = CREDENTIAL_LIMITS
pub const REQUEST_LIMITS: Limits = CREDENTIAL_LIMITS
Complete request encoding and decoding allowances.
Sourcepub const RESPONSE_LIMITS: Limits = CREDENTIAL_LIMITS
pub const RESPONSE_LIMITS: Limits = CREDENTIAL_LIMITS
Complete response encoding and decoding allowances.
Sourcepub fn encode_request(value: &PortableCredential) -> Result<Vec<u8>, Error>
pub fn encode_request(value: &PortableCredential) -> Result<Vec<u8>, Error>
Encode this request within all four resource allowances.
§Errors
Returns the supplier’s codec error if admission fails.
Sourcepub fn decode_request(bytes: &[u8]) -> Result<PortableCredential, Error>
pub fn decode_request(bytes: &[u8]) -> Result<PortableCredential, Error>
Decode only this contract’s request frame, without establishing trust.
§Errors
Rejects malformed, misrouted, over-budget or trailing input.
Sourcepub fn encode_response(value: &PortableCredential) -> Result<Vec<u8>, Error>
pub fn encode_response(value: &PortableCredential) -> Result<Vec<u8>, Error>
Encode this method’s reply within all four resource allowances.
§Errors
Returns the supplier’s codec error if admission fails.
Sourcepub fn decode_response(bytes: &[u8]) -> Result<PortableCredential, Error>
pub fn decode_response(bytes: &[u8]) -> Result<PortableCredential, Error>
Decode a reply without treating it as proof of authority.
§Errors
Rejects malformed, misrouted, over-budget or trailing input.