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

A type representing the return value of contract init or receive method. The intention is that this type is manipulated using methods of the Write trait. In particular it can be used as a sink to serialize values into.

Implementations§

Create a return value cursor that starts at the beginning. Note that there is a single return value per contract invocation, so multiple calls to open will give access to writing the same return value. Thus this function should only be used once per contract invocation.

Trait Implementations§

Return values are intended to be produced by writing to the ExternReturnValue buffer, either in a high-level interface via serialization, or in a low-level interface by manually using the Write trait’s interface.

Try to write the given buffer into the output stream. If writes are successful returns the number of bytes written. Read more
Attempt to write the entirety of the buffer to the output by repeatedly calling write until either no more output can written, or writing fails. Read more
Write a single byte to the output.
Write a u16 in little endian.
Write a u32 in little endian.
Write a u64 in little endian.
Write a i8 to the output.
Write a i16 in little endian.
Write a i32 in little endian.
Write a i64 in little endian.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.