pub struct Receipt<T> { /* private fields */ }
Expand description

A Receipt is a cryptographically signed description of the Invocation and its resulting output and requested effects.

TODO: Effects et al.

Implementations§

source§

impl<T> Receipt<T>

source

pub fn new( ran: Pointer, result: Result<T>, metadata: Ipld, issuer: Option<Issuer>, proof: UcanPrf ) -> Self

Create a new Receipt.

source§

impl<T> Receipt<T>

source

pub fn ran(&self) -> &Pointer

source

pub fn out(&self) -> &Result<T>

task::Result output from invocation/execution.

source

pub fn meta(&self) -> &Ipld

Ipld metadata.

source

pub fn issuer(&self) -> &Option<Issuer>

Optional Issuer for Receipt.

source

pub fn prf(&self) -> &UcanPrf

UcanPrf delegation chain.

Trait Implementations§

source§

impl<T: Clone> Clone for Receipt<T>

source§

fn clone(&self) -> Receipt<T>

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 DagCbor for Receipt<Ipld>

source§

fn to_cid(self) -> Result<Cid, Error<Unit>>

Performs the conversion from an owned Self to Cid.
source§

fn to_dag_json(self) -> Result<Vec<u8>, Error<Unit>>

Serialize Self to JSON bytes.
source§

fn to_dagjson_string(self) -> Result<String, Error<Unit>>

Serialize Self to JSON String.
source§

fn to_cbor(self) -> Result<Vec<u8>, Error<Unit>>

Serialize Self to CBOR bytes.
source§

fn from_cbor(data: &[u8]) -> Result<Self, Error<Unit>>
where Self: TryFrom<Ipld>,

Deserialize Self from CBOR bytes.
source§

fn to_cbor_file(self, filename: String) -> Result<(), Error<Unit>>

Serialize Self to a CBOR file.
source§

impl DagCborRef for Receipt<Ipld>

source§

fn to_cid(&self) -> Result<Cid, Error<Unit>>

Performs the conversion from a referenced Self to Cid.
source§

impl DagJson for Receipt<Ipld>

source§

fn to_json(&self) -> Result<Vec<u8>, Error<Unit>>

Serialize Self type to JSON bytes.
source§

fn to_json_string(&self) -> Result<String, Error<Unit>>

Serialize Self type to JSON String.
source§

fn from_json(data: &[u8]) -> Result<Self, Error<Unit>>

Deserialize Self type from JSON bytes.
source§

fn from_json_string(json: String) -> Result<Self, Error<Unit>>

Deserialize Self type from JSON String.
source§

fn to_file(&self, filename: String) -> Result<(), Error<Unit>>

Write JSON to file.
source§

impl<T: Debug> Debug for Receipt<T>

source§

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

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

impl From<&Receipt<Ipld>> for Ipld

source§

fn from(receipt: &Receipt<Ipld>) -> Self

Converts to this type from the input type.
source§

impl From<Receipt<Ipld>> for Ipld

source§

fn from(receipt: Receipt<Ipld>) -> Self

Converts to this type from the input type.
source§

impl<T> JsonSchema for Receipt<T>

source§

fn schema_name() -> String

The name of the generated JSON Schema. Read more
source§

fn schema_id() -> Cow<'static, str>

Returns a string that uniquely identifies the schema produced by this type. Read more
source§

fn json_schema(gen: &mut SchemaGenerator) -> Schema

Generates a JSON Schema for this type. Read more
source§

fn is_referenceable() -> bool

Whether JSON Schemas generated for this type should be re-used where possible using the $ref keyword. Read more
source§

impl<T: PartialEq> PartialEq for Receipt<T>

source§

fn eq(&self, other: &Receipt<T>) -> 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 TryFrom<Ipld> for Receipt<Ipld>

§

type Error = Error<Unit>

The type returned in the event of a conversion error.
source§

fn try_from(ipld: Ipld) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Receipt<Ipld>> for Pointer

§

type Error = Error<Unit>

The type returned in the event of a conversion error.
source§

fn try_from(receipt: Receipt<Ipld>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Receipt<Ipld>> for Vec<u8>

§

type Error = Error<Unit>

The type returned in the event of a conversion error.
source§

fn try_from(receipt: Receipt<Ipld>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Vec<u8>> for Receipt<Ipld>

§

type Error = Error<Unit>

The type returned in the event of a conversion error.
source§

fn try_from(bytes: Vec<u8>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<T> StructuralPartialEq for Receipt<T>

Auto Trait Implementations§

§

impl<T> Freeze for Receipt<T>
where T: Freeze,

§

impl<T> RefUnwindSafe for Receipt<T>
where T: RefUnwindSafe,

§

impl<T> Send for Receipt<T>
where T: Send,

§

impl<T> Sync for Receipt<T>
where T: Sync,

§

impl<T> Unpin for Receipt<T>
where T: Unpin,

§

impl<T> UnwindSafe for Receipt<T>
where T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> DynClone for T
where T: Clone,

source§

fn __clone_box(&self, _: Private) -> *mut ()

source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoSql for T

source§

fn into_sql<T>(self) -> Self::Expression

Convert self to an expression for Diesel’s query builder. Read more
source§

fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression

Convert &self to an expression for Diesel’s query builder. Read more
source§

impl<T> References<RawCodec> for T

source§

fn references<R, E>(_c: RawCodec, _r: &mut R, _set: &mut E) -> Result<(), Error>
where R: Read, E: Extend<Cid<64>>,

Scrape the references from an impl Read. Read more
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V

source§

impl<U> UcanStoreConditionalSend for U
where U: Send,

source§

impl<U> UcanStoreConditionalSendSync for U
where U: Send + Sync,