pub struct Receipt { /* private fields */ }
Expand description

Receipt for Invocation, including it’s own Cid and a Cid for an Instruction.

See homestar_invocation::Receipt for more info on some internal fields.

Implementations§

source§

impl Receipt

source

pub fn new( cid: Cid, instruction: Pointer, invocation_receipt: &InvocationReceipt<Ipld> ) -> Self

Generate a receipt.

source

pub fn try_with( instruction: Pointer, invocation_receipt: &InvocationReceipt<Ipld> ) -> Result<Self>

Return a runtime Receipt given an Instruction Pointer and UCAN Invocation Receipt.

source

pub fn invocation_capsule( invocation_receipt: &InvocationReceipt<Ipld> ) -> Result<Vec<u8>>

Capsule-wrapper for InvocationReceipt to to be shared over libp2p as DagCbor encoded bytes.

source

pub fn meta(&self) -> &Ipld

Get Ipld metadata on a Receipt.

source

pub fn set_meta(&mut self, meta: Ipld)

Set Ipld metadata on a Receipt.

source

pub fn cid(&self) -> Cid

Get unique identifier of receipt.

source

pub fn cid_as_string(&self) -> String

Get unique identifier of receipt as a String.

source

pub fn cid_as_bytes(&self) -> Vec<u8>

Get inner Cid as bytes.

source

pub fn instruction(&self) -> &Pointer

Return the Pointer-wrapped Cid of the Receipt’s associated Instruction.

source

pub fn instruction_cid_as_bytes(&self) -> Vec<u8>

Get instruction Pointer inner Cid as bytes.

source

pub fn ran(&self) -> String

Get Cid in Receipt as a String.

source

pub fn output(&self) -> &Result<Ipld>

Get executed result/value in Receipt as Ipld.

source

pub fn output_as_arg(&self) -> Result<Arg>

Return task::Result output as Arg for execution.

source

pub fn output_encoded(&self) -> Result<Vec<u8>>

Get executed result/value in Receipt as encoded Cbor.

source

pub fn version(&self) -> Result<Version, Error>

Return semver Version of Receipt.

Trait Implementations§

source§

impl Clone for Receipt

source§

fn clone(&self) -> Receipt

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 DagJson for Receipt
where Ipld: From<Receipt>,

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 Debug for Receipt

source§

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

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

impl Display for Receipt

source§

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

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

impl From<&Receipt> for Receipt<Ipld>

source§

fn from(receipt: &Receipt) -> Self

Converts to this type from the input type.
source§

impl From<Receipt> for Ipld

source§

fn from(receipt: Receipt) -> Self

Converts to this type from the input type.
source§

impl From<Receipt> for Receipt<Ipld>

source§

fn from(receipt: Receipt) -> Self

Converts to this type from the input type.
source§

impl HasTable for Receipt

§

type Table = table

The table this type is associated with.
source§

fn table() -> Self::Table

Returns the table this type is associated with.
source§

impl<'ident> Identifiable for &'ident Receipt

§

type Id = &'ident Pointer

The type of this struct’s identifier. Read more
source§

fn id(self) -> Self::Id

Returns the identifier for this record. Read more
source§

impl<'insert> Insertable<table> for &'insert Receipt

§

type Values = <(Option<Grouped<Eq<cid, <&'insert Pointer as AsExpression<<cid as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<ran, <&'insert Pointer as AsExpression<<ran as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<instruction, <&'insert Pointer as AsExpression<<instruction as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<out, <&'insert Result<Ipld> as AsExpression<<out as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<meta, <&'insert LocalIpld as AsExpression<<meta as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<issuer, <&'insert Issuer as AsExpression<<issuer as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<prf, <&'insert UcanPrf as AsExpression<<prf as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<version, <&'insert String as AsExpression<<version as Expression>::SqlType>>::Expression>>>) as Insertable<table>>::Values

The VALUES clause to insert these records Read more
source§

fn values( self ) -> <(Option<Eq<cid, &'insert Pointer>>, Option<Eq<ran, &'insert Pointer>>, Option<Eq<instruction, &'insert Pointer>>, Option<Eq<out, &'insert Result<Ipld>>>, Option<Eq<meta, &'insert LocalIpld>>, Option<Eq<issuer, &'insert Issuer>>, Option<Eq<prf, &'insert UcanPrf>>, Option<Eq<version, &'insert String>>) as Insertable<table>>::Values

Construct Self::Values Read more
source§

fn insert_into(self, table: T) -> InsertStatement<T, Self::Values>
where T: Table, Self: Sized,

Insert self into a given table. Read more
source§

impl Insertable<table> for Receipt

§

type Values = <(Option<Grouped<Eq<cid, <Pointer as AsExpression<<cid as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<ran, <Pointer as AsExpression<<ran as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<instruction, <Pointer as AsExpression<<instruction as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<out, <Result<Ipld> as AsExpression<<out as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<meta, <LocalIpld as AsExpression<<meta as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<issuer, <Issuer as AsExpression<<issuer as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<prf, <UcanPrf as AsExpression<<prf as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<version, <String as AsExpression<<version as Expression>::SqlType>>::Expression>>>) as Insertable<table>>::Values

The VALUES clause to insert these records Read more
source§

fn values( self ) -> <(Option<Eq<cid, Pointer>>, Option<Eq<ran, Pointer>>, Option<Eq<instruction, Pointer>>, Option<Eq<out, Result<Ipld>>>, Option<Eq<meta, LocalIpld>>, Option<Eq<issuer, Issuer>>, Option<Eq<prf, UcanPrf>>, Option<Eq<version, String>>) as Insertable<table>>::Values

Construct Self::Values Read more
source§

fn insert_into(self, table: T) -> InsertStatement<T, Self::Values>
where T: Table, Self: Sized,

Insert self into a given table. Read more
source§

impl PartialEq for Receipt

source§

fn eq(&self, other: &Receipt) -> 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<__DB: Backend, __ST0, __ST1, __ST2, __ST3, __ST4, __ST5, __ST6, __ST7> Queryable<(__ST0, __ST1, __ST2, __ST3, __ST4, __ST5, __ST6, __ST7), __DB> for Receipt

§

type Row = (Pointer, Pointer, Pointer, Result<Ipld>, LocalIpld, Option<Issuer>, UcanPrf, String)

The Rust type you’d like to map from. Read more
source§

fn build(row: Self::Row) -> Result<Self>

Construct an instance of this type
source§

impl<__DB: Backend> Selectable<__DB> for Receipt

§

type SelectExpression = (cid, ran, instruction, out, meta, issuer, prf, version)

The expression you’d like to select. Read more
source§

fn construct_selection() -> Self::SelectExpression

Construct an instance of the expression
source§

impl TryFrom<Ipld> for Receipt

§

type Error = Error

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> for Vec<u8>

§

type Error = Error

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

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

Performs the conversion.
source§

impl TryFrom<Vec<u8>> for Receipt

§

type Error = Error

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 StructuralPartialEq for Receipt

source§

impl UndecoratedInsertRecord<table> for Receipt

Auto Trait Implementations§

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
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( self, class: Class, constructed: bool, tag: u32 ) -> TaggedParser<'a, Implicit, Self, E>

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.

§

impl<T> FutureExt for T

§

fn with_context(self, otel_cx: Context) -> WithContext<Self>

Attaches the provided Context to this type, returning a WithContext wrapper. Read more
§

fn with_current_context(self) -> WithContext<Self>

Attaches the current Context to this type, returning a WithContext wrapper. Read more
§

impl<T> GetSetFdFlags for T

§

fn get_fd_flags(&self) -> Result<FdFlags, Error>
where T: AsFilelike,

Query the “status” flags for the self file descriptor.
§

fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>
where T: AsFilelike,

Create a new SetFdFlags value for use with set_fd_flags. Read more
§

fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>
where T: AsFilelike,

Set the “status” flags for the self file descriptor. Read more
source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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
§

impl<D> OwoColorize for D

§

fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>
where C: Color,

Set the foreground color generically Read more
§

fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>
where C: Color,

Set the background color generically. Read more
§

fn black<'a>(&'a self) -> FgColorDisplay<'a, Black, Self>

Change the foreground color to black
§

fn on_black<'a>(&'a self) -> BgColorDisplay<'a, Black, Self>

Change the background color to black
§

fn red<'a>(&'a self) -> FgColorDisplay<'a, Red, Self>

Change the foreground color to red
§

fn on_red<'a>(&'a self) -> BgColorDisplay<'a, Red, Self>

Change the background color to red
§

fn green<'a>(&'a self) -> FgColorDisplay<'a, Green, Self>

Change the foreground color to green
§

fn on_green<'a>(&'a self) -> BgColorDisplay<'a, Green, Self>

Change the background color to green
§

fn yellow<'a>(&'a self) -> FgColorDisplay<'a, Yellow, Self>

Change the foreground color to yellow
§

fn on_yellow<'a>(&'a self) -> BgColorDisplay<'a, Yellow, Self>

Change the background color to yellow
§

fn blue<'a>(&'a self) -> FgColorDisplay<'a, Blue, Self>

Change the foreground color to blue
§

fn on_blue<'a>(&'a self) -> BgColorDisplay<'a, Blue, Self>

Change the background color to blue
§

fn magenta<'a>(&'a self) -> FgColorDisplay<'a, Magenta, Self>

Change the foreground color to magenta
§

fn on_magenta<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>

Change the background color to magenta
§

fn purple<'a>(&'a self) -> FgColorDisplay<'a, Magenta, Self>

Change the foreground color to purple
§

fn on_purple<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>

Change the background color to purple
§

fn cyan<'a>(&'a self) -> FgColorDisplay<'a, Cyan, Self>

Change the foreground color to cyan
§

fn on_cyan<'a>(&'a self) -> BgColorDisplay<'a, Cyan, Self>

Change the background color to cyan
§

fn white<'a>(&'a self) -> FgColorDisplay<'a, White, Self>

Change the foreground color to white
§

fn on_white<'a>(&'a self) -> BgColorDisplay<'a, White, Self>

Change the background color to white
§

fn default_color<'a>(&'a self) -> FgColorDisplay<'a, Default, Self>

Change the foreground color to the terminal default
§

fn on_default_color<'a>(&'a self) -> BgColorDisplay<'a, Default, Self>

Change the background color to the terminal default
§

fn bright_black<'a>(&'a self) -> FgColorDisplay<'a, BrightBlack, Self>

Change the foreground color to bright black
§

fn on_bright_black<'a>(&'a self) -> BgColorDisplay<'a, BrightBlack, Self>

Change the background color to bright black
§

fn bright_red<'a>(&'a self) -> FgColorDisplay<'a, BrightRed, Self>

Change the foreground color to bright red
§

fn on_bright_red<'a>(&'a self) -> BgColorDisplay<'a, BrightRed, Self>

Change the background color to bright red
§

fn bright_green<'a>(&'a self) -> FgColorDisplay<'a, BrightGreen, Self>

Change the foreground color to bright green
§

fn on_bright_green<'a>(&'a self) -> BgColorDisplay<'a, BrightGreen, Self>

Change the background color to bright green
§

fn bright_yellow<'a>(&'a self) -> FgColorDisplay<'a, BrightYellow, Self>

Change the foreground color to bright yellow
§

fn on_bright_yellow<'a>(&'a self) -> BgColorDisplay<'a, BrightYellow, Self>

Change the background color to bright yellow
§

fn bright_blue<'a>(&'a self) -> FgColorDisplay<'a, BrightBlue, Self>

Change the foreground color to bright blue
§

fn on_bright_blue<'a>(&'a self) -> BgColorDisplay<'a, BrightBlue, Self>

Change the background color to bright blue
§

fn bright_magenta<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>

Change the foreground color to bright magenta
§

fn on_bright_magenta<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>

Change the background color to bright magenta
§

fn bright_purple<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>

Change the foreground color to bright purple
§

fn on_bright_purple<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>

Change the background color to bright purple
§

fn bright_cyan<'a>(&'a self) -> FgColorDisplay<'a, BrightCyan, Self>

Change the foreground color to bright cyan
§

fn on_bright_cyan<'a>(&'a self) -> BgColorDisplay<'a, BrightCyan, Self>

Change the background color to bright cyan
§

fn bright_white<'a>(&'a self) -> FgColorDisplay<'a, BrightWhite, Self>

Change the foreground color to bright white
§

fn on_bright_white<'a>(&'a self) -> BgColorDisplay<'a, BrightWhite, Self>

Change the background color to bright white
§

fn bold<'a>(&'a self) -> BoldDisplay<'a, Self>

Make the text bold
§

fn dimmed<'a>(&'a self) -> DimDisplay<'a, Self>

Make the text dim
§

fn italic<'a>(&'a self) -> ItalicDisplay<'a, Self>

Make the text italicized
§

fn underline<'a>(&'a self) -> UnderlineDisplay<'a, Self>

Make the text italicized
Make the text blink
Make the text blink (but fast!)
§

fn reversed<'a>(&'a self) -> ReversedDisplay<'a, Self>

Swap the foreground and background colors
§

fn hidden<'a>(&'a self) -> HiddenDisplay<'a, Self>

Hide the text
§

fn strikethrough<'a>(&'a self) -> StrikeThroughDisplay<'a, Self>

Cross out the text
§

fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>
where Color: DynColor,

Set the foreground color at runtime. Only use if you do not know which color will be used at compile-time. If the color is constant, use either OwoColorize::fg or a color-specific method, such as OwoColorize::green, Read more
§

fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>
where Color: DynColor,

Set the background color at runtime. Only use if you do not know what color to use at compile-time. If the color is constant, use either OwoColorize::bg or a color-specific method, such as OwoColorize::on_yellow, Read more
§

fn fg_rgb<const R: u8, const G: u8, const B: u8>( &self ) -> FgColorDisplay<'_, CustomColor<R, G, B>, Self>

Set the foreground color to a specific RGB value.
§

fn bg_rgb<const R: u8, const G: u8, const B: u8>( &self ) -> BgColorDisplay<'_, CustomColor<R, G, B>, Self>

Set the background color to a specific RGB value.
§

fn truecolor(&self, r: u8, g: u8, b: u8) -> FgDynColorDisplay<'_, Rgb, Self>

Sets the foreground color to an RGB value.
§

fn on_truecolor(&self, r: u8, g: u8, b: u8) -> BgDynColorDisplay<'_, Rgb, Self>

Sets the background color to an RGB value.
§

fn style(&self, style: Style) -> Styled<&Self>

Apply a runtime-determined style
§

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> Pointee for T

§

type Pointer = u32

§

fn debug( pointer: <T as Pointee>::Pointer, f: &mut Formatter<'_> ) -> Result<(), Error>

§

impl<T> References<RawCodec> for T

§

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, DB> SelectableHelper<DB> for T
where T: Selectable<DB>, DB: Backend,

source§

fn as_select() -> SelectBy<T, DB>

Construct a select clause based on a Selectable implementation. Read more
source§

fn as_returning() -> SelectBy<Self, DB>

An alias for as_select that can be used with returning clauses
source§

impl<T, ST, DB> StaticallySizedRow<ST, DB> for T
where ST: SqlTypeOrSelectable + TupleSize, T: Queryable<ST, DB>, DB: Backend,

source§

const FIELD_COUNT: usize = <ST as crate::util::TupleSize>::SIZE

The number of fields that this type will consume.
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> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. 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.
§

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

§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
§

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

§

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

§

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