Struct concordium_std::ExternCallResponse
source · pub struct ExternCallResponse { /* private fields */ }
Expand description
A type representing the return value of contract invocation. A contract invocation may return a value. It is returned in the following cases
- an entrypoint of a V1 contract was invoked and the invocation succeeded
- an entrypoint of a V1 contract was invoked and the invocation failed due to a CallContractError::LogicReject
In all other cases there is no response.
This type is designed to be used via its Read and HasCallResponse traits.
Typically referred to via the alias CallResponse
.
Trait Implementations§
source§impl Debug for ExternCallResponse
impl Debug for ExternCallResponse
source§impl HasCallResponse for ExternCallResponse
impl HasCallResponse for ExternCallResponse
source§impl Read for ExternCallResponse
impl Read for ExternCallResponse
The read implementation uses host functions to read chunks of return value on demand.
source§fn read(&mut self, buf: &mut [u8]) -> ParseResult<usize>
fn read(&mut self, buf: &mut [u8]) -> ParseResult<usize>
Read a number of bytes into the provided buffer. The returned value is
Ok(n)
if a read was successful, and n
bytes were read (n
could be
0).source§fn read_exact(&mut self, buf: &mut [u8]) -> Result<(), ParseError>
fn read_exact(&mut self, buf: &mut [u8]) -> Result<(), ParseError>
Read exactly the required number of bytes. If not enough bytes could be
read the function returns
Err(_)
, and the contents of the given buffer
is unspecified.source§fn read_array<const N: usize>(&mut self) -> Result<[u8; N], ParseError>
fn read_array<const N: usize>(&mut self) -> Result<[u8; N], ParseError>
Load an array of the given size.
Auto Trait Implementations§
impl Freeze for ExternCallResponse
impl RefUnwindSafe for ExternCallResponse
impl Send for ExternCallResponse
impl Sync for ExternCallResponse
impl Unpin for ExternCallResponse
impl UnwindSafe for ExternCallResponse
Blanket Implementations§
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
Mutably borrows from an owned value. Read more