Struct concordium_std::ContractState[][src]

pub struct ContractState { /* fields omitted */ }
Expand description

A type representing the constract state bytes.

Trait Implementations

Returns the “default value” for a type. Read more

Open the contract state. Only one instance can be opened at the same time. Read more

Make sure that the memory size is at least that many bytes in size. Returns true iff this was successful. The new bytes are initialized as 0. Read more

Get the current size of contract state.

Truncate the state to the given size. If the given size is more than the current state size this operation does nothing. The new position is at most at the end of the stream. Read more

Read a u32 in little-endian format. This is optimized to not initialize a dummy value before calling an external function.

Read a u32 in little-endian format. This is optimized to not initialize a dummy value before calling an external function.

Read a u8 in little-endian format. This is optimized to not initialize a dummy value before calling an external function.

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). Read more

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. Read more

Read a u16 in little-endian format.

Read a i64 in little-endian format.

Read a i32 in little-endian format.

Read a i16 in little-endian format.

Read a i32 in little-endian format.

Seek to the new position. If successful, return the new position from the beginning of the stream. Read more

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

Performs the conversion.

Performs the conversion.

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.