pub struct ProvisionalServiceClaim {
pub network_id: u32,
pub service: ServiceKind,
pub provider_account: Did,
pub beneficiary_account: Did,
pub epoch: ProvisionalEpoch,
pub nonce: [u8; 32],
pub units: NonZero<u64>,
pub request_digest: [u8; 32],
pub completion_digest: [u8; 32],
}Expand description
Canonical provisional service claim.
Fields§
§network_id: u32Overlay in which the receipt signatures are valid.
service: ServiceKindService evidence profile.
provider_account: DidAccount that supplied the service.
beneficiary_account: DidAccount that requested and acknowledged the service.
epoch: ProvisionalEpochProvisional live-collection epoch.
nonce: [u8; 32]Beneficiary-selected fresh nonce.
units: NonZero<u64>Service units; Probe requires exactly one.
request_digest: [u8; 32]Digest of the exact signed request transaction.
completion_digest: [u8; 32]Digest of the exact signed completion transaction.
Implementations§
Source§impl ProvisionalServiceClaim
impl ProvisionalServiceClaim
Sourcepub const fn probe(
network_id: u32,
provider_account: Did,
beneficiary_account: Did,
epoch: ProvisionalEpoch,
nonce: [u8; 32],
request_digest: [u8; 32],
completion_digest: [u8; 32],
) -> ProvisionalServiceClaim
pub const fn probe( network_id: u32, provider_account: Did, beneficiary_account: Did, epoch: ProvisionalEpoch, nonce: [u8; 32], request_digest: [u8; 32], completion_digest: [u8; 32], ) -> ProvisionalServiceClaim
Construct the only service profile, a one-unit probe.
Sourcepub fn validate(&self) -> Result<(), ServiceReceiptError>
pub fn validate(&self) -> Result<(), ServiceReceiptError>
Validate the service rule and account-role relation.
Sourcepub fn canonical_bytes(&self) -> Result<Vec<u8>, ServiceReceiptError>
pub fn canonical_bytes(&self) -> Result<Vec<u8>, ServiceReceiptError>
Serialize the claim under its explicit marker.
Sourcepub fn from_canonical_bytes(
bytes: &[u8],
) -> Result<ProvisionalServiceClaim, ServiceReceiptError>
pub fn from_canonical_bytes( bytes: &[u8], ) -> Result<ProvisionalServiceClaim, ServiceReceiptError>
Parse only the canonical claim representation.
Sourcepub fn digest(&self) -> Result<ServiceReceiptDigest, ServiceReceiptError>
pub fn digest(&self) -> Result<ServiceReceiptDigest, ServiceReceiptError>
Digest binding every field in the canonical claim.
Sourcepub fn sign_provider(
&self,
signer: MessageSigner<impl Borrow<DelegateeKey>>,
) -> Result<MessageVerification, Error>
pub fn sign_provider( &self, signer: MessageSigner<impl Borrow<DelegateeKey>>, ) -> Result<MessageVerification, Error>
Sign the provider role domain with the delegated provider session.
Sourcepub fn sign_beneficiary(
&self,
signer: MessageSigner<impl Borrow<DelegateeKey>>,
) -> Result<MessageVerification, Error>
pub fn sign_beneficiary( &self, signer: MessageSigner<impl Borrow<DelegateeKey>>, ) -> Result<MessageVerification, Error>
Sign the beneficiary role domain with the delegated beneficiary session.
Trait Implementations§
Source§impl Clone for ProvisionalServiceClaim
impl Clone for ProvisionalServiceClaim
Source§fn clone(&self) -> ProvisionalServiceClaim
fn clone(&self) -> ProvisionalServiceClaim
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ProvisionalServiceClaim
impl Debug for ProvisionalServiceClaim
Source§impl<'de> Deserialize<'de> for ProvisionalServiceClaim
impl<'de> Deserialize<'de> for ProvisionalServiceClaim
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ProvisionalServiceClaim, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ProvisionalServiceClaim, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for ProvisionalServiceClaim
Source§impl PartialEq for ProvisionalServiceClaim
impl PartialEq for ProvisionalServiceClaim
Source§impl Serialize for ProvisionalServiceClaim
impl Serialize for ProvisionalServiceClaim
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for ProvisionalServiceClaim
Auto Trait Implementations§
impl Forget for ProvisionalServiceClaim
impl Freeze for ProvisionalServiceClaim
impl Move for ProvisionalServiceClaim
impl RefUnwindSafe for ProvisionalServiceClaim
impl Send for ProvisionalServiceClaim
impl Sync for ProvisionalServiceClaim
impl Unpin for ProvisionalServiceClaim
impl UnsafeUnpin for ProvisionalServiceClaim
impl UnwindSafe for ProvisionalServiceClaim
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<T> ErasedDestructor for Twhere
T: 'static,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T> MaybeSend for T
impl<T> MaybeSendSync for T
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.